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):

MethodExample
Bearer token (recommended)Authorization: Bearer YOUR_API_KEY
X-API-Key headerX-API-Key: YOUR_API_KEY
Query parameter?apiKey=YOUR_API_KEY
Legacy query parameter?token=YOUR_API_KEY
ParameterTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., AAPL, MSFT)
ParameterTypeRequiredDescription
apiKeystringNoYour API key (if not using header auth)
startDatestringNoStart date (YYYY-MM-DD)
endDatestringNoEnd date (YYYY-MM-DD)
limitintegerNoMaximum 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"
}
}
FieldTypeDescription
successbooleanWhether the request was successful
dataobjectNews data container
metaobjectResponse metadata
FieldTypeDescription
symbolstringStock ticker symbol
namestringCompany name
articlesarrayArray of news article objects

Each item in the articles array contains:

FieldTypeDescription
datestringPublication date (YYYY-MM-DD)
headlinestringArticle headline
sourcestringNews source name
urlstringLink to the full article
sentimentnumber or nullSentiment score from -1 (bearish) to 1 (bullish), or null if not available
Score RangeInterpretation
0.5 to 1.0Strong bullish sentiment
0.2 to 0.5Moderate bullish sentiment
-0.2 to 0.2Neutral sentiment
-0.5 to -0.2Moderate bearish sentiment
-1.0 to -0.5Strong bearish sentiment
nullSentiment 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']}")
CodeErrorDescription
400Bad RequestInvalid symbol or query parameters
401UnauthorizedInvalid or missing API key
404Not FoundTicker not found
500Internal Server ErrorServer-side error