HasData Google Trends

com.hasdata由 hasdata.com 發布官方發布者v1.0.7更新於 Oct 24, 2026

Google Trends interest over time, by region, and related queries and topics, as JSON.

發布方自己的服務:HasData Airbnb

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取資料與分析

概覽

AI 產生的概覽

由 HasData 託管的 Google Trends 伺服器,提供一個工具,讓助理以 JSON 取得隨時間變化的關注度、地區分布以及相關查詢與主題。

可以做什麼
  • 透過單一唯讀工具取得一個或多個搜尋詞的 Google Trends 資料。
  • 取得關注度隨時間變化的序列,可用逗號分隔最多比較五個詞。
  • 依國家、次區域、都會區或城市粒度檢視地區關注度分布。
  • 取得單一詞的上升與熱門相關查詢及相關主題。
  • 以資源形式讀取 geo、region、dataType、類別與 Google 屬性的固定值清單,另有一個現成提示詞。
適用情境
適合需要關鍵字趨勢或季節性訊號的情境,例如比較多個詞的需求、觀察地區關注度差異、找出上升的相關搜尋。也適合想要穩定 JSON 結構、不想自行維護擷取程式的代理與流程。
執行需求
需要 HasData API 金鑰:遠端端點透過 x-api-key 標頭提供,npm 或 PyPI 的 stdio 啟動器則透過環境變數 HASDATA_API_KEY 提供。npm 啟動器需要 Node.js,PyPI 啟動器需要 uv。需要能連線至託管端點的網路。
安裝前請注意
每次成功呼叫消耗 10 點額度;免費額度為每月 1,000 點,付費方案每月 59 美元起。金鑰錯誤不會在連線時顯示,而是在第一次工具呼叫時以錯誤回傳。查詢詞會傳送給第三方服務 HasData,README 也提醒平台條款可能限制自動化存取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 HasData Google Trends,將其新增到工作區。
  2. 連接 x-api-key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.hasdata%2Fgoogle-trends/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "hasdata-google-trends": {
      "type": "http",
      "url": "https://mcp.hasdata.com/mcp?apis=google_trends",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

Google Trends MCP Server

A hosted Google Trends MCP server that gives Claude, Cursor, Windsurf and any other MCP client one Google Trends tool. Pull interest over time, interest by region, and the rising and top related queries and topics for any term, all as structured JSON, with no scraping library to keep alive and no Google account.

1,000 free credits every month, no card required, which is 100 Google Trends calls.

https://mcp.hasdata.com/mcp?apis=google_trends

[Glama score] [tool contract] [MCP] [Tools]

Contents

What you need

An MCP client and a HasData API key from the dashboard, free to create with no card, and the free tier covers about 100 calls a month at the 10-credit rate. This is a remote server, so the simplest path is a URL and an x-api-key header, with no container to run and no Google account anywhere in the flow. A client that only speaks stdio reaches it through a thin launcher, published as @hasdata/google-trends-mcp on npm and hasdata-google-trends-mcp on PyPI, shown below.

Quick start

The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.

FieldValue
URLhttps://mcp.hasdata.com/mcp?apis=google_trends
TransportHTTP, streamable
Auth headerx-api-key: HASDATA_API_KEY

Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.

Claude Code
bash
claude mcp add --transport http google-trends "https://mcp.hasdata.com/mcp?apis=google_trends" \  --header "x-api-key: HASDATA_API_KEY"
Claude Desktop

Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/mcp?apis=google_trends and sign in.

For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/google-trends-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:

json
{  "mcpServers": {    "google-trends": {      "command": "npx",      "args": ["-y", "@hasdata/google-trends-mcp"],      "env": { "HASDATA_API_KEY": "YOUR_KEY" }    }  }}

For Python instead of Node, swap the launcher for the PyPI package, which uvx runs without a manual install:

json
{  "mcpServers": {    "google-trends": {      "command": "uvx",      "args": ["hasdata-google-trends-mcp"],      "env": { "HASDATA_API_KEY": "YOUR_KEY" }    }  }}
Cursor

~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:

json
{  "mcpServers": {    "google-trends": {      "url": "https://mcp.hasdata.com/mcp?apis=google_trends",      "headers": { "x-api-key": "HASDATA_API_KEY" }    }  }}
Windsurf

~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:

json
{  "mcpServers": {    "google-trends": {      "serverUrl": "https://mcp.hasdata.com/mcp?apis=google_trends",      "headers": { "x-api-key": "HASDATA_API_KEY" }    }  }}
VS Code

.vscode/mcp.json in the workspace:

json
{  "servers": {    "google-trends": {      "type": "http",      "url": "https://mcp.hasdata.com/mcp?apis=google_trends",      "headers": { "x-api-key": "HASDATA_API_KEY" }    }  }}

Example prompts

Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because every successful call costs 10 credits.

Chart interest in "cold brew coffee" in the US over the past 12 months and tell me which weeks it peaked.

One call, 10 credits. The weekly series comes back in a single request.

For "cold brew coffee" in the US, give me the rising related queries and flag the ones marked Breakout.

One call, 10 credits.

Compare interest in "cold brew" against "iced coffee" worldwide over five years and say which one is growing.

One call, 10 credits. The tool takes several terms in one timeseries request.

Show me interest in "sunscreen" by US state over the past 90 days so I can see where demand is highest.

One call, 10 credits. This is the interest-by-region view at state granularity.

A comparison across terms rides in one timeseries call. Region breakdowns, related queries and related topics are each their own dataType, so a prompt that wants a chart plus its rising queries is two calls.

Tools

ToolWhat it returns
hasdata_google_trends_search_getTrendsDataInterest-over-time series, geo-level breakdowns, and rising/top related topics/queries with relative scores. 10 credits a call

One tool, read-only. The sample below is trimmed from a real call, and the numbers move as the trend moves. Read it as a shape. The tool name links to its endpoint reference, which carries the full parameter list.

The sample is the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.

Get Google Trends data

hasdata_google_trends_search_getTrendsData

Interest over time, by region, or the related queries and topics for a term.

ParameterTypeRequiredNotes
qstringyesThe search term. timeseries and geoMap take up to 5 comma-separated terms to compare, and a sixth is rejected with a 400
dataTypestringtimeseries by default, plus geoMap, relatedTopics and relatedQueries. The two related types take a single term only
datestringA window such as now 7-d, today 12-m, today 5-y or all, or a custom yyyy-mm-dd yyyy-mm-dd range
geostringA location code such as US or US-CA. Worldwide when empty
regionstringGranularity for geoMap only: country, region (subregion), dma (metro) or city. The default depends on geo, country worldwide and finer once a geo is set
catstringCategory id to narrow the term. 0 is all categories
gpropstringThe Google property: images, news, froogle (Shopping) or youtube. Web search when empty
tznumberTime-zone offset in minutes, default 420 (PDT). Shifts how hourly ranges are bucketed

The response key depends on dataType. timeseries returns interestOverTime.timelineData, geoMap returns interest by region, and the related types return relatedQueries or relatedTopics, each split into rising and top. Read the key that matches the type you asked for.

timeseries (the default) returns a value from 0 to 100 for each point, both as a string and pre-parsed in extractedValue. The most recent point often carries isPartial: true, meaning the week is still filling in. Drop it before you compute a trend, or the last bar reads as a dip that is not real.

json
{  "interestOverTime": {    "timelineData": [      { "date": "Apr 12 – 18, 2026", "timestamp": "1775952000", "isPartial": false,        "values": [{ "query": "cold brew coffee", "value": "100", "extractedValue": 100, "hasData": true }] },      { "date": "Aug 23 – 29, 2026", "timestamp": "1787443200", "isPartial": true,        "values": [{ "query": "cold brew coffee", "value": "44", "extractedValue": 44, "hasData": true }] }    ]  }}

relatedQueries splits into rising and top. A rising entry reads as a percentage like +300%, or Breakout for a jump too large to score, and extractedValue gives the number behind it. A Breakout comes back with a sentinel extractedValue well above any real percentage, so sort on the string label, not on the raw number.

json
{  "relatedQueries": {    "rising": [      { "query": "organic cold brew coffee", "value": "+300%", "extractedValue": 300, "link": "https://trends.google.com/trends/explore?q=organic+cold+brew+coffee&date=today+12-m&geo=US" }    ],    "top": [      { "query": "how to cold brew coffee", "value": "100", "extractedValue": 100, "link": "https://trends.google.com/trends/explore?q=how+to+cold+brew+coffee&date=today+12-m&geo=US" }    ]  }}

The endpoint reference lists every geo, cat and date format the tool accepts.

Prompts and resources

The server ships one prompt, a ready-made workflow a client can offer instead of making the user compose a tool call.

PromptWhat it does
google_trendsSee how interest in a topic changes over time.

Alongside them the server exposes 5 resources, one per parameter whose accepted values are a fixed list. Reading one is cheaper than learning the vocabulary from a rejected call, and it costs no credits. Each URI is hasdata://google_trends/<parameter>.

ParameterValuesWhat it selects
geo3517Specifies the location for the search. Defaults to Worldwide if not set or empty.
region4Used to get more specific results when using "Interest by region" data type. Other data types do not accept this parameter. The default value depends on the geo location that is set. Available options: - country: Country - region: Subregion - dma: Metro - city: City Note: Not all region options will return results for every geo location.
dataType4Defines the type of search to perform. Available options: - timeseries: Interest over time (default). Accepts both single and multiple queries per search. - geoMap: Interest by region. Accepts both single and multiple queries per search. - relatedTopics: Related topics. Accepts only single query per search. - relatedQueries: Related queries. Accepts only single query per search.
cat1133Category of the search term. The default value is 0 ("All categories").
gprop4Sorts results by a specific property. The default property is Web Search (applied when the gprop parameter is not set or empty). Available options: - images: Image Search - news: News Search - froogle: Google Shopping - youtube: YouTube Search

Both lists are served without an API key, so a client can read them before a user has signed up.

Errors and failure paths

Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with isError set to true and the reason as text. The agent reads a message where you might expect a status line.

A wrong key surfaces as tool output, not as a failed connection. tools/list accepts any non-empty key and returns the tool, so the client completes its handshake and shows green. The first tool call then comes back with isError: true and the text HasData API error: 401 Unauthorized. Watch for that string, because nothing earlier in the flow reports the problem.

A missing key is the one real HTTP error. Authorization runs before any tool, and the connection itself fails with 401. CORS headers are present, and a browser client reads the status and not an opaque network failure.

An argument that breaks the tool's schema is rejected before it becomes a scrape. The server answers with isError: true and the text MCP error -32602: Input validation error, naming the offending field. Nothing is fetched and nothing is charged.

A term with too little search volume returns a successful result with the data arrays empty, not an error. Google Trends has nothing to show for a rare term, and requestMetadata.status still reads ok. Test for the points before you chart them.

An identifier outside the documented list is refused before the scrape. geo and cat are enums, so an unknown value comes back as a 422 naming the field and listing the accepted choices rather than as a silent miss.

Results that carry data also carry a requestMetadata.id worth quoting in support.

Pricing, free tier and limits

Every Google Trends call costs 10 credits per successful call. Response size does not change the price. A five-year weekly series costs the same as a single week.

The free tier is 1,000 credits every month with no card, which is 100 Google Trends calls. It renews with the billing cycle, so a low-volume agent runs on the free tier indefinitely.

Paid plans start at $59 a month for 200,000 credits, which is 20,000 calls. The unit price falls with volume, from $1.48 per 1,000 calls on the entry plan to $0.60 on Basic and $0.41 across the Growth tiers. Current figures live on the pricing page.

Your plan also sets concurrency. The free tier allows 5 requests at a time, Startup 5, Basic 15, and the Growth tiers run from 50 to 500. Handle the overflow case defensively in anything unattended.

A request that comes back non-200 is not billed. A successful call that finds nothing is still a call.

Tool selection

The apis query parameter decides which tools your agent sees. Fewer tools means less context spent on tool definitions, and fewer chances for the model to reach for the wrong one.

?apis=google_trends              the one tool in this repo?apis=google_trends,google_serp  add Google search?apis=google_trends,youtube      trends plus YouTube

The parameter takes provider names like google_trends and individual API names. Misspelled names are ignored. If every name is wrong the request fails with 400, and the body lists both what it did not recognise and every valid value. Drop the parameter and the same endpoint exposes all 57 HasData tools.

How it compares

Google does not publish a public Trends API. The two common routes are the unofficial pytrends library, which reverse-engineers the same internal endpoints and breaks when Google changes them or rate-limits the caller, and rolling your own scraper. This server does that work behind a stable schema.

pytrends / DIYThis server
Official supportNone, Google ships no Trends APIMaintained schema over the same data
Rate limits and 429sFrequent and yours to manageHandled behind the endpoint
OutputPandas frames or raw payloads to reshapeStructured JSON, values pre-parsed
SetupA Python environment and upkeep as it breaksOne key and one URL
CostFree, when it worksPaid past the free tier, 10 credits a call

If you already run pytrends at low volume and do not mind fixing it when it breaks, that stays the free answer. This server is for agents and pipelines that need the data to arrive the same shape every time.

FAQ

Is there an official Google Trends API?

No. Google has never shipped a public Trends API. Every option reads the same internal endpoints that the trends.google.com site uses. This one is maintained by HasData and returns the result as structured JSON.

What is a Google Trends MCP server?

A server that exposes Google Trends as a tool an AI client can call. The client sends a tool call over the Model Context Protocol, the server fetches the data and returns structured JSON, and the model works with the result. This one exposes a single tool and runs remotely, so the client connects to a URL and starts no local process.

Do the numbers mean absolute search volume?

No, and neither does Google Trends itself. The values are relative interest scaled 0 to 100 within the query, window and region you asked for. Use them for shape and comparison, not as a count of searches.

Why is the last data point lower than the rest?

The most recent bucket is usually still filling in and comes back with isPartial: true. Drop it before computing a trend.

Can I compare several terms at once?

Yes, in timeseries and geoMap. Pass the terms comma-separated in q. The related-query and related-topic types take a single term.

Can I use this together with other HasData APIs?

Yes. The apis parameter takes a list, and ?apis=google_trends,google_serp gives your agent Trends plus Google search. Drop the parameter and you get everything.

Compliance and personal data

HasData accesses publicly available data only. A platform's terms may restrict automated access, and you are responsible for your own compliance.

HasData links

Product page and request builderGoogle Trends API
Server documentationMCP server docs
Every HasData tool in one serverHasData/hasdata-mcp
Client walkthroughsMCP clients and integrations
Everything else we scrapeGoogle Trends API and 54 more
Plans and credit costsPlans and credit costs
Keys and usageHasData dashboard
Node launcher on npm@hasdata/google-trends-mcp
Python launcher on PyPIhasdata-google-trends-mcp

Development

This repository is configuration and documentation for a remote server. There is no build step and nothing to containerize.

The tests in test/ assert the tool contract, the part that can break without a commit here. They check that ?apis=google_trends returns exactly one tool, that it still declares its required parameter, that the name has not changed, and that the key in use is actually accepted. That last check calls the tool for real and costs 10 credits, which is the price of a canary that can fail for the right reason.

bash
# macOS and LinuxHASDATA_API_KEY=your_key_here npm test
# Windows PowerShell$env:HASDATA_API_KEY="your_key_here"; npm test

The same suite runs in CI on every push and once a week on a schedule, because the upstream tool list can change without anyone touching this repository. A failure means the tool list moved, the key stopped working, or the endpoint was unreachable, and the assertion message says which.

Contributing

Corrections to the parameter table and the response sample are the most useful contribution, because those are the parts that drift. Include the call you made and the response you got. Pull requests from forks run the suite without a key, and the live checks skip instead of going red.

License

MIT. See LICENSE.

來源:README.md,提交 95241b6

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

3
  1. v1.0.7最新Sep 24, 2026
  2. v1.0.6Sep 22, 2026
  3. v1.0.5Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Hasdata 整合