Google Trends Scraper & API
Pricing
$2.00 / 1,000 result rows
Google Trends Scraper & API
Scrape Google Trends without a browser: interest over time, interest by region and related queries for many keywords. Compare up to 5, filter by geo, category and property. Flat JSON/CSV rows.
Pricing
$2.00 / 1,000 result rows
Rating
0.0
(0)
Developer
smartshopping-data
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Share
Pull Google Trends data as clean JSON, CSV or Excel. No browser involved. You get interest over time, interest by region and related queries (plus optional related topics) for as many keywords as you need. Each data point comes out as its own flat row, ready for spreadsheets, BI tools, databases or your own code.
What does Google Trends Scraper do?
The Actor sends plain HTTP requests to the same JSON endpoints that the Google Trends website uses. There is no headless browser, so runs start quickly and stay cheap. For every keyword (or group of up to 5 compared keywords) it:
- Opens a session with Google Trends and asks the explore endpoint for the widgets for your keyword, geo, timeframe, category and search property.
- Fetches the data behind each widget you enabled:
- Interest over time: the 0–100 popularity timeline.
- Interest by region: popularity by country, region, city or DMA.
- Related queries: the top and rising searches related to the keyword.
- Related topics: the top and rising topics (off by default; see Limitations).
- Flattens the response into one dataset row per data point and writes it to the dataset right after each widget finishes. You can read partial results while the run is still going.
Reliability built in
- Retries with exponential backoff. Each request is retried up to
maxRetriestimes (default 6). Waits start at about 2 s, double each time, include random jitter and are capped at 60 s. - Session rotation. On HTTP 429, 403 or 5xx responses, empty bodies, captcha or consent pages, or invalid JSON, the Actor drops the session and starts a new one with a fresh proxy IP and cookies.
- Failures are isolated. If a keyword or widget still fails after every retry, the Actor writes an
errorrow for it and moves on to the remaining keywords. Error rows are not charged. - Run summary. When the run ends, the key-value store record
OUTPUTholds{ keywords, rows, failures, durationSec }.
Use cases
- SEO and content planning: compare search interest across topics, find rising queries and time content to seasonal peaks.
- Market research: track demand for products, brands or categories over months or years, then compare by country or region.
- E-commerce: use the Google Shopping property to see what shoppers are searching for, and when.
- YouTube and news monitoring: switch the search property to YouTube or News to measure interest on those surfaces.
- Data science and forecasting: feed clean, timestamped time series into models and dashboards.
- Automated reporting: schedule the Actor on Apify and send results to Google Sheets, a webhook or your data warehouse.
How to use Google Trends Scraper
- Click Try for free / Start on the Actor page.
- Enter one or more Keywords.
- Optionally set Geo (for example
US,GBorUS-CA; leave it empty for worldwide), Timeframe, Category and Search property. - Turn on the data types you want: interest over time, interest by region, related queries, related topics.
- Turn on Compare keywords if you want keywords measured against each other on one scale (see below).
- Run the Actor, then download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.
Using it as a Google Trends API
You can call the Actor from any language through the Apify API, or use the Apify JavaScript or Python clients. Start a run with the input JSON below and read the dataset items when it finishes. With the run-sync-get-dataset-items endpoint, a single HTTP call starts the run and returns the rows.
Compare mode vs. separate mode
- Compare keywords off (default): each keyword is queried separately, so each one gets its own 0–100 scale. Use this when you want the shape of each trend on its own.
- Compare keywords on: keywords are sent in groups of up to 5 per request, the same way you would compare them on the Google Trends website. Values within a group share one 0–100 scale, so you can compare them directly. If you enter more than 5 keywords, they are split into groups of 5 in the order you entered them. Values are only comparable within a group.
Input
| Field | Type | Default | Description |
|---|---|---|---|
keywords | array of strings | (required) | Search terms to look up. |
geo | string | "" | Country or region code, e.g. US, GB, US-CA. Empty means worldwide. |
timeframe | string | today 12-m | Google Trends time range. See Tips. |
category | integer | 0 | Google Trends category ID. 0 means all categories. |
property | string | "" | Search property: "" web search, youtube, news, images or froogle (Google Shopping). |
hl | string | en-US | Interface or response language. |
tz | integer | 0 | Timezone offset in minutes from UTC. |
includeInterestOverTime | boolean | true | Output interest_over_time rows. |
includeInterestByRegion | boolean | true | Output interest_by_region rows. |
resolution | string | AUTO | Region granularity: AUTO, COUNTRY, REGION, CITY or DMA (US). AUTO uses COUNTRY when geo is empty and REGION otherwise. |
includeRelatedQueries | boolean | true | Output related_query rows. |
includeRelatedTopics | boolean | false | Output related_topic rows. |
compareKeywords | boolean | false | Put up to 5 keywords in each request so they share one scale. |
maxConcurrency | integer | 3 | Number of keywords or keyword groups scraped in parallel (1–20). |
maxRetries | integer | 6 | Retries per request after the first attempt (0–20). |
proxyConfiguration | object | Apify Proxy | Proxy settings. A new proxy session starts whenever Google blocks a request. |
Input example
{"keywords": ["bitcoin", "ethereum", "solana"],"geo": "US","timeframe": "today 12-m","category": 0,"property": "","includeInterestOverTime": true,"includeInterestByRegion": true,"resolution": "AUTO","includeRelatedQueries": true,"includeRelatedTopics": false,"compareKeywords": false,"maxConcurrency": 3,"maxRetries": 6,"proxyConfiguration": { "useApifyProxy": true }}
Output
Every dataset item has a type field. Rows are flat, with no nested arrays, so they export cleanly to CSV and Excel. In the examples below, the dates and values are for illustration only.
interest_over_time
One row per keyword per point in time. value is Google's 0–100 relative interest. isPartial is true for the latest, still-incomplete period. date is an ISO 8601 string in UTC and timestamp is in Unix seconds.
{"type": "interest_over_time","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","date": "2025-10-19T00:00:00.000Z","timestamp": 1760832000,"value": 74,"isPartial": false}
{"type": "interest_over_time","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","date": "2026-10-11T00:00:00.000Z","timestamp": 1791676800,"value": 58,"isPartial": true}
interest_by_region
One row per keyword per region. geoCode and geoName depend on geo and resolution: countries for a worldwide search, states or provinces at REGION, and so on.
{"type": "interest_by_region","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","geoCode": "US-NV","geoName": "Nevada","value": 100}
related_query
One row per related query. ranking is top or rising. For top rows, value is relative interest from 0 to 100. For rising rows, value is the percentage increase, and formattedValue holds Google's label, such as +250% or Breakout. link is the Google Trends explore path for that query.
{"type": "related_query","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","ranking": "top","query": "bitcoin price","value": 100,"formattedValue": "100","link": "/trends/explore?q=bitcoin+price&date=today+12-m&geo=US"}
{"type": "related_query","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","ranking": "rising","query": "bitcoin etf","value": 250,"formattedValue": "+250%","link": "/trends/explore?q=bitcoin+etf&date=today+12-m&geo=US"}
related_topic
This is the shape the Actor outputs when Google returns topics. Right now Google returns an empty list, so you will usually get no rows of this type (see Limitations).
{"type": "related_topic","keyword": "bitcoin","geo": "US","timeframe": "today 12-m","ranking": "top","topicTitle": "Cryptocurrency","topicType": "Topic","mid": "/m/0vpj4_b","value": 100,"formattedValue": "100"}
error (not charged)
The Actor writes this row when a keyword, keyword group or single widget still fails after all retries. In compare mode, keyword holds the keywords of the group, joined by commas.
{"keyword": "bitcoin","type": "error","error": "HTTP 429 for https://trends.google.com/trends/api/explore"}
Pricing
This Actor uses pay-per-event pricing:
- $2.00 per 1,000 result rows ($0.002 per row).
- Platform usage is included. You are not billed separately for compute or Apify Proxy usage.
- Error rows are free. You pay only for data rows:
interest_over_time,interest_by_region,related_queryandrelated_topic.
Worked example
In a test run, 10 keywords with the default data types returned 1,893 rows in about 30 seconds, with 0 failures, using datacenter proxies.
1,893 rows × $0.002 = $3.79 for the run (about $0.38 per keyword).
The number of rows per keyword depends on your settings. Longer or finer timeframes produce more time points. A finer region resolution and a worldwide geo produce more regions. Turning off data types you don't need lowers the cost.
To cap your spend, set a maximum charge for the run in Apify. When the limit is reached, the Actor stops and saves its summary to OUTPUT with stoppedOnChargeLimit: true.
Tips
Proxy
- The default Apify Proxy setting worked in testing: 10 keywords, 0 failures on datacenter proxies.
- If you get many
429errors orerrorrows, try residential proxies, lowermaxConcurrency, or raisemaxRetries. - Every block triggers a new session with a fresh IP and cookies, so short bursts of rate limiting are usually absorbed without failed rows.
Timeframe formats
timeframe is passed to Google Trends as is, so any format Google accepts will work. Common values:
| Timeframe | Meaning |
|---|---|
now 1-H | Past hour |
now 4-H | Past 4 hours |
now 1-d | Past day |
now 7-d | Past 7 days |
today 1-m | Past 30 days |
today 3-m | Past 90 days |
today 12-m | Past 12 months (default) |
today 5-y | Past 5 years |
all | 2004 to present |
2024-01-01 2024-12-31 | Custom date range (YYYY-MM-DD YYYY-MM-DD) |
Google picks the time step from the range: shorter ranges give minute or hourly points, longer ranges give daily, weekly or monthly points.
Other tips
- Geo codes use Google Trends format: ISO country codes (
DE), or country plus subdivision (US-CA,GB-ENG). - City and DMA resolution are most useful when
geois set to a country. DMA applies to the US. - Category IDs are the numbers Google Trends uses in its own category picker (
0= all categories). - Use the
tzfield (minutes from UTC) to set the timezone that Google uses to bucket the data.
Limitations
- Related topics usually come back empty. Google's related-topics endpoint currently returns an empty list, so
related_topicrows are usually missing even when the option is on. The option is off by default for this reason. The Actor will output topics if Google starts returning them again. Related queries are not affected. - Values are relative, not absolute. Google Trends reports normalized 0–100 interest, not search volumes. Values from separate requests (separate mode, or different compare groups) are each scaled to their own maximum.
- Low-volume terms can return few or no data points, because Google does not show data for terms with too little search volume.
- Google can change its endpoints at any time, which may temporarily affect results.
FAQ
Is it legal to scrape Google Trends?
Google Trends publishes aggregated, anonymized search-interest statistics that anyone can view without logging in. This Actor collects only that aggregate data. It does not collect personal data about any individual. Still, you are responsible for how you use the data and for following the laws and terms that apply to you. If you are unsure, ask a lawyer.
Do I need a Google account or API key?
No. The Actor reads the public Google Trends data that the website itself loads.
Why are my numbers different from the Google Trends website?
Google samples its data, so values can change slightly between requests. Make sure geo, timeframe, category, property and compare mode match what you set on the website. Comparing 3 keywords together gives different numbers than querying each one separately.
How many keywords can I compare at once?
Up to 5 per group, which is Google's own limit. You can enter as many keywords as you like. In compare mode they are split into groups of 5.
What happens if Google blocks a request?
The Actor waits with exponential backoff, switches to a new session with a fresh IP and cookies, and tries again. If every retry fails, it writes an uncharged error row and continues with the other keywords.
Can I get results while the run is still going?
Yes. Rows are written to the dataset as soon as each widget has been fetched.