trendsmcp/youtube-trends-api
YouTube search interest trends as a Python API client and MCP tool. Powered by trendsmcp.ai
Platform-specific configuration:
{
"mcpServers": {
"youtube-trends-api": {
"command": "npx",
"args": [
"-y",
"youtube-trends-api"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://pypi.org/project/youtube-trends-api/) [](https://pypi.org/project/youtube-trends-api/) [](https://github.com/trendsmcp/youtube-trends-api/blob/main/LICENSE)
The number one Python package for YouTube trend data. YouTube has no public trends API. This package gives you YouTube search interest over time via a single REST call. Weekly series, growth percentages, and live trending searches. No scraping, no YouTube API key, no OAuth.
Works as a Python API client in any script, notebook, or pipeline. Also works as an MCP tool — plug it directly into Claude, Cursor, VS Code Copilot, or any MCP-compatible AI host.
Powered by trendsmcp.ai.
[Get a free API key](https://trendsmcp.ai) — 100 requests/month, no credit card.
[Full API docs](https://trendsmcp.ai/docs)
---
Python 3.8 or later. Depends on trendsmcp.
---
pip install youtube-trends-api---
Store your API key in an environment variable:
export TRENDSMCP_API_KEY="your-api-key"import os
from youtube_trends_api import TrendsMcpClient, SOURCE
client = TrendsMcpClient(api_key=os.environ["TRENDSMCP_API_KEY"])SOURCE is pre-set to "youtube". Pass it directly to any method.
---
Returns a weekly time series for a YouTube keyword. Default is 5 years of weekly data.
import os
from youtube_trends_api import TrendsMcpClient, SOURCE
client = TrendsMcpClient(api_key=os.environ["TRENDSMCP_API_KEY"])
series = client.get_trends(source=SOURCE, keyword="asmr")
print(series[0])
# TrendsDataPoint(date='2021-01-03', value=54, keyword='asmr', source='youtube')
print(series[-1])
# TrendsDataPoint(date='2026-03-23', value=72, keywoLoading reviews...