
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


