Skip to main content

News Aggregator API Reference

GET /news/{ticker} asks seven providers in parallel — Yahoo Finance, Google Finance, ZoneBourse, Boursorama, Investing.com, MarketWatch and MSN Finance — removes duplicates and stores the articles of instruments that are in the catalogue in news_articles. See News providers.


GET /news/{ticker}​

ParameterTypeDefaultDescription
tickerstring—Ticker (e.g. AIR.PA)
limitinteger20Articles returned (at most NEWS_MAX_LIMIT, 100)
languagestring—Keep only this language (en, fr…); articles of unknown language are kept. all means no filter
force_refreshbooleanfalseIgnore the cached answer
curl -s -H "X-API-KEY: $FONREX_API_KEY" "http://localhost:5000/news/AIR.PA?limit=5&language=fr"
{
"ticker": "AIR.PA",
"isin": "NL0000235190",
"count": 1,
"providers": ["boursorama"],
"cached": false,
"articles": [
{
"title": "Airbus : livraisons en hausse en septembre",
"summary": "...",
"url": "https://www.boursorama.com/bourse/actualites/...",
"image_url": null,
"source": "Boursorama",
"provider": "boursorama",
"author": null,
"published_at": "2026-10-08T07:45:00Z",
"related_tickers": [],
"language": "fr"
}
]
}

Each answer is cached 30 minutes (NEWS_CACHE_TTL), separately for each limit and language. A provider that fails returns nothing without blocking the others.

Deduplication​

  1. URL: lower case, utm_* parameters, fragment and trailing slash removed. The first article received is kept.
  2. Title similarity: difflib.SequenceMatcher on normalised titles; at or above NEWS_DEDUP_SIMILARITY (0.85) the most recent article is kept.

Articles are then sorted newest first and cut to limit (each provider is asked for twice that number).


GET /news/feed​

The latest articles stored in news_articles, all instruments together. Nothing is fetched from the providers.

ParameterTypeDefaultDescription
limitinteger50Articles returned
languagestring—Language filter (all = none)
tickersstring—Comma-separated tickers; keeps the articles related to one of them
{ "count": 0, "from_date": null, "to_date": null, "articles": [] }

POST /news/{ticker}/refresh​

Fetch the news of a ticker again in the background and answer at once: {"status": "queued", "ticker": "AIR.PA"}. Full-access key only.


GET /news/stats​

{
"total_articles": 0,
"by_provider": {},
"by_language": {},
"last_fetched_at": null,
"top_assets": {}
}