google-trends-mcp
Provides tools for retrieving Google Trends data, including interest over time, interest by region, related and rising queries, Trending Now searches with search volume, and keyword rankings.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Google Trends API for Python, JavaScript & AI agents (pytrends alternative)

Get Google Trends data as clean JSON in one API call: interest over time, interest by region, related and rising queries, Trending Now with search volume, and keyword ranking beyond 5 terms. No browser, no Google account, no quota to request.
pytrendswas archived in April 2025 and now often fails with HTTP 429 errors. This repository shows how to get the same Google Trends data, reliably, through the hosted Google Trends Scraper API on Apify.
Quick start (Python)
pip install "apify-client>=3"from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>") # free token: https://console.apify.com/account/integrations
run = client.actor("victorrodi/google-trends-api").call(
run_input={
"searchTerms": ["iphone, samsung, pixel"], # up to 5 terms per line are compared
"geo": "US",
"timeRange": "today 12-m",
}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item["type"], item.get("summary"))Every interestOverTime result comes with a ready-made summary per term: average, peak, peak date, latest value and growth %.
More examples: examples/.
Related MCP server: Google Trends MCP Server
What data you get
Data | Input | Output |
Interest over time (with average, peak, growth %) |
|
|
Interest by region: countries, states, cities, US metros |
|
|
Related queries, top and rising (incl. "Breakout") |
|
|
Trending Now: search volume, growth %, start time, categories, related queries, news, for 4 h / 24 h / 48 h / 7 days |
|
|
Rank unlimited keywords on one 0-100 scale |
|
|
YouTube, News, Shopping, Images search |
| same types |
Several countries in one run |
| one item per country |
Export as JSON, CSV, Excel, XML or read it from the API. You are never charged for empty results.
Migrating from pytrends
pytrends | Google Trends Scraper API input |
|
|
|
|
|
|
|
|
|
|
5 keywords max per comparison |
|
| handled for you: session retries, new IPs, residential fallback |
timeRange accepts the same strings as the pytrends timeframe: now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all, or a custom range in customTimeRange such as 2024-01-01 2024-12-31.
JavaScript / Node.js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('victorrodi/google-trends-api').call({
trendingNowGeos: ['US', 'GB'],
trendingNowHours: '24',
trendingNowMaxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const t of items) console.log(t.geo, t.rank, t.title, t.searchVolume, `${t.growthPct}%`);cURL (run and get the results in one request)
curl -X POST "https://api.apify.com/v2/acts/victorrodi~google-trends-api/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"searchTerms": ["air fryer"], "geo": "US", "timeRange": "today 5-y"}'Use Google Trends from Claude, ChatGPT, Cursor (MCP)
Option 1: google-trends-mcp (this repo, 4 focused tools)
Tool | What it returns |
| Interest over time for up to 5 terms, with average, peak, latest and growth % |
| Top and rising queries for a term, incl. "Breakout" |
| What a country searches right now, with search volume and news |
| Any number of keywords ranked on one 0-100 scale |
Claude Desktop / Cursor config (needs uv):
{
"mcpServers": {
"google-trends": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Vicshock/google-trends-api", "google-trends-mcp"],
"env": { "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>" }
}
}
}Claude Code: claude mcp add google-trends -e APIFY_TOKEN=<YOUR_APIFY_TOKEN> -- uvx --from git+https://github.com/Vicshock/google-trends-api google-trends-mcp
Each tool call is capped at $0.50 (GOOGLE_TRENDS_MAX_CHARGE_USD to change it); a typical call costs under one cent.
Option 2: the Apify MCP server
{
"mcpServers": {
"apify": {
"command": "npx",
"args": ["-y", "@apify/actors-mcp-server", "--actors", "victorrodi/google-trends-api"],
"env": { "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>" }
}
}
}Then ask: "What is trending on Google in the UK right now? Use victorrodi/google-trends-api." or "Compare iphone, samsung and pixel in the US over 12 months and tell me which one is growing."
Pricing
Pay per result, platform and proxies included: about $0.0025 per result on the Apify Starter plan, less on higher plans. A 1-keyword run with all data types returns 3 results (about $0.0075). Apify gives every account monthly free credit to try it. Live prices: apify.com/victorrodi/google-trends-api.
FAQ
Is there an official Google Trends API? Google opened an alpha API to a small group of testers only. This Actor returns the same data today, with no application.
Why do values go from 0 to 100? Google Trends publishes a relative interest index, not absolute counts. Trending Now items do include the approximate search volume shown by Google.
Can I compare more than 5 keywords? Yes: set keywordRanking: true. Terms are queried in batches sharing an anchor term and rescaled onto one scale.
Can I schedule daily Google Trends reports? Yes: save the input as an Apify Task, add a Schedule, and send the dataset to Google Sheets, Slack, Make, Zapier or n8n.
Is it legal? The Actor collects public, aggregated, anonymous statistics, no personal data. Check that your use complies with the Google terms and your local laws.
Links
Actor page: https://apify.com/victorrodi/google-trends-api
Docs website: https://vicshock.github.io/google-trends-api/
Issues and feature requests: open an issue here or on the Actor page.
License: MIT (examples and docs in this repository).
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Trends for agents: interest over time, by region, rising queries, Trending Now. No API key.
Google Trends: Search, Images, News, Shopping over time, growth metrics. Free key at trendsmcp.ai
Google Trends for agents: trend verdict, stats, rising queries, regions, trending now.
Google Trends for agents: trend verdict, stats, rising queries, regions, trending now.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides AI agents with real-time social trends, cross-platform sentiment, viral content velocity, and brand mentions from Reddit, Hacker News, and Google Trends.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Google Trends data for comparing keywords, discovering trending searches, and analyzing regional interest through natural language.2MIT
- AlicenseBqualityDmaintenanceEnables Claude to query Google Trends data such as keyword interest, related queries, and regional popularity, with robust proxy rotation to bypass Google's anti-bot measures.553 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query Google Trends data, including search interest over time, regional breakdowns, trending searches, and keyword ideas.MIT