Google Trends API – Compare Keywords, Regions & Related Queries
Pricing
from $1.20 / 1,000 comparison groups
Google Trends API – Compare Keywords, Regions & Related Queries
Google Trends Scraper and API: compare up to 5 keywords for the price of one result. Interest over time, by country/region/city and top & rising related queries, any time range and country. Clean JSON, 6-hour cache, failed comparisons cost $0.
Pricing
from $1.20 / 1,000 comparison groups
Rating
0.0
(0)
Developer
Antonio Aleph
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Share
Google Trends Compare returns Google Trends data as clean JSON: compare up to 5 keywords per group, run several groups at once, and pick the time range, country, category and search type (web, YouTube, news, images, shopping). Optionally add interest by region and top & rising related queries.
▶️ Try it in one click: the input form is prefilled with two games (
Genshin Impact,Honkai Star Rail, worldwide, past 12 months, interest over time only). Just press Start to get one row per keyword (2 keywords in one comparison group: $0.003 on the Free plan, less on paid plans), usually within a minute. No subscription or setup: you pay once per comparison group of up to 5 keywords delivered with data; failed groups cost $0.
- 📈 Same 0–100 comparison you see on Google Trends, one row per keyword
- 🌍 Worldwide or any country / subregion (
US,KR,JP,US-CA…), past hour to 2004–present, or exact dates - ⏱️ Runs stop at a time limit you choose (default 3 minutes); unfinished groups are free. Results are cached for 6 hours
- 💸 Compare up to 5 keywords for the price of one result. Failed groups and groups without data cost nothing.
- 🤖 Predictable JSON with English field descriptions, built for AI agents, dashboards and automations
- 🐍 A pytrends alternative: the same interest over time, interest by region and related queries, without maintaining your own scraper (see Coming from pytrends? below)
This is an unofficial tool. It is not affiliated with, endorsed by, or operated by Google. It uses publicly available Google Trends data.
Sample output
{"status": "ok","requestGroupId": "8f3c2a91d04e-202610091305","keyword": "Honkai Star Rail","comparedWith": ["Genshin Impact", "Zenless Zone Zero"],"timeRange": "today 12-m","geo": "WORLDWIDE","category": { "id": 0, "name": "All categories" },"searchType": "web","granularity": "week","intervalSeconds": 604800,"timezone": "UTC","hasData": true,"averageInterest": 19,"latestPointIsPartial": true,"interestOverTime": [{ "date": "2026-09-27T00:00Z", "time": 1790467200, "formattedTime": "Sep 27 – Oct 3, 2026", "value": 10, "hasData": true, "isPartial": false },{ "date": "2026-10-04T00:00Z", "time": 1791072000, "formattedTime": "Oct 4 – 10, 2026", "value": 8, "hasData": true, "isPartial": true }],"sectionErrors": null,"fromCache": false,"fetchedAt": "2026-10-09T13:05:38+00:00","source": "Google Trends (trends.google.com)"}
With Add interest by region on, each row also gets interestByRegion (e.g. {"geoCode": "TH", "geoName": "Thailand", "value": 34}). With Add related queries on, it gets relatedQueries with top and rising lists (e.g. {"query": "how to check pity in honkai star rail", "value": 2050, "formattedValue": "+2,050%"}).
How to read the numbers
valueis not a search count. It is a relative index from 0 to 100, where 100 is the highest point of the most searched keyword within that request.- Only compare rows with the same
requestGroupId. Values from different requests are scaled differently. To compare keywords, put them in the same group (up to 5). - 0 does not always mean "no searches". It can mean Google Trends does not have enough data for that time and place.
- Values can shift slightly between runs. Google Trends is based on a sample of searches, so the same request can return slightly different numbers at different times.
- The time step changes with the time range (
granularity): minutes or hours for short ranges, days for 1–3 months, weeks for 12 months to 5 years, months for 2004–present. All dates are UTC. - The most recent step can be incomplete. Check
isPartialon each point, orlatestPointIsPartialon the row. - Interest by region is relative too: 0–100 within the chosen keywords, time range and region level.
- "Breakout" in rising related queries means growth of more than 5,000% by Google's definition.
- Results can be up to 6 hours old. Identical requests are served from a cache for 6 hours; check
fromCacheandfetchedAt.
What can you use Google Trends Compare for?
- Market and product research: compare brands, products, games or topics and see which one is growing.
- Localization and launch planning: find the countries and regions where interest is highest.
- YouTube, news and shopping trends: switch
searchTypeto measure a specific Google search. - SEO and content planning: collect top and rising related queries for content ideas.
- Dashboards: schedule daily or weekly runs with several comparison groups.
For AI agents
One call answers questions such as:
- "Is search interest in Nintendo Switch 2 rising in Japan this month?"
- "Which is searched more in Korea over the past 12 months: Genshin Impact or Honkai Star Rail?"
- "In which US states is interest in pickleball highest?"
- "What are the rising related searches for 'Steam Deck' on YouTube?"
- "How did interest in electric bikes change in Germany over the past 5 years?"
Each row is self-describing (requestGroupId, granularity, timezone, latestPointIsPartial), so an agent can tell which values may be compared and which are still incomplete.
How to use it
| Input | Example | Notes |
|---|---|---|
keywords | ["minecraft", "roblox"] | One comparison group of 1–5 terms. Duplicates (any letter case) are merged. |
keywordGroups | [["PS5", "Xbox Series X"], ["Steam Deck", "ROG Ally"]] | Extra groups, up to 10 groups per run in total |
timeRange | "today 12-m" | now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m (default), today 5-y, all |
customTimeRange | "2025-01-01 2025-12-31" | Exact dates from 2004-01-01. Overrides timeRange. |
geo | "KR", "US-CA" | Empty = worldwide |
category | "8" (Games) | Google Trends category id. 0 = all categories (default). |
searchType | "youtube" | web (default), youtube, news, images, shopping |
interestByRegion | true | Off by default |
regionResolution | "CITY" | COUNTRY, REGION, CITY, DMA (US metro areas). Default: countries worldwide, regions within a country. |
relatedQueries | true | Off by default |
maxRunSeconds | 180 | Time limit for the whole run (default 180 s, 10–3600). See below. |
Example: three consoles in Japan over the past 5 years, YouTube searches, with interest by region:
{"keywords": ["PS5", "Nintendo Switch 2", "Xbox Series X"],"timeRange": "today 5-y","geo": "JP","searchType": "youtube","interestByRegion": true}
Coming from pytrends?
pytrends, the popular unofficial Python library, was archived in April 2025 and is no longer maintained. This Actor covers its most used calls:
| pytrends | Google Trends Compare |
|---|---|
build_payload(kw_list, timeframe, geo, cat, gprop) | keywords, timeRange or customTimeRange, geo, category, searchType |
interest_over_time() | Always included: interestOverTime (one row per keyword) |
interest_by_region(resolution=...) | interestByRegion: true, regionResolution |
related_queries() | relatedQueries: true (top and rising) |
| One payload per call | Up to 10 comparison groups per run (keywordGroups) |
Python example (pip install apify-client, version 3 or later):
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("antonio_aleph/google-trends-compare").call(run_input={"keywords": ["minecraft", "roblox"],"timeRange": "today 12-m","geo": "US",})for row in client.dataset(run.default_dataset_id).iterate_items():if row["status"] == "ok":print(row["keyword"], [(p["date"][:10], p["value"]) for p in row["interestOverTime"]][-3:])else:print(row["keyword"], row["status"], row["sectionErrors"]) # not charged
Google can still rate-limit requests (HTTP 429), as it did with pytrends. Here, each request is retried automatically after 10, 30 and 60 seconds, identical requests are served from a 6-hour cache, and groups that still fail are returned with status: "failed" and are not charged.
Pricing
This Actor uses pay per event pricing, with no platform usage fee on top. You pay one Comparison group for each group of 1 to 5 keywords whose interest-over-time data was delivered: comparing 5 keywords costs the same as looking up 1. The price depends on your Apify plan:
| Apify plan | Price per comparison group (1–5 keywords) | 10 groups of 5 keywords |
|---|---|---|
| Free | $0.003 | $0.03 |
| Starter | $0.002 | $0.02 |
| Scale | $0.0015 | $0.015 |
| Business and above | $0.0012 | $0.012 |
Interest by region and related queries are included at no extra charge when you turn them on. A group in which no keyword has Google Trends data costs $0; keywords without data inside a charged group are delivered at no extra charge.
You are not charged anything for:
- a comparison group that Google Trends did not answer after the retries (
status: "failed"), - a comparison group that did not finish within
maxRunSeconds(status: "timed_out"), - groups in which no keyword has data, invalid input, or runs stopped by the safety checks below.
If an optional section (region or related queries) could not be fetched, the row is still delivered with its interest-over-time data and the missing section is listed in sectionErrors.
How long does a run take?
Data collection stops at maxRunSeconds (default: 180 seconds = 3 minutes); the whole run takes about 10 seconds more for start-up and saving. You can set it anywhere from 10 to 3,600 seconds.
- A comparison group usually takes a few seconds. In our tests, 10 groups of 5 keywords finished in about 1 minute.
- When Google rate-limits, the Actor waits and retries after 10, 30 and 60 seconds. A rate-limited group can therefore take 1–3 minutes, and with several groups the default 3-minute limit may be reached.
- When the limit is reached, every finished group is delivered and charged as usual. The group in progress is stopped, and it and the remaining groups come back as rows with
status: "timed_out", no data and no charge ($0). Run them again later, or raisemaxRunSeconds. - Turning on related queries adds one Google request per keyword, so those runs take longer.
- If you raise
maxRunSeconds, keep the run timeout in Run options above it.
Every keyword you send gets a row with a status:
status | Meaning | Charged |
|---|---|---|
ok | Data delivered | Once per group, when at least one keyword in the group has data |
failed | Google Trends kept rate-limiting this group after 3 retries | No |
timed_out | maxRunSeconds was reached before this group finished | No |
Rate limits and caching
- The Actor does not use proxies or rotate IP addresses to get around Google's limits.
- Identical requests (same keywords, time range, country, category and search type) are served from a 6-hour cache. Cached rows have
fromCache: trueand keep the originalfetchedAt. The cache is private to this Actor and holds only the request settings and the Google Trends results, never who asked. - Every run checks Google Trends' robots.txt first and stops, free of charge, if the endpoints it uses are no longer allowed.
FAQ
Can I compare more than 5 keywords? Google Trends compares at most 5 at a time. Use several groups and keep one shared "anchor" keyword in every group; compare the other keywords relative to the anchor.
Why did a group fail or time out?
failed: Google kept rate-limiting the request after three retries. timed_out: the run reached maxRunSeconds first. Neither is charged; please try those groups again a few minutes later, or raise maxRunSeconds.
What does the run status mean if Google blocks everything?
If no group returned data, the run still ends as Succeeded so that you always get one row per keyword explaining what happened: each row has status: "failed" or "timed_out", hasData: false, no Trends values and the reason in sectionErrors. Nothing is charged, and the run's status message starts with "No Google Trends data delivered". In automations, check the status of each row (or charged in the OUTPUT record) rather than the run status alone.
Found a problem or need another field? Please open an issue in the Issues tab.
Data source and attribution
- Source: Google Trends (trends.google.com), publicly available. Google Trends data is a normalized, sampled index, not absolute search volume.
- This Actor is an independent, unofficial tool and is not affiliated with Google LLC. Its name and icon do not use Google's logo.