Google Trends Scraper & API avatar

Google Trends Scraper & API

Pricing

$2.00 / 1,000 result rows

Go to Apify Store
Google Trends Scraper & API

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

smartshopping-data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

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.

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:

  1. Opens a session with Google Trends and asks the explore endpoint for the widgets for your keyword, geo, timeframe, category and search property.
  2. 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).
  3. 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 maxRetries times (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 error row 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 OUTPUT holds { 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.
  1. Click Try for free / Start on the Actor page.
  2. Enter one or more Keywords.
  3. Optionally set Geo (for example US, GB or US-CA; leave it empty for worldwide), Timeframe, Category and Search property.
  4. Turn on the data types you want: interest over time, interest by region, related queries, related topics.
  5. Turn on Compare keywords if you want keywords measured against each other on one scale (see below).
  6. Run the Actor, then download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the Apify 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

FieldTypeDefaultDescription
keywordsarray of strings(required)Search terms to look up.
geostring""Country or region code, e.g. US, GB, US-CA. Empty means worldwide.
timeframestringtoday 12-mGoogle Trends time range. See Tips.
categoryinteger0Google Trends category ID. 0 means all categories.
propertystring""Search property: "" web search, youtube, news, images or froogle (Google Shopping).
hlstringen-USInterface or response language.
tzinteger0Timezone offset in minutes from UTC.
includeInterestOverTimebooleantrueOutput interest_over_time rows.
includeInterestByRegionbooleantrueOutput interest_by_region rows.
resolutionstringAUTORegion granularity: AUTO, COUNTRY, REGION, CITY or DMA (US). AUTO uses COUNTRY when geo is empty and REGION otherwise.
includeRelatedQueriesbooleantrueOutput related_query rows.
includeRelatedTopicsbooleanfalseOutput related_topic rows.
compareKeywordsbooleanfalsePut up to 5 keywords in each request so they share one scale.
maxConcurrencyinteger3Number of keywords or keyword groups scraped in parallel (1–20).
maxRetriesinteger6Retries per request after the first attempt (0–20).
proxyConfigurationobjectApify ProxyProxy 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_query and related_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 429 errors or error rows, try residential proxies, lower maxConcurrency, or raise maxRetries.
  • 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:

TimeframeMeaning
now 1-HPast hour
now 4-HPast 4 hours
now 1-dPast day
now 7-dPast 7 days
today 1-mPast 30 days
today 3-mPast 90 days
today 12-mPast 12 months (default)
today 5-yPast 5 years
all2004 to present
2024-01-01 2024-12-31Custom 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 geo is 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 tz field (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_topic rows 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

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.

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.