Google Trends MCP Server is a hosted Model Context Protocol (MCP) server maintained by HasData that provides Claude, Cursor, Windsurf, and other MCP clients with tools to access Google Trends data. Through a single tool, it enables AI clients to retrieve, in structured JSON form, interest over time for keywords, interest by region, and rising and related queries and topics. The entire process requires no maintenance of scraping libraries and no Google account.
Purpose This server is used to integrate Google Trends data into AI workflows. Users can use natural language prompts to have AI agents automatically call tools to retrieve trend data for market analysis, content planning, demand assessment, and other scenarios. All data comes from Google Trends internal endpoints, and the server wraps them into stable schemas and returns JSON.
Main capabilities
- A single tool
hasdata_google_trends_search_getTrendsData, supporting the followingdataType:timeseries(default): returns interest over time, with values as a relative index from 0 to 100, and each data point provides both a string and a pre-parsedextractedValue. The latest point often hasisPartial: true, indicating that the week's data is not yet complete and is recommended to be discarded before calculating trends.geoMap: returns interest by region.relatedQueries: returns related queries, divided intorisingandtop。risingentries displayed as+300%orBreakoutpercentages,extractedValueprovides the corresponding numeric value, andBreakout'sextractedValueis a sentinel value and should be sorted by string label.relatedTopics: returns related topics, likewise divided intorisingandtop.
- Supports comparing multiple keywords at once in
timeseriesandgeoMap(comma-separated). - Provides 1 prompt and 5 resources; resources correspond to parameters with fixed value lists, with URI format
hasdata://google_trends/<parameter>, and can be read without an API key. - Error handling: when a tool call fails, the MCP layer returns 200 and places the error in the result, with
isErrorset to true. Common errors include invalid API key (returns 401 text), missing key (HTTP 401 connection failure), and input validation errors (MCP error -32602). Terms with too low search volume return a successful result with an empty array. Unknowngeoorcatvalues return 422 and list acceptable options.
Usage
- Requires an MCP client and a HasData API key (created for free in the HasData dashboard, no credit card required). The free tier provides 1,000 credits/month, about 100 calls.
- Remote server URL:
https://mcp.hasdata.com/mcp?apis=google_trends, pass the key via thex-api-keyrequest header. - Clients that support OAuth can be added directly as a connector and logged in.
- Clients that support only stdio can connect through a launcher:
- Claude Desktop: use
claude_desktop_config.jsonwith@hasdata/google-trends-mcp(Node) orhasdata-google-trends-mcp(Python, run with uvx). - Cursor: configure in
~/.cursor/mcp.jsonor.cursor/mcp.json. - Windsurf: use the
~/.codeium/windsurf/mcp_config.jsonfield inserverUrl. - VS Code: configure in the workspace
.vscode/mcp.json.
- Claude Desktop: use
- The
apisquery parameter can specify the exposed tools, such as?apis=google_trendsOnly expose this tool; if omitted, all 57 HasData tools are exposed; invalid names are ignored, and if all are invalid, a 400 is returned.
Use cases
- AI agents and automated pipelines need trend data in a stable format.
- Scenarios requiring Google Trends data, such as market research, content strategy, and demand analysis.
- Used in combination with other HasData APIs (such as Google SERP), via
apisparameter to specify multiple.
Limitations
- Google does not provide a public Trends API; all solutions read from the same internal endpoint.
- The data is relative interest (0-100), not absolute search volume.
- Each successful call consumes 10 credits; response size does not affect the price. The free tier allows 1 concurrent request, while paid tiers have higher concurrency (Startup 5, Basic 15, Growth 50-500).
- Non-200 responses are not billed, but successful responses with no data are still billed.
- Only public data is accessed; users must comply with the platform's terms themselves.