Connect Claude to Google Trends with Apify MCP

Краткое содержание

Pixel’s announcement explains how to connect Claude to Google Trends through the Apify MCP server, limiting access to a specific scraper. It covers setup for Claude Code and other clients, OAuth or API token authentication, available tools, and how to retrieve scraper results for queries such as US interest in AI agents.

DEV Community

Give Claude access to Google Trends with the Apify MCP server

I wanted Claude to answer questions like "is interest in pickleball still growing, and where?" with real Google Trends data instead of a guess. The Apify MCP server can expose a single scraper as a tool, so the agent can call it directly. Disclosure: I built the scraper used here (Google Trends Scraper on Apify). It is a paid tool with a free monthly allowance. 1. Add the MCP server, limited to one scraper The Apify MCP server is at https://mcp.apify.com. The tools query parameter limits which Actors the agent can see. Here it is only the Google Trends scraper. Claude Code: claude mcp add --transport http google-trends "https://mcp.apify.com/?tools=krammer/google-trends-scraper"
Claude Desktop, Cursor and other clients (JSON config): {
"mcpServers": {
"google-trends": {
"url": "https://mcp.apify.com/?tools=krammer/google-trends-scraper"
}
}
}
On the first connection your browser opens so you can sign in to Apify and approve access (OAuth). If your client cannot do OAuth, add an Authorization: Bearer header instead. The token is in Apify Console under API & Integrations. 2. What the agent sees With that URL, the server exposed these tools when I tested it (Apify MCP server 0.21.10): krammer--google-trends-scraper: runs the scraper and returns a run summary get-dataset-items: reads the results, with a fields filter get-actor-run, get-key-value-store-record, abort-actor-run: run helpers The scraper tool takes the same input as the Actor: searchTerms, geo, timeRange, isMultiple for comparisons, and mode: "trending" with trendingGeos for trending searches. 3. What a call looks like I called the tool with: {"searchTerms": ["ai agents"], "geo": "US", "timeRange": "today 3-m"}
It took about 29 seconds. The tool did not return the data itself. It returned a run summary and this hint (shortened): SUCCEEDED in 27.916s. 1 item ...
Use get-dataset-items with datasetId=... Full output is ~92890 bytes.
Fetching all may exceed context; narrow with fields= or page with offset.
One search term is about 90 KB of JSON, because it includes 200 cities and 210 metro areas. So the agent should ask only for the fields it needs. With fields: "relatedQueries_top" the response was about 3.6 KB: best ai agents 100
what are ai agents 53
ai agent 49
claude agents 25
free ai agents 24
4. Prompts that work well Tell the agent which field to read. For example: "Use the Google Trends tool for 'pickleball' in the US over the past 12 months. Read only interestBySubregion and list the top 5 states." "Compare 'iphone,samsung galaxy,google pixel' with isMultiple: true in the US. Read only interestOverTime_timelineData and tell me which one grew the most." "Get today's trending searches for the US with mode: trending. List the titles and traffic." Useful field names: Question Field Is interest going up or down? interestOverTime_timelineData Where is it popular? interestBySubregion, interestByCity, interestByMetro; interestBy for worldwide What else do people search? relatedQueries_top, relatedQueries_rising Cost and limits You pay per search term that returns data ($0.0048 on the Apify Free plan). Terms with no data are free. Free Apify accounts can use up to $1.00 of this scraper per month. Each term takes about 8 seconds of scraping, plus run start-up. Related topics are not returned. If Google limits requests, the run stops and the remaining terms are not charged. Try again about 10 minutes later. The same setup works with any Apify Actor. Change the tools parameter to give the agent a different scraper.
Connect Claude to Google Trends with Apify MCP
Powered by Readybot.io

Последнее от Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …

Why a Java HPA Got Stuck at 20 Kubernetes Pods

Pixel shares how a Spring Boot pricing service autoscaled to 20 Kubernetes pods and stayed there because the JVM retained committed heap memory after traffic …