Skip to content

Recent Activity API

Recent endpoints return the latest data entries sorted by date across all tracked stocks. Use these endpoints to stay on top of breaking news and fresh analyst actions without querying tickers individually.

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
Endpoint Description
GET /v2/recent/news Most recent news articles
GET /v2/recent/analyst-ratings Most recent analyst ratings
Parameter Type Required Description
apiKey string No Your API key (if not using header auth)
limit integer No Number of results to return (1-20,000, default 100)
market string No Filter by market name (e.g., NASDAQ, S&P 500)
region string No Filter by region code (e.g., US, UK)
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# Recent news
df = fb.recent.news(limit=20, as_dataframe=True)
print(df)
# Recent analyst ratings
df = fb.recent.analyst_ratings(limit=10, as_dataframe=True)
print(df)
Terminal window
# Get 100 most recent analyst ratings (default)
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.finbrain.tech/v2/recent/analyst-ratings"
# Filter by region
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.finbrain.tech/v2/recent/analyst-ratings?region=US&limit=200"
{
"success": true,
"data": {
"data": [
{
"symbol": "VRT",
"name": "Vertiv Holdings Co",
"date": "2026-01-19",
"headline": "Amazon, Carvana And Others: Bank Of America Reveals 5 Stocks",
"source": "Benzinga",
"url": "https://www.benzinga.com/news/280015",
"sentiment": 0.6705
}
],
"summary": {
"totalArticles": 100,
"totalTickers": 87,
"averageSentiment": 0.42
}
},
"meta": { "timestamp": "2026-01-19T15:23:13.813Z" }
}
Field Type Description
symbol string Stock ticker symbol
name string Company name
date string Article date (YYYY-MM-DD)
headline string News article headline
source string News source (e.g., Benzinga, Reuters)
url string Link to the original article
sentiment number Sentiment score from -1 (bearish) to 1 (bullish)
Field Type Description
totalArticles integer Total number of articles returned
totalTickers integer Number of unique tickers mentioned
averageSentiment number Average sentiment across all articles
{
"success": true,
"data": {
"data": [
{
"symbol": "AFYA",
"name": "Afya Ltd",
"date": "2026-01-16",
"institution": "UBS",
"action": "Downgrade",
"rating": "Buy → Neutral",
"targetPrice": "$16"
}
],
"summary": {
"totalRatings": 100,
"totalTickers": 95,
"upgradeCount": 18,
"downgradeCount": 12
}
},
"meta": { "timestamp": "2026-01-19T15:23:11.771Z" }
}
Field Type Description
symbol string Stock ticker symbol
name string Company name
date string Rating date (YYYY-MM-DD)
institution string Analyst firm (e.g., UBS, Goldman Sachs)
action string Rating action (e.g., Upgrade, Downgrade, Initiate, Reiterate)
rating string Rating change (e.g., “Buy to Neutral”)
targetPrice string Price target set by the analyst
Field Type Description
totalRatings integer Total number of ratings returned
totalTickers integer Number of unique tickers with ratings
upgradeCount integer Number of upgrades
downgradeCount integer Number of downgrades
import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(
"https://api.finbrain.tech/v2/recent/news",
headers=headers,
params={"limit": 500}
)
result = response.json()
# Group articles by ticker
from collections import defaultdict
by_ticker = defaultdict(list)
for article in result["data"]["data"]:
by_ticker[article["symbol"]].append(article)
# Find tickers with the most news activity
print("Most mentioned tickers:")
for symbol, articles in sorted(by_ticker.items(), key=lambda x: -len(x[1]))[:10]:
avg_sentiment = sum(a["sentiment"] for a in articles) / len(articles)
print(f" {symbol:>6}: {len(articles)} articles, avg sentiment {avg_sentiment:.3f}")
import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(
"https://api.finbrain.tech/v2/recent/analyst-ratings",
headers=headers,
params={"limit": 500}
)
result = response.json()
upgrades = [r for r in result["data"]["data"] if r["action"] == "Upgrade"]
downgrades = [r for r in result["data"]["data"] if r["action"] == "Downgrade"]
print(f"Recent Upgrades ({len(upgrades)}):")
for r in upgrades[:5]:
print(f" {r['symbol']:>6} - {r['institution']}: {r['rating']} (Target: {r['targetPrice']})")
print(f"\nRecent Downgrades ({len(downgrades)}):")
for r in downgrades[:5]:
print(f" {r['symbol']:>6} - {r['institution']}: {r['rating']} (Target: {r['targetPrice']})")
Code Error Description
400 Bad Request Invalid parameters
401 Unauthorized Invalid or missing API key
403 Forbidden Authenticated, but not authorized to access this resource
404 Not Found Endpoint not found
429 Too Many Requests Rate limit exceeded — wait and retry
500 Internal Server Error Server-side error