Repository navigation
Description
Problem or motivation
Company news in research reports comes from the search fallback chain (Tavily, SearXNG, GDELT, SerpAPI, Alpha Vantage, Google, DuckDuckGo). Apart from Alpha Vantage these are web search engines or, in GDELT's case, a general news index, so a ticker query also returns pages that only mention the company in passing. A ticker-native source with a relevance score would give the analysis cleaner evidence.
Disclosure: I build AlphAI, a financial news API, so I would write this provider and keep it working.
Proposed solution
An AlphAINewsProvider(BaseSearchProvider) in app/services/search.py, shaped like AlphaVantageNewsProvider: it takes the ticker-like symbols from the query, makes one request for up to 100 of them, and maps each item onto SearchResult. It joins the chain only when ALPHAI_API_KEY is set; with the key empty nothing changes.
GET https://api.alphai.io/api/news/brief/?tickers=AMD,NVDA&hours=168&limit=20 with Authorization: Bearer <key>. Mapping: title, summary → snippet, url, source_domain → source, time_published → published_date, and the ticker's entry in signals → sentiment. What the API adds:
- every article is tagged with the tickers it is about, not matched on the name;
- a 1 to 10 relevance score per article, with a feed floor of 4;
- coverage of one event from several outlets comes back as one story;
- coverage: US listings (including the US listings of foreign companies, such as
SAP), crypto asBTC-USD, and some other markets in the yfinance form, such as0700.HK; English-language news only. Mainland China A-shares are not covered, so A-share research would keep its current sources.
A real item from this morning:
{
"title": "Analysis: AI chip rivalry shifts toward system-level capabilities as AMD challenges Nvidia's full-stack ecosystem",
"summary": "AMD completed its acquisition of World Labs in an all-stock deal valued at approximately $8.2 billion, according to the company. The acquisition is part of AMD's strategy to enhance its AI chip capabilities and compete with Nvidia's ecosystem. AMD and Nvidia are involved in a rivalry focused on system-level capabilities in the AI chip market.",
"url": "https://www.digitimes.com/news/a20261123PD211/amd-acquisition-ai-chip-nvidia-hardware.html",
"source_domain": "digitimes.com",
"time_published": "2026-11-23T07:27:43Z",
"matched_tickers": [
"AMD"
],
"category": "mergers_acquisitions",
"relevance_score": 9,
"signals": [
{
"ticker": "AMD",
"sentiment": "positive"
}
]
}The free plan allows 20 requests a minute and 100 a day, so self-hosted users can try it at no cost. API reference: https://alphai.io/developers (OpenAPI at https://api.alphai.io/api/schema/).
Alternatives considered
Keeping Alpha Vantage as the only ticker-native source. AlphAI would sit next to it in the chain, not replace it.
Acceptance criteria
- With
ALPHAI_API_KEYset, a research run on a US ticker lists AlphAI items with publisher links and sentiment. - With the key empty, the provider order and behaviour are unchanged.
- A failed or rate-limited AlphAI call falls through to the next provider, like the others.
-
env.exampleand the settings page describe the key.
If this fits the roadmap, I am happy to open the PR once a maintainer confirms the scope.
Activity