
Google Trends
io.github.mamrrezv0.1.1更新于 Oct 2, 2026
Google Trends: Trending Now, interest over time, regions, related searches. No API key.
概览
让助手查询 Google Trends 的热门搜索、随时间变化的关注度、地区分布、相关查询和季节性分析。
- 功能
- 提供 32 个基于 Google Trends 数据的工具:带搜索量和分类的热门榜、最多五个词的关注度趋势、按国家/地区/城市/都会区划分的关注度、相关查询和主题,以及动量、季节性、搜索份额、突增和每日历史等分析工具。还可将热门榜快照保存到本地 SQLite 文件,并提供关注列表和只读 SQL 查询。结果以表格和标注过的指数值返回,而不是图表。
- 适用场景
- 适合让助手研究搜索需求、比较品牌或关键词、规划季节性内容,或查看某国的热门话题,而无需打开 Trends 网站。适用于需要趋势方向或地区关注度的营销、内容和市场调研问题。
- 运行要求
- 以 PyPI 包 gtrends-mcp-full 通过 stdio 在本地运行,用 uvx 启动,需要 Python 3.10 或更高版本以及 uv(或 pip)。不需要 API 密钥、账号或登录。可选设置包括 GTRENDS_GEO、GTRENDS_HL、GTRENDS_TIMEZONE、GTRENDS_PROXY 和 GTRENDS_COOKIE;除非设置 GTRENDS_OFFLINE,否则需要访问 Google Trends 端点的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Google Trends,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[Google Trends MCP Server — works with Claude, ChatGPT Codex, Cursor, VS Code and Windsurf]
Google Trends MCP Server — gtrends-mcp-full
The complete MCP server for Google Trends. Ask Claude, Cursor, Windsurf, VS Code, Codex or any other MCP client what people are searching, where, when, and what is taking off right now — and get analysis back, not a chart to squint at.
32 tools · Trending Now with real search volumes · interest over time, by region and related searches · seasonality, momentum and share of search · no API key, no browser, no sign-in.
[PyPI] [CI] [Python 3.10+] [MCP SDK 2.x] [License: MIT]
Project page · Quick start · Tools · Prompts · Configuration · How it stays unblocked · FAQ · Docs
What you get
Works with: Claude Desktop · Claude Code · Cursor · Windsurf · VS Code (Copilot agent mode) · OpenAI Codex CLI · any MCP client over stdio or HTTP.
Tools
32 tools in 5 groups. You don't call them yourself — ask in plain language and your AI picks the right one.
🗄️ works on the local data file, no request to Google
🔥 Trending now
🔎 Explore a keyword
🧠 Analysis
🗄️ History that Google does not keep
🧭 Lookups and utilities
The full reference with every parameter is in docs/tools.md — generated from the code, so it is never out of date.
Prompts
Four ready-made workflows that appear in your client's prompt menu. Each chains several tools and says what the finished answer must contain.
Two reference pages are also exposed as MCP resources: gtrends://guide (how to read the numbers, time ranges, operators, topics) and gtrends://trending-categories.
Quick start
You need Python 3.10 or newer and uv (or pip).
1. Add it to your client
Nothing to download first: uvx fetches the package from PyPI and runs it.
Claude Code
Claude Desktop, Cursor, Windsurf, VS Code — add this to the client's MCP configuration:
Both env entries are optional. There is nothing else to configure: no key, no sign-in.
2. Check it
doctor asks every Google Trends endpoint one question; all eight should say OK. On the very first run a chart endpoint may report that the session is still being validated — that passes after a minute and a half and does not come back.
3. Ask
What's trending in the US right now, and which of it is about technology? Is "heat pump" growing in the UK? When does it peak? Rank these 15 car brands by search interest in Germany. What is Toyota's share of search against Honda and Ford this year?
From the command line
With the package installed (uv tool install gtrends-mcp-full or pip install gtrends-mcp-full):
Keep a trending history by scheduling the snapshot, for example every six hours:
Reading the numbers
Everything Google Trends returns is an index from 0 to 100, not a search count: the share of all searches a term had, rescaled so the highest point in that one request is 100. Three things follow, and the tools are built around them:
- Only terms in the same request are comparable.
compare_many,share_of_search,compare_periodsandcompare_locationsbuild one scale for you. - Across places it is a share of local searches. A small country can outrank a large one.
- The last point of a range is usually incomplete. It is marked, and left out of averages.
The exception is Trending Now, which carries real — bucketed — search volumes ("200K+").
A search term is matched literally. To count two wordings as one, join them in a single term with + (e-mail + email); for the name of a thing, find_topic gives a topic id that Google resolves across languages and spellings.
Configuration
Every setting is optional.
How it stays unblocked
Google Trends has no public API for general use, so this server speaks to the same endpoints as the Trends website. Those endpoints are rate-limited and unforgiving of scripts that behave like scripts. What the server does about it:
- One long-lived session. Google refuses the chart endpoints without its session cookie, and turns away a cookie it has only just issued for the first minute and a half. The server fetches one cookie when it starts, lets it mature in the background, stores it, and reuses it on every later run. The endpoints that work without a cookie — Trending Now, the feed, lookups — never wait for it.
- Pacing. Requests are spaced: 1.5 s by default, 2 s for charts, and 6 s between two related-searches requests, the touchiest endpoint. After a refusal the gap widens for five minutes.
- Back-off, then silence. A real rate limit is retried a few times with growing delays. If it persists, the server stops asking that group of endpoints for a few minutes instead of making the block worse — the other groups keep working.
- A cache with a fallback. Every answer is stored. Ask twice, one request. When Google refuses, an older answer is served and labelled with its age.
- Fewer requests by design. One chart request can carry five terms; a second chart for the same question reuses the first one's tokens.
- A time budget. A tool call reports back within the budget with what it has, naming what is missing, rather than hanging your client.
check_endpoints (or gtrends-mcp-full doctor) tells you at any moment which endpoints answer, and whether a failure is a rate limit, a changed endpoint or the network.
FAQ
Is this the official Google Trends API?
No. Google announced an official API in 2025, but it is a closed alpha for approved testers. This server uses the endpoints behind the Trends website, which need no key. They are undocumented and can change; when one does, check_endpoints says which, and the fix is a package update.
Do I need a Google account?
No. One tool, related_topics, returns an empty list to anonymous sessions — Google withholds it — and says so. Supplying a signed-in cookie unlocks it; everything else works without.
Can it give me search volumes? Trending Now carries real volumes, in buckets (2K+, 200K+). Everything else is the 0–100 index, which measures relative interest. No tool pretends otherwise.
I asked for the same thing twice and one number moved by a point. Google Trends is computed from a sample of searches, so repeated requests can differ slightly. The cache returns the same answer within its lifetime.
A tool says Google is rate-limiting.
Wait a few minutes; cached answers keep working. If it happens often, ask for several keywords in one call instead of one call each, raise GTRENDS_MIN_INTERVAL, or set GTRENDS_PROXY.
A tool says the session is still being validated. That is the first ninety seconds after the very first start. Trending tools work in the meantime, and it does not happen again: the session is stored.
Why does a small country outrank a big one? Because the index is a share of that place's own searches, not a count.
Where is my data?
In one SQLite file on your machine (~/.config/gtrends-mcp-full/trends.sqlite): cached answers, the Trending Now snapshots you saved, and your watchlist. Nothing is sent anywhere except the requests to Google Trends.
Development
See CONTRIBUTING.md and CHANGELOG.md.
Related
- gsc-mcp-full — the companion Google Search Console MCP server: 37 tools, every API endpoint, hourly data and history beyond 16 months.
License
MIT. Not affiliated with or endorsed by Google. Google Trends is a trademark of Google LLC. Use of Google Trends data is subject to Google's terms of service.
来源:README.md,提交 f0732a2
工具
0版本历史
1- v0.1.1最新Oct 2, 2026


