News Dataset
Access real-time financial news articles with AI-powered sentiment analysis for any stock ticker. FinBrain’s news dataset aggregates headlines from major financial publications and scores each article for market sentiment, giving you a comprehensive view of the news landscape around your positions.
What’s Included
Section titled “What’s Included”The News dataset provides:
- News Article Headlines: Full headline text for each article with publication dates
- Source Attribution: Publication name for every article (e.g., Reuters, Bloomberg, Yahoo Finance)
- Direct Article URLs: Links to the original source article
- AI Sentiment Scores: Normalized score from -1 (bearish) to +1 (bullish), nullable when unavailable
- Coverage: All FinBrain tracked markets including US equities, crypto, forex, and more
Coverage
Section titled “Coverage”| Detail | Description |
|---|---|
| Markets | All FinBrain markets |
| Update Frequency | Real-time / multiple times daily |
| History | Rolling recent articles |
| API Endpoint | /v2/news/{symbol} |
Understanding News Sentiment
Section titled “Understanding News Sentiment”| Score Range | Interpretation | Signal |
|---|---|---|
| Above 0.5 | Strongly positive | Bullish sentiment |
| 0.1 to 0.5 | Mildly positive | Slightly bullish |
| -0.1 to 0.1 | Neutral | No strong signal |
| -0.5 to -0.1 | Mildly negative | Slightly bearish |
| Below -0.5 | Strongly negative | Bearish sentiment |
Note: The sentiment field can be null when no score is available for an article. Always handle this case in your code.
Quick Start
Section titled “Quick Start”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("AAPL", as_dataframe=True)print(df)import requests
API_KEY = "YOUR_API_KEY"BASE_URL = "https://api.finbrain.tech/v2"headers = {"Authorization": f"Bearer {API_KEY}"}
# Get news for AAPLresponse = requests.get(f"{BASE_URL}/news/AAPL", headers=headers)result = response.json()
for article in result["data"]["articles"]: sentiment = article["sentiment"] or "N/A" print(f"{article['date']} | {article['source']} | {sentiment} | {article['headline']}")For complete endpoint details, parameters, and response schema, see the News API Reference.
Use Cases
Section titled “Use Cases”Filter High-Sentiment News Articles
Section titled “Filter High-Sentiment News Articles”Surface only the most positive or negative news articles for a ticker:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("TSLA", as_dataframe=True)
# Filter articles with strong sentimentbullish_news = df[df["sentiment"].notna() & (df["sentiment"] > 0.5)]bearish_news = df[df["sentiment"].notna() & (df["sentiment"] < -0.5)]
print(f"Strongly bullish articles: {len(bullish_news)}")for _, a in bullish_news.iterrows(): print(f" [{a['sentiment']:.2f}] {a['headline']}")
print(f"\nStrongly bearish articles: {len(bearish_news)}")for _, a in bearish_news.iterrows(): print(f" [{a['sentiment']:.2f}] {a['headline']}")Aggregate Daily Sentiment from News
Section titled “Aggregate Daily Sentiment from News”Compute an average sentiment score per day from individual article scores:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("NVDA", as_dataframe=True)
# Filter out articles without sentiment scoresscored = df[df["sentiment"].notna()].copy()
# Group by date (index) and compute daily averagedaily_avg = scored.groupby(scored.index).agg( avg_sentiment=("sentiment", "mean"), article_count=("sentiment", "count"))
for date, row in daily_avg.sort_index().iterrows(): print(f"{date}: avg sentiment = {row['avg_sentiment']:.3f} ({int(row['article_count'])} articles)")Track News Volume and Sentiment Trend
Section titled “Track News Volume and Sentiment Trend”Monitor how news volume and sentiment shift over time for early signals:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("AMZN", as_dataframe=True)
# Compute daily volume and average sentimentdaily = df.groupby(df.index).agg( count=("headline", "count"), avg_sentiment=("sentiment", "mean"))
for date, row in daily.sort_index().iterrows(): sent_str = f"{row['avg_sentiment']:.3f}" if row["avg_sentiment"] == row["avg_sentiment"] else "N/A" print(f"{date}: {int(row['count'])} articles, avg sentiment: {sent_str}")Related Resources
Section titled “Related Resources”- News API Reference - Endpoint details, parameters, and response schema
- News Sentiment Dataset - Aggregated daily sentiment scores
- Screener API Reference - Screen tickers by sentiment and other criteria