How to scrape Google Trends data
Last updated · by Sharkinho Tools team
Recipe card
You get: Weekly interest scores, state-level interest and top/rising related queries for any keyword
- Time
- 5 minutes
- Difficulty
- Easy
- Tool
- Google Trends Scraper
Ingredients
- A list of keywords
- A country (or worldwide)
- Free Apify account or Python 3 with pytrends
Quick answer: Google Trends has no generally available public API, so you read the JSON endpoints the website uses. For a handful of keywords, the pytrends Python library still works from a home connection. For batches, schedules or anything running on a server, a hosted scraper that handles the 429 rate limits is the less painful route.
We wrote a Google Trends scraper for Apify, so we spend more time than is healthy looking at Trends responses. This page shows what the data looks like, the two ways to get it, and the quirks that will bite you either way. Everything below comes from runs on 22 November 2026 for the keyword air fryer in the US over the past 12 months.
What Google Trends data you can scrape
One run with four outputs gave us 155 rows in 7.9 seconds: 54 weekly points for the timeline, 51 regions (the 50 states plus DC) and 50 related queries (25 top, 25 rising). The related topics block came back empty, which is common right now.
Interest over time (excerpt)
| formattedTime | value | isPartial |
|---|---|---|
| Nov 16 – 22, 2025 | 58 | false |
| Dec 28, 2025 – Jan 3, 2026 | 70 | false |
| Mar 29 – Apr 4, 2026 | 77 | false |
| Apr 5 – 11, 2026 | 90 | false |
| Apr 12 – 18, 2026 | 100 | false |
| Apr 19 – 25, 2026 | 87 | false |
| Sep 20 – 26, 2026 | 51 | false |
| Nov 22 – 28, 2026 | 54 | true |
8 of 54 weekly rows. Each row also carries an ISO date, a Unix timestamp and the Google Trends URL it came from.
The spring peak surprised us. We expected Black Friday to win for a kitchen gadget, but mid-April was the top week and November never got above 69. That is the kind of thing you only learn by pulling the numbers.
Interest by region and related queries
| Region | value | Top query | value | Rising query | growth |
|---|---|---|---|---|---|
| Wyoming | 100 | air fryer chicken | 100 | best air fryer 2026 | +4,400% |
| Kansas | 37 | ninja | 58 | ninja crispi pro 6-in-1 countertop glass air fryer | +3,750% |
| Ohio | 34 | ninja air fryer | 58 | cosori dual blaze smart air fryer | +1,600% |
| Arkansas | 34 | chicken in air fryer | 57 | ninja crispi pro air fryer | +1,100% |
| Wisconsin | 34 | best air fryer | 33 | bella slim air fryer | +800% |
| Pennsylvania | 34 | air fryer potatoes | 29 | ninja 4-in-1 air fryer pro | +650% |
Three separate lists side by side to save space. Region, top and rising rows are separate items in the dataset.
Two things in that table deserve suspicion. Wyoming at 100 with the next state at 37 is what small samples look
like: a few thousand searches in a small state can swing the ratio. And the rising list we got actually started
with six "Breakout" entries that have nothing to do with air fryers: laptop stand, noise cancelling
headphones, hotel booking, solar panels, office chair and running shoes.
"Standing desk" got yoga for beginners the same way. They show up on automated requests run after run, so we
treat them as junk: since build 1.0.4 our scraper drops rising "Breakout" queries that share no word with your term
(set dropUnrelatedBreakouts to false if you want Google's raw list). If you scrape Trends
yourself, add the same filter, or at least read the rising list before it goes into a report.
Option 1: no code, with our Google Trends Scraper
This is the route we built for people who need more than a few keywords or want it on a schedule. Open Google Trends Scraper, paste the input below into the JSON tab (or fill the form) and press Start.
{
"searchTerms": ["air fryer"],
"geo": "US",
"timeRange": "past-12-months",
"outputs": ["interestOverTime", "interestByRegion", "relatedQueries", "relatedTopics"]
}
- Compare terms:
"coffee, tea, matcha"on one line puts all three on the same 0-100 scale. Separate lines are scaled independently. - Other properties:
searchPropertyswitches to YouTube, Google Shopping, News or Images search, which is the useful one for product research. - Trending now:
includeTrendingNowadds today's trending searches for a country, with Google's rough volume (1M+,20K+). - Layout: the default is flat rows for spreadsheets.
"outputLayout": "blocks"gives one item per keyword and output, which is easier to consume from code.
What it costs. You pay $0.0015 per data block (one keyword × one output) and $0.0005 per Trending now row. Our run above used three blocks with data, so at list price it costs $0.0045. The empty related topics block is free. A timeline for 1,000 keywords is $1.50.
Option 2: DIY with pytrends
If you need a few keywords once, don't pay anyone. pytrends wraps the same endpoints and still works from a home IP. This is the exact script we ran:
from pytrends.request import TrendReq
pytrends = TrendReq(hl="en-US", tz=0)
pytrends.build_payload(["air fryer"], timeframe="today 12-m", geo="US")
print(pytrends.interest_over_time().tail(3))
print(pytrends.related_queries()["air fryer"]["rising"].head(3))
Output on 2026-11-22 (last six lines; the rising list is sorted by growth):
...
2026-11-15 62 False
2026-11-22 58 True
query value
0 best air fryer 2026 4300
1 coffee grinder 3950
2 cosori dual blaze smart air fryer 1550
Then we pushed it. A loop over 20 keywords (timeline plus related queries each) finished in 46 seconds with no errors. A couple of minutes later a single extra call from the same IP failed, and it was still failing when we tried again 12 minutes after that:
ok=20 failed=0 in 46s
# a couple of minutes later, one more call from the same IP:
pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429
Why the DIY route gets harder as you scale:
- 429s come early and without warning. Google rate-limits Trends per IP and per session cookie. From cloud servers (AWS, GCP, GitHub Actions) it tends to happen far sooner than from a laptop.
- pytrends is unmaintained. The project is no longer developed, and the last PyPI release is 4.9.2. When Google renames a widget or changes a token, your pipeline stays broken until you patch it yourself.
- Different samples per request. Trends values are sampled, so the same query can return slightly different numbers a minute later. Rerunning failed keywords one by one can leave you with numbers that don't line up.
We're not going to publish tricks for dodging Google's rate limits. If you go DIY, keep it slow (several seconds between calls), cache what you fetch and accept that some runs will fail.
Which route to pick
| Criterion | pytrends (DIY) | Google Trends Scraper | Official Trends API |
|---|---|---|---|
| Cost | Free | $0.0015 per keyword × output | Free, if you get access |
| Good for | A few keywords, once | Batches, schedules, servers | Approved testers |
| Rate limits | Yours to deal with | Retries and session rotation built in | Quotas set by Google |
| Maintenance | None upstream | We fix it when Google changes things |
Tips from running this every day
- Drop the last point before you chart anything. It is usually
isPartial: trueand looks like a sudden drop. - Don't compare separate runs on the 0-100 scale. If you need "is A bigger than B", put them on one line so Google scales them together.
- Watch long time ranges. Past-5-years and all-time ranges return weekly or monthly points, so short spikes get flattened.
- Schedule it. A weekly run for your keyword list, sent to a sheet, gives you a seasonality history you can't get from the website. See exporting results to Google Sheets.
- Pair it with autocomplete. Trends tells you when people search, not what else they type. For long-tail ideas, use autocomplete keyword research and then check the best ideas here.
FAQ
Is there an official Google Trends API?
Google announced an official Trends API in 2025, but it started as an alpha for a limited group of testers. If you have access, use it. Everyone else is reading the same internal JSON endpoints the trends.google.com website calls, either with pytrends or with a hosted scraper.
Why are Google Trends numbers 0 to 100 instead of search volumes?
Google only publishes relative interest. 100 is the highest point for the terms, place and period you asked for, and every other point is scaled against it. Put up to five terms on one line (for example "coffee, tea") to get them on the same scale.
Does pytrends still work?
For small jobs from a home connection, yes. We ran 20 keywords in 46 seconds on 2026-11-22 without errors, and the next call from the same IP got HTTP 429. The project is no longer maintained, so when Google changes an endpoint nobody ships a fix.
Why are related topics empty?
Google currently returns an empty related topics list for many automated requests, even for popular terms. It happened in our test run too. Related queries are not affected, and our actor does not charge for empty blocks.
Can I get Google Trends data for many keywords at once?
Yes. Each line in searchTerms is a separate keyword or comparison group, and a run accepts up to 5,000 lines. For 1,000 keyword timelines the cost is $1.50 at $0.0015 per data block.