news-sentiment-agent
News sentiment scores (positive/negative) as a ready-made tool for LangChain, CrewAI, AutoGen, and any tool-calling AI agent. Weekly or daily series, period-over-period growth.
Powered by trendsmcp.ai — one API key, one client, 30+ data sources: Google Search, YouTube, TikTok, Reddit, Amazon, Wikipedia, App Store, Steam, npm, news volume, news sentiment, live trending feeds, and more. No separate credentials per platform.
Get your free API key → trendsmcp.ai — 100 free requests/month, no credit card.
📖 Full API docs → trendsmcp.ai/docs
Updated for 2026. Works with Python 3.8 through 3.13.
Use in your agent
Pass TrendsMcpClient as a tool to any framework that accepts callables or tool objects:
from news_sentiment_agent import TrendsMcpClient, SOURCE
client = TrendsMcpClient(api_key="YOUR_API_KEY")
# Use directly in any agent tool-calling loop
def get_news_sentiment_trend(keyword: str) -> list:
"""Return weekly trend history for a News Sentiment keyword."""
return client.get_trends(source=SOURCE, keyword=keyword)
def get_news_sentiment_growth(keyword: str) -> dict:
"""Return 3M and 1Y growth for a News Sentiment keyword."""
return client.get_growth(source=SOURCE, keyword=keyword, percent_growth=["3M", "1Y"])
Or query any of the other 30+ data sources with the same key:
# Same client, any platform — no extra credentials
google = client.get_trends(source="google search", keyword="bitcoin")
youtube = client.get_trends(source="youtube", keyword="bitcoin")
reddit = client.get_trends(source="reddit", keyword="bitcoin")
amazon = client.get_trends(source="amazon", keyword="bitcoin")
tiktok = client.get_trends(source="tiktok", keyword="bitcoin")
No scraping. No 429 errors. No proxies.
If you have used pytrends or similar scrapers before, you know the problems: random 429 Too Many Requests blocks, broken pipelines at 2am, time.sleep() hacks, proxy rotation costs, and a library that is now archived because Google explicitly flags scrapers at the protocol level.
trendsmcp is the managed alternative. We run the data infrastructure. You call a REST endpoint.
pytrends alternative for News Sentiment data
| Scrapers / pytrends | trendsmcp | |
|---|---|---|
| 429 rate limit errors | constant | never |
| Proxy required | often | never |
| Breaks on platform changes | yes, regularly | no |
| Data sources covered | 1 (Google only) | 30+ |
| Absolute volume estimates | no | yes |
| Cross-platform growth | no | yes |
| Async support | no | yes |
| Actively maintained | no (archived) | yes |
| Free tier | no | yes, 100 req/month |
Install
pip install news-sentiment-agent
Zero system dependencies. Python 3.8 or later. Uses httpx under the hood.
Quick start
from news_sentiment_agent import TrendsMcpClient, SOURCE
client = TrendsMcpClient(api_key="YOUR_API_KEY")
# 5-year weekly time series — no sleep(), no proxies, no 429s
series = client.get_trends(source=SOURCE, keyword="bitcoin")
print(series[0])
# TrendsDataPoint(date='2026-03-28', value=72, keyword='bitcoin', source='news sentiment')
# Period-over-period growth
growth = client.get_growth(
source=SOURCE,
keyword="bitcoin",
percent_growth=["3M", "1Y"],
)
print(growth.results[0])
# GrowthResult(period='3M', growth=14.5, direction='increase', ...)
# What's trending right now (across all live platforms)
trending = client.get_top_trends(limit=10)
print(trending.data)
# [[1, 'topic one'], [2, 'topic two'], ...]
Async support
import asyncio
from news_sentiment_agent import AsyncTrendsMcpClient, SOURCE
async def main():
client = AsyncTrendsMcpClient(api_key="YOUR_API_KEY")
series = await client.get_trends(source=SOURCE, keyword="bitcoin")
print(series[0])
asyncio.run(main())
Query multiple platforms concurrently with one key:
google, youtube, reddit, amazon, tiktok = await asyncio.gather(
client.get_trends(source="google search", keyword="bitcoin"),
client.get_trends(source="youtube", keyword="bitcoin"),
client.get_trends(source="reddit", keyword="bitcoin"),
client.get_trends(source="amazon", keyword="bitcoin"),
client.get_trends(source="tiktok", keyword="bitcoin"),
)
Use cases
- SEO research: track keyword search volume trends across Google Search, Google News, and Google Images before publishing content
- Market research: measure consumer demand signals on Amazon and Google Shopping before entering a product category
- Investment research: monitor Reddit discussion volume, news sentiment, and Wikipedia page view spikes as leading indicators
- Content strategy: find what is growing on YouTube and TikTok before topics peak and competition saturates them
- Competitor tracking: compare brand search volume growth across platforms over custom date ranges
- App analytics: track App Store interest and app download estimates alongside Reddit and news buzz
Works with
- Claude (via MCP — trendsmcp.ai/docs)
- Cursor (via MCP — trendsmcp.ai/docs)
- ChatGPT (via MCP — trendsmcp.ai/docs)
- Windsurf (via MCP — trendsmcp.ai/docs)
- VS Code Copilot (via MCP — trendsmcp.ai/docs)
- LangChain: pass
TrendsMcpClientoutput directly as tool results or context - CrewAI: wrap any method as a
Tooland drop it into your crew - AutoGen: register as a callable tool for any agent
- LlamaIndex: use trend series as structured data nodes for retrieval
- Pandas: each
get_trends()response converts to a DataFrame in one line
Methods
get_trends(source, keyword, data_mode=None)
Returns a historical time series for a keyword. Defaults to 5 years of weekly data. Pass data_mode="daily" for the last 30 days at daily granularity.
get_growth(source, keyword, percent_growth, data_mode=None)
Calculates percentage growth between two points in time. Pass preset strings or CustomGrowthPeriod objects.
Growth presets: 7D 14D 30D 1M 2M 3M 6M 9M 12M 1Y 18M 24M 2Y 36M 3Y 48M 60M 5Y MTD QTD YTD
get_top_trends(type=None, limit=None)
Returns today's live trending items. Omit type to get all feeds at once.
Available live feeds: Google Trends Google News Top News YouTube Trending TikTok Trending Hashtags X (Twitter) Trending Reddit Hot Posts Reddit World News Wikipedia Trending Amazon Best Sellers Top Rated Amazon Best Sellers by Category App Store Top Free App Store Top Paid Google Play Spotify Top Podcasts Top Websites
All 30+ data sources
One API key. One client. Every platform. No separate credentials for each.
| source | What it measures |
|---|---|
"google search" |
Google Search volume |
"google images" |
Google Images search volume |
"google news" |
Google News search volume |
"google shopping" |
Google Shopping purchase intent |
"youtube" |
YouTube search volume |
"tiktok" |
TikTok hashtag volume |
"reddit" |
Reddit subreddit subscribers over time |
"amazon" |
Amazon product search volume |
"wikipedia" |
Wikipedia page views |
"news volume" |
News article mention count |
"news sentiment" |
News sentiment score (positive/negative) |
"app downloads" |
Mobile app download/install estimates (Android) |
"npm" |
npm package weekly downloads |
"steam" |
Steam concurrent player count |
All values normalized 0–100 so you can compare across platforms directly.
Error handling
from news_sentiment_agent import TrendsMcpClient, TrendsMcpError, SOURCE
client = TrendsMcpClient(api_key="YOUR_API_KEY")
try:
series = client.get_trends(source=SOURCE, keyword="bitcoin")
except TrendsMcpError as e:
print(e.status) # e.g. 429 if you exceed your plan quota
print(e.code) # e.g. "rate_limited"
print(e.message)
Frequently asked questions
Does this scrape News Sentiment? No. trendsmcp runs managed data infrastructure. Your Python code makes a single authenticated REST call. No scraping, no Selenium, no cookies, no proxies required.
Do I need a News Sentiment developer account, OAuth token, or platform API key? No. One trendsmcp API key gives you access to all 30+ data sources.
Will it break when News Sentiment changes its backend? No. API stability is our responsibility. If something changes upstream, we update the backend. Your code keeps working.
Can I query multiple platforms with the same key?
Yes. One key covers every data source. Switch source to any of the 30+ values listed above.
Is there a free tier? Yes, 100 requests per month, no credit card required. Get your key at trendsmcp.ai.
Can I use this in production data pipelines? Yes. The client is stateless, thread-safe, and supports async for concurrent queries across multiple platforms.
Related packages
- trendsmcp — core package, all 30+ data sources
- youtube-trends-api / youtube-trends-mcp / youtube-trends-agent
- reddit-trends-api / reddit-trends-mcp / reddit-trends-agent
- google-search-trends-api / google-search-trends-mcp / google-search-trends-agent
- amazon-trends-api / amazon-trends-mcp / amazon-trends-agent
- tiktok-trends-api / tiktok-trends-mcp / tiktok-trends-agent
- wikipedia-trends-api / wikipedia-trends-mcp / wikipedia-trends-agent
- npm-trends-api / npm-trends-mcp / npm-trends-agent
- steam-trends-api / steam-trends-mcp / steam-trends-agent
- app-store-trends-api / app-store-trends-mcp / app-store-trends-agent
- news-volume-api / news-volume-mcp / news-volume-agent
- news-sentiment-api / news-sentiment-mcp / news-sentiment-agent
Links
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file news_sentiment_agent-1.1.0.tar.gz.
File metadata
- Download URL: news_sentiment_agent-1.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7f153d57060cf07a7f7167eb0b1ec48dcea88086fa1bc4d56088357a4be701
|
|
| MD5 |
98c55c5480e1b2cf102b01fdd7725b4e
|
|
| BLAKE2b-256 |
48670c57fd7d416e1fc8ecb8f5a0d15155513241abaf99ad7fae60eae13c0061
|
File details
Details for the file news_sentiment_agent-1.1.0-py3-none-any.whl.
File metadata
- Download URL: news_sentiment_agent-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ff496a4e47c79bdf4c273e763cab799567155764fcaf92b12bd4b04f7ccca1
|
|
| MD5 |
b79d584370e932aa4620573849b477b0
|
|
| BLAKE2b-256 |
65405eb7dd0f6d0cf5d84231c5c393d53ea3bdfac157e619d2413cef1aea947d
|