Google Trends MCP Server
This server provides one read-only Google Trends tool that returns structured JSON for interest over time, regional interest, and related queries/topics.
Pull interest-over-time series for up to 5 comma-separated terms.
Get interest by region at country, subregion, metro, or city granularity.
Fetch rising and top related queries for a single term.
Fetch rising and top related topics for a single term.
Target locations worldwide or by geo codes such as
USorUS-CA.Set date ranges from the past hour to all of Trends history, or custom ranges.
Narrow results by category or Google property: web, images, news, Shopping (
froogle), or YouTube.Adjust time-zone offset for bucketing hourly data.
Compare multiple terms in
timeseriesandgeoMap;relatedTopicsandrelatedQueriesaccept only one term.Receive structured JSON with pre-parsed values and request metadata.
Provides access to Google Trends data, enabling agents to retrieve interest over time, interest by region, and related queries and topics for search terms, with support for date ranges, geography, categories, and property filters.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Trends MCP ServerChart interest in "cold brew coffee" in the US over the last 12 months."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Trends MCP Server
A hosted Model Context Protocol (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 200 Google Trends calls.
https://mcp.hasdata.com/api/mcp?apis=google_trends
Contents
Related MCP server: HasData MCP Server
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 200 calls a month at the 5-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.
Field | Value |
URL |
|
Transport | HTTP, streamable |
Auth header |
|
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
claude mcp add --transport http google-trends "https://mcp.hasdata.com/api/mcp?apis=google_trends" \
--header "x-api-key: HASDATA_API_KEY"Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/api/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:
{
"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:
{
"mcpServers": {
"google-trends": {
"command": "uvx",
"args": ["hasdata-google-trends-mcp"],
"env": { "HASDATA_API_KEY": "YOUR_KEY" }
}
}
}~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
{
"mcpServers": {
"google-trends": {
"url": "https://mcp.hasdata.com/api/mcp?apis=google_trends",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
{
"mcpServers": {
"google-trends": {
"serverUrl": "https://mcp.hasdata.com/api/mcp?apis=google_trends",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}.vscode/mcp.json in the workspace:
{
"servers": {
"google-trends": {
"type": "http",
"url": "https://mcp.hasdata.com/api/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 5 credits.
Chart interest in "cold brew coffee" in the US over the past 12 months and tell me which weeks it peaked.
One call, 5 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, 5 credits.
Compare interest in "cold brew" against "iced coffee" worldwide over five years and say which one is growing.
One call, 5 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, 5 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
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.
Parameter | Type | Required | Notes |
| string | yes | The search term. |
| string |
| |
| string | A window such as | |
| string | A location code such as | |
| string | Granularity for | |
| string | Category id to narrow the term. | |
| string | The Google property: | |
| number | Time-zone offset in minutes, default |
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.
{
"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.
{
"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.
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 the platform rejects returns 400 with requestMetadata.status set to error. An unknown geo or cat value is the usual way to see this.
Results that carry data also carry a requestMetadata.id worth quoting in support.
Pricing, free tier and limits
Every Google Trends call costs 5 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 200 Google Trends calls. It renews with the billing cycle, so a low-volume agent runs on the free tier indefinitely.
Paid plans start at $49 a month for 200,000 credits, which is 40,000 calls. The unit price falls with volume, from $1.23 per 1,000 calls on the entry plan to $0.50 on Business, $0.42 on Growth and $0.37 on the largest high-volume plans.
Your plan also sets concurrency. The free tier allows 1 request at a time, Startup 15, Business 30, Growth 50, and the high-volume plans run from 200 to 1,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 YouTubeThe 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 / DIY | This server | |
Official support | None, Google ships no Trends API | Maintained schema over the same data |
Rate limits and 429s | Frequent and yours to manage | Handled behind the endpoint |
Output | Pandas frames or raw payloads to reshape | Structured JSON, values pre-parsed |
Setup | A Python environment and upkeep as it breaks | One key and one URL |
Cost | Free, when it works | Paid past the free tier, 5 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 builder | |
Server documentation | |
All 57 tools in one server | |
Client walkthroughs | |
Everything else we scrape | |
Plans and credit costs | |
Keys and usage | |
Node launcher on npm | |
Python launcher on PyPI |
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 5 credits, which is the price of a canary that can fail for the right reason.
# macOS and Linux
HASDATA_API_KEY=your_key_here npm test
# Windows PowerShell
$env:HASDATA_API_KEY="your_key_here"; npm testThe 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.
Available Tools
1 toolhasdata_google_trends_search_getTrendsDatagoogle_trends_search: GET /AInspect
Get Google Trends Data
Pulls Google Trends data for one or more queries with geo targeting, region granularity (country/subregion/metro/city), date range, category, time zone, Google property (web, images, news, shopping, YouTube), and dataType (timeseries, geoMap, relatedTopics, relatedQueries). Returns interest-over-time series, geo-level breakdowns, and rising/top related topics/queries with relative scores. Use for keyword/content strategy, demand forecasting, seasonality analysis, topic discovery, campaign timing, and adding live-trend signals to marketing or research agents.
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Specify the search term for which you want to retrieve trends data. | |
| tz | No | Defines a time zone offset in minutes. The default value is 420 (Pacific Daylight Time (PDT): UTC-7). The valid range for this parameter is from -1439 to 1439. To calculate the `tz` value for a specific time zone, you can use the time difference between UTC +0 and the desired time zone. Examples: - `420`: Pacific Daylight Time (PDT) - `60`: Central European Time (CET) - `-540`: Japan Standard Time | |
| cat | No | Category of the search term. The default value is 0 ("All categories"). Provide one exact documented value (1133 allowed), e.g. `0`, `3`. | |
| geo | No | Specifies the location for the search. Defaults to Worldwide if not set or empty. Provide one exact documented value (3517 allowed), e.g. `AF`, `AF-BDS`. | |
| date | No | Defines a date range for the search. Available options: - `now 1-H`: Past hour - `now 4-H`: Past 4 hours - `now 1-d`: Past day - `now 7-d`: Past 7 days - `today 1-m`: Past 30 days - `today 3-m`: Past 90 days - `today 12-m`: Past 12 months - `today 5-y`: Past 5 years - `all`: 2004 - present You can also specify a custom date range using one of the following formats: - `yyyy-mm-dd yyyy-mm-dd` - (e.g. 2021-10-15 2022-05-25) for dates from 2004 to present. - `yyyy-mm-ddThh yyyy-mm-ddThh` - (e.g. 2022-05-19T10 2022-05-24T22) for dates with hours within a week range. The hours will be calculated based on the tz (time zone) parameter. | |
| gprop | No | Sorts 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 | |
| region | No | Used 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. | |
| dataType | No | Defines 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. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of explaining behavior. It implies a read-only data retrieval operation through words like 'Pulls' and 'Returns', and mentions no destructive side effects. However, it does not explicitly state that the operation is read-only, nor does it mention authentication, rate limits, or potential errors, leaving some behavioral aspects implicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose, followed by a compact summary of parameters and use cases. It avoids redundancy and stays focused, though the final list of use cases adds length without critical operational detail. Overall it is well-structured and not overly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without an output schema, the description gives a reasonable overview of expected outputs (interest-over-time series, geo-level breakdowns, related topics/queries with relative scores). It also covers parameter capabilities and domain use cases. It does not describe response formats, pagination, or error conditions, but given the tool's complexity and lack of output schema, the description is fairly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All eight parameters have detailed descriptions, covering defaults, allowed values, and format examples. The q parameter is described as a singular 'search term' while the main description says 'one or more queries', leaving ambiguity about how to pass multiple terms. Most other parameters are very well explained, but this minor gap prevents a perfect score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves Google Trends data, enumerates the key parameters (geo, region, date, category, time zone, property, dataType), and distinguishes it from sibling tools by focusing specifically on Trends. The verb 'Pulls' and the listed outputs make the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases such as keyword/content strategy, demand forecasting, seasonality analysis, and topic discovery, which strongly signal when an agent should select this tool. It does not explicitly mention when not to use it or point to alternatives, but given there is no other Google Trends sibling tool, the guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
hasdata_google_trends_search_getTrendsData
TDQS
Scored across 1 tool
With only a single tool, there is no risk of overlapping purposes or misselection. The single tool's scope and parameters are clearly described, making the tool's purpose immediately identifiable.
The tool name combines snake_case and camelCase ('getTrendsData') with a vendor-specific prefix, so the naming style is internally inconsistent. With only one tool, there is no broader pattern for the server to enforce.
One tool for a specialized Google Trends server is borderline. The tool is very broad and covers multiple data types, so it is usable, but it places a large command surface into a single entry point that might be easier to split into multiple focused tools.
The tool covers the full Google Trends feature set: timeseries, geo maps, related topics/queries, various filters, and property selection. No obvious major gap in the domain space.
Maintenance
Related MCP Connectors
Google Trends: Search, Images, News, Shopping over time, growth metrics. Free key at trendsmcp.ai
Trend data from Google, TikTok, Amazon, Reddit, YouTube, Steam, npm and more as JSON
Trend data from Google Trends, YouTube, TikTok, Reddit, Amazon, Wikipedia, npm, Steam and more
Google Trends search interest over time with growth metrics. Free key at trendsapi.ai
Related MCP Servers
- AlicenseAqualityAmaintenanceA Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.320,256 PyPI1,460MIT

HasData MCP Serverofficial
AlicenseAqualityAmaintenanceDirect access to 40+ scraping and search tools. Extract structured data from Google (Search, Maps, Trends), Amazon, Airbnb, Social Media, and any web page directly into your AI agent.8636MIT- AlicenseBqualityFmaintenanceProvides access to Google Trends data including status, trending questions, and trending topics via MCP tools.324 npm28MIT
- AlicenseNot gradedqualityBmaintenanceProvides Google Search trend data as an MCP tool, with historical series, growth percentages, and live trending searches, no scraping or rate limits.1MIT