Skip to content

Stock News API

Retrieve news articles with AI-powered sentiment scores for any stock ticker. Each article includes the headline, source, URL, and an optional sentiment score ranging from -1 (bearish) to 1 (bullish).

GET /v2/news/{symbol}

Supports multiple authentication methods (in order of preference):

Method Example
Bearer token (recommended) Authorization: Bearer YOUR_API_KEY
X-API-Key header X-API-Key: YOUR_API_KEY
Query parameter ?apiKey=YOUR_API_KEY
Legacy query parameter ?token=YOUR_API_KEY
Parameter Type Required Description
symbol string Yes Stock ticker symbol (e.g., AAPL, MSFT)
Parameter Type Required Description
apiKey string No Your API key (if not using header auth)
startDate string No Start date (YYYY-MM-DD)
endDate string No End date (YYYY-MM-DD)
limit integer No Maximum number of articles to return
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("AAPL",
date_from="2025-01-01",
date_to="2025-06-30",
as_dataframe=True)
print(df)
{
"success": true,
"data": {
"symbol": "AAPL",
"name": "Apple Inc.",
"articles": [
{
"date": "2026-01-19",
"headline": "My Forever Portfolio: 5 Stocks I Don't Plan on Ever Selling",
"source": "Motley Fool",
"url": "https://www.fool.com/investing/2026/01/19/my-forever-portfolio",
"sentiment": null
},
{
"date": "2026-01-19",
"headline": "Prediction: These 5 Unstoppable Stocks Could Join the $5 Trillion Club in 2026",
"source": "Motley Fool",
"url": "https://www.fool.com/investing/2026/01/19/5-trillion-club",
"sentiment": 0.1027
},
{
"date": "2026-01-19",
"headline": "SEC Approves Expanded Option Expirations for Magnificent Seven Stocks",
"source": "GuruFocus.com",
"url": "https://finance.yahoo.com/news/sec-approves-expanded-option-expirations",
"sentiment": 0.765
}
]
},
"meta": {
"timestamp": "2026-01-19T15:06:22.295Z"
}
}
Field Type Description
success boolean Whether the request was successful
data object News data container
meta object Response metadata
Field Type Description
symbol string Stock ticker symbol
name string Company name
articles array Array of news article objects

Each item in the articles array contains:

Field Type Description
date string Publication date (YYYY-MM-DD)
headline string Article headline
source string News source name
url string Link to the full article
sentiment number or null Sentiment score from -1 (bearish) to 1 (bullish), or null if not available
Score Range Interpretation
0.5 to 1.0 Strong bullish sentiment
0.2 to 0.5 Moderate bullish sentiment
-0.2 to 0.2 Neutral sentiment
-0.5 to -0.2 Moderate bearish sentiment
-1.0 to -0.5 Strong bearish sentiment
null Sentiment not available for this article
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("AAPL",
date_from="2026-01-15",
date_to="2026-01-19",
as_dataframe=True)
for _, article in df.iterrows():
sentiment = article["sentiment"]
sentiment_str = f"{sentiment:.3f}" if sentiment is not None else "N/A"
print(f"{article['date']} [{sentiment_str}] {article['headline']}")
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("TSLA", as_dataframe=True)
# Filter articles that have sentiment scores
scored = df[df["sentiment"].notna()]
if scored.empty:
print("No scored articles found")
else:
avg_sentiment = scored["sentiment"].mean()
bullish = (scored["sentiment"] > 0.2).sum()
bearish = (scored["sentiment"] < -0.2).sum()
neutral = len(scored) - bullish - bearish
print(f"TSLA News Sentiment Summary ({len(scored)} scored articles)")
print(f" Average sentiment: {avg_sentiment:.3f}")
print(f" Bullish articles: {bullish} ({bullish/len(scored)*100:.0f}%)")
print(f" Neutral articles: {neutral} ({neutral/len(scored)*100:.0f}%)")
print(f" Bearish articles: {bearish} ({bearish/len(scored)*100:.0f}%)")
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.news.ticker("NVDA", as_dataframe=True)
# Find articles with strong sentiment (positive or negative)
scored = df[df["sentiment"].notna()].copy()
strong = scored[scored["sentiment"].abs() > 0.5]
for _, article in strong.sort_values("sentiment", ascending=False).iterrows():
direction = "Bullish" if article["sentiment"] > 0 else "Bearish"
print(f"[{direction} {article['sentiment']:+.3f}] {article['headline']}")
print(f" Source: {article['source']} | Date: {article['date']}")
Code Error Description
400 Bad Request Invalid symbol or query parameters
401 Unauthorized Invalid or missing API key
403 Forbidden Authenticated, but not authorized to access this resource
404 Not Found Ticker not found
429 Too Many Requests Rate limit exceeded — wait and retry
500 Internal Server Error Server-side error