
Google Trends Scraper
io.github.RalfIJPublished by GitHub account RalfIJv1.0.0Updated Oct 24, 2026
Google Trends for any number of keywords on one scale: interest over time, regions, rising queries.
Overview
A hosted Apify MCP server that fetches Google Trends data for keywords, including interest over time, regional interest and related queries.
- What you can do
- Retrieve Google Trends data for one or many keywords on a shared scale, including interest over time and interest by region, with the unfinished last period marked partial. Get top and rising related queries, including breakouts. Obtain computed metrics such as average, latest and peak interest, peak date, trend direction and change percent, busiest month, and share of search when comparing keywords. Compare more keywords than Google's own limit by chaining groups of five through their leaders and rescaling the results.
- When to use it
- Useful when you want an assistant to look up search-interest trends, compare several keywords on one scale, or pull regional and related-query data without writing scraping code or dealing with Google's rate limits and session cookies.
- Requirements
- A remote MCP endpoint at mcp.apify.com, added with the tools parameter for this scraper. An Apify account and either OAuth sign-in or an Apify API token sent in the Authorization header. Network access to Apify.
Installation
In SourceWeft
- Open Google Trends Scraper in the dashboard and add it to a workspace.
- Connect the required credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.RalfIJ%2Fgoogle-trends/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.
{
"mcpServers": {
"google-trends-scraper": {
"type": "http",
"url": "https://mcp.apify.com/?tools=ralfij/google-trends-scraper"
}
}
}README
Google Trends API for Python (a pytrends alternative)
Get Google Trends data into Python: interest over time, interest by region, top and rising related searches, and simple trend metrics. You can also compare 10, 50 or 100+ keywords on one scale. The Google Trends website stops at 8 (5 in classic Explore).
pytrends was archived in April 2025 and often fails with 429 Too Many Requests. Google announced an official Trends API in July 2025, but it is an alpha with limited, application-based access. These examples use a hosted scraper instead, the Google Trends Scraper on Apify, which deals with Google's session cookies and rate limits for you.
Tutorial: Google Trends in Python without pytrends, and how to compare more keywords than Google allows. It covers the two endpoints behind the website, the trick for linking comparisons, and what the data looks like.
[Google searches for programming languages over 5 years]
Example output: search interest in the Programming category fell 40-68% for most languages between 2021 and 2026. Made with examples/compare_keywords.py and matplotlib.
Quick start
- Create a free Apify account. The free plan includes $5 of credit every month, which covers about 2,500 keywords. No credit card needed.
- Copy your API token from Settings > API & Integrations in Apify Console.
- Run an example:
Examples
sample-output/programming-languages-5y.csv shows the CSV from compare_keywords.py.
What you get per keyword
interestOverTime: the full time series (0-100), with the unfinished last week or day markedpartialinterestByRegion: countries, states or regions where the keyword is most popularrelatedQueriesTopandrelatedQueriesRising, including breakoutsaverageInterest,latestInterest,peakInterest,peakDatetrend(rising, falling or stable) andtrendChangePercent: the last quarter of the period against the first quarterbusiestMonthfor periods of about a year or longershareOfSearchwhen you compare keywords on one shared scale
How comparing many keywords works
Google's Trends API compares at most 5 keywords per request (the website shows up to 8) and scales each request so its highest point is 100. To compare more, the scraper:
- requests the keywords in groups of 5;
- compares the most searched keyword of each group (the group "leader") with the other leaders, 5 at a time with one leader of overlap, so any number of groups can be chained;
- rescales every group through its leader, then rescales everything so the highest point overall is 100.
Google rounds to whole numbers, so a tiny keyword next to a huge one can still show as 0. Compare keywords of a similar size for the best precision.
Use it from AI assistants (MCP)
To let Claude, Cursor, VS Code or another MCP client look up Google Trends for you, add this MCP server URL: https://mcp.apify.com/?tools=ralfij/google-trends-scraper. Sign in to Apify when the client asks, or send your Apify API token as Authorization: Bearer <token>. Runs are billed to your own Apify account.
Notes
- I built the Google Trends Scraper used in these examples, so keep that in mind.
raw_endpoints.pyshows how to do it yourself. - Pricing is per keyword with no subscription; see the actor page. More ready-made searches are on its example tasks.
- Not affiliated with, endorsed by or sponsored by Google. Google Trends is a trademark of Google LLC.
License
MIT
Source: README.md at commit b5380a2
Tools
0Version history
1- v1.0.0LatestOct 10, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts