# Google Trends Scraper — Reliable & Fast (No Browser) (`griffie/google-trends-reliable-scraper`) Actor

Google Trends interest over time, by region and related queries for hundreds of keywords, comparisons of up to 5 terms, and Trending Now with news. JSON endpoints, auto-retries and residential fallback. Pay only for keywords with data.

- **URL**: https://apify.com/griffie/google-trends-reliable-scraper.md
- **Developed by:** [Dustin Griffie](https://apify.com/griffie) (community)
- **Categories:** SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 keyword reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Trends Scraper — Reliable & Fast (No Browser)

Get Google Trends data — **interest over time, interest by region, related queries, comparisons of up to 5 terms and the live Trending Now list with news articles** — for hundreds of keywords per run. It talks to Google Trends' own JSON endpoints instead of driving a browser, so it's fast, uses 256 MB of memory, and doesn't break when the page layout changes.

### Why this scraper

- **Built for reliability.** Every request runs on a fresh session (IP + cookies + consistent browser headers). Google's rate limits (HTTP 429) are retried with backoff on a new IP, and if the datacenter proxy keeps getting throttled the run switches to residential proxies by itself. In our test runs (about 580 keywords, up to 5 runs in parallel) every keyword returned data except one, and that case is now covered by an automatic end-of-run retry.
- **You only pay for results.** Terms with too little search volume (`no_data`), queries Google rejects (`invalid`) and anything that failed are **never charged**. Duplicate terms are removed before the run. If you set *Max cost per run*, the run stops cleanly before going over it — unprocessed terms aren't charged.
- **No browser.** Typically 5–10 seconds per keyword, 3–5 keywords in parallel.
- **Drop-in replacement.** Turn on *Add apify/google-trends-scraper field names* and you also get `interestOverTime_timelineData`, `interestBySubregion`, `relatedQueries_top`, … in the same raw format, so existing integrations keep working.

### How to scrape Google Trends

1. Click **Try for free** (or **Start**) — a free Apify account is enough.
2. Type your **search terms**, one per line, or paste a Google Trends URL or a Google Sheet link.
3. Optionally pick a **location**, **time range**, category or search type (web, YouTube, News, Images, Shopping).
4. Click **Start**. A few seconds per keyword later you get one row per term in the **Output** tab.
5. Download the results as JSON, CSV, Excel or HTML, or get them through the API, schedules, webhooks, Make, Zapier, n8n or the Apify MCP server.

### What data you get

| Data | Details |
|---|---|
| Interest over time | 0–100 per point; minute/hour/day/week/month steps chosen by Google; `date` (UTC), `localTime` (your time zone, for hourly data), `isPartial` for the still-running period; peak, average, latest and % change per term |
| Interest by region | Countries (Worldwide), regions/states, US metro areas (DMA) or cities |
| Related queries | Top 25 and Rising 25 with Google's values (`+250%`, `Breakout`), `isBreakout` flag and link |
| Related topics | See FAQ — Google currently doesn't send these to anyone who isn't signed in |
| Comparisons | Up to 5 terms on one scale, like the Compare box on Google Trends |
| Trending Now | Term, search volume, % increase, start/end time, active flag, categories, related searches and up to **3 news articles** (title, URL, source, published time, image) per trend, for any country, past 4 h / 24 h / 48 h / 7 days |

Search type (web, YouTube, News, Images, Shopping), category, location (country, region, metro), any date range from 2004, language and time zone are all supported.

### Input

You can give search terms in four ways — combine them freely:

- **Search terms** — one per line, any language.
- **Compare terms** — `coca cola, pepsi` on one line (up to 5).
- **Google Trends URLs** — paste an explore URL from your browser.
- **Google Sheet or CSV URL** — a sheet shared as "Anyone with the link can view" (or published to the web), or any public CSV. Terms are read from the first column or the column you name; a specific tab is used when the URL contains `gid=`.

#### Examples

Keywords in the US over the past 12 months:

```json
{ "searchTerms": ["web scraping", "data extraction", "日本語"], "geo": "US", "timeRange": "today 12-m" }
```

Compare brands by US state, monthly since 2004:

```json
{ "comparisonGroups": ["coca cola, pepsi, dr pepper"], "geo": "US", "timeRange": "all", "regionResolution": "REGION" }
```

Hourly data for the past day in US Pacific time:

```json
{ "searchTerms": ["earthquake"], "geo": "US-CA", "timeRange": "now 1-d", "timezoneOffset": 420 }
```

Terms from a Google Sheet column called "keyword":

```json
{ "spreadsheetId": "https://docs.google.com/spreadsheets/d/<id>/edit#gid=0", "spreadsheetColumn": "keyword" }
```

Trending Now with news for three countries:

```json
{ "trendingNowGeos": ["US", "GB", "IN"], "trendingNowHours": "24", "maxTrendingPerGeo": 50 }
```

### Output

**One row per search term** (default) — everything about a term in one item:

```json
{
  "query": "coffee", "keyword": "coffee", "geo": "US", "timeframe": "today 12-m", "category": 0, "categoryName": "All categories",
  "property": "web", "status": "ok", "statusMessage": null,
  "averageInterest": 82.4, "peakValue": 100, "peakDate": "2025-12-21T00:00:00.000Z", "latestValue": 79, "changePercent": -4.8,
  "topQueries": ["coffee near me", "coffee shop", "..."], "risingQueries": ["..."],
  "interestOverTime": [{ "keyword": "coffee", "date": "2025-10-19T00:00:00.000Z", "localTime": null, "formattedTime": "Oct 19 – 25, 2025", "value": 83, "hasData": true, "isPartial": false }],
  "interestByRegion": [{ "keyword": "coffee", "geoCode": "US-WA", "geoName": "Washington", "value": 100, "hasData": true, "resolution": "REGION" }],
  "relatedQueries": [{ "keyword": "coffee", "rankType": "rising", "rank": 1, "relatedQuery": "...", "value": 3250, "formattedValue": "Breakout", "isBreakout": true, "link": "https://trends.google.com/trends/explore?q=..." }],
  "relatedTopics": [], "relatedTopicsStatus": "notProvidedByGoogle",
  "trendsUrl": "https://trends.google.com/trends/explore?q=coffee&date=today+12-m&geo=US",
  "scrapedAt": "2026-10-23T03:20:00.000Z"
}
```

The Output tab has views for the overview, interest over time, regions, related queries and Trending Now.

**Flat rows** (`outputFormat: "flat"`) — one row per data point with a `recordType` column (`keyword_summary`, `interest_over_time`, `interest_by_region`, `related_query`, `related_topic`, `trending_now`), ideal for spreadsheets, SQL and BI tools.

#### Status values

| status | meaning | charged |
|---|---|---|
| `ok` | all requested data fetched | yes |
| `partial` | main data fetched, a section failed after all retries (see `error`) | yes |
| `no_data` | Google has too little search volume for this term/place/time ("not enough data") | no |
| `invalid` | Google rejected the query (unknown location code, unsupported combination) | no |
| `failed` | blocked after all retries | no |

Input mistakes we can detect up front (bad location format, dates before 2004, unknown category id, more than 5 terms in a comparison, private Google Sheet) stop the run immediately with a clear message, before anything is charged.

### How much does it cost to scrape Google Trends?

Pay per event — platform usage (compute, proxies, storage) is included, there is nothing else to pay:

| Event | Free plan | Paid plans |
|---|---|---|
| Keyword report — one search term with data (`ok` or `partial`; each term in a comparison counts once) | $0.003 | **$0.002** ($2 per 1,000 terms) |
| Trending search — one Trending Now row, incl. related searches and news | $0.0002 | $0.0002 |
| Actor start (Apify's standard start fee) | $0.00005 | $0.00005 |

**Never charged:** terms with no data (`no_data`), queries Google rejects (`invalid`), failures, duplicate terms, rows not saved. Set *Max cost per run* and the run stops cleanly before going over it; the minimum you can set is $0.10.

Example: 500 keywords on a paid plan ≈ $1.00. The Apify Free plan includes $5 of monthly credit — about **1,600 keyword reports a month for free**.

### FAQ

**Why are related topics empty?** Google Trends currently returns an empty related-topics list to every visitor who isn't signed in to a Google account — we verified this with a real Chrome browser, from datacenter and residential (home) IPs, in several countries and with topic IDs; the Google Trends website itself shows "Hmm, your search doesn't have enough data to show here" for related topics. Related **queries** are unaffected. Each item says `relatedTopicsStatus: "notProvidedByGoogle"`; if Google switches the data back on, the rows fill in automatically. It never affects status or price.

**What do the numbers mean?** Values are relative: 100 is the term's peak for the chosen place and time, 50 is half as popular. They aren't search counts. Compared terms share one scale; separately searched terms don't.

**What does the time zone setting change?** Google's data points are the same in every time zone; the setting changes `formattedTime` and our `localTime` for hourly/minute data. `date` is always UTC. Daily, weekly and monthly points are calendar dates.

**How do I get daily data for a whole year?** Google picks the step from the range: daily up to ~9 months, weekly up to 5 years, monthly beyond. Run several shorter custom ranges (`2024-01-01 2024-06-30`, `2024-07-01 2024-12-31`) — note each range is scaled to its own peak.

**Which proxy should I use?** The default (Automatic datacenter) works for most runs. With *Fall back to residential proxy* on, the run switches to residential automatically if Google throttles the datacenter IPs. Don't use GOOGLE_SERP — it can't reach Google Trends.

**Can I schedule it or use it from my code?** Yes — use Apify schedules, the API, the Python/JS clients, Make, Zapier, n8n or the MCP server like any other Actor.

**Is it legal?** The Actor collects publicly available, aggregated and anonymized Google Trends statistics; no personal data. Check that your use complies with Google's terms and the laws that apply to you.

# Actor input Schema

## `searchTerms` (type: `array`):

One keyword per line, e.g. <code>coffee</code> or <code>iphone 17</code>. Any language works (日本語, Deutsch, عربي…). Each term gets its own report. Duplicates (case-insensitive) are removed automatically and never charged twice. To compare terms on one scale use <b>Compare terms</b> instead.

## `comparisonGroups` (type: `array`):

Each line is one comparison of up to 5 comma-separated terms, e.g. <code>coca cola, pepsi</code> — exactly like the Compare box on Google Trends. All terms share one 0–100 scale. Each term in a group counts as one keyword report.

## `startUrls` (type: `array`):

Paste explore URLs from your browser, e.g. <code>https://trends.google.com/trends/explore?q=bitcoin\&geo=US\&date=today%203-m</code>. The q, geo, date, cat and gprop parameters are used; other settings below apply to everything else.

## `spreadsheetId` (type: `string`):

A Google Sheet ID or URL (shared as <i>Anyone with the link can view</i>, or a <i>Publish to web</i> link), or any public CSV URL. Search terms are read from the first column (or the column set below). A specific tab is used when the URL contains <code>gid=</code>.

## `spreadsheetColumn` (type: `string`):

Header name (e.g. <code>keyword</code>) or 1-based column number. Empty = first column.

## `spreadsheetHasHeader` (type: `boolean`):

Skip the first row of the sheet/CSV.

## `geo` (type: `string`):

Empty = Worldwide. A 2-letter country code (<code>US</code>, <code>GB</code>, <code>DE</code>), a region (<code>US-CA</code>, <code>GB-ENG</code>) or a US metro area (<code>US-CA-807</code>). Unknown codes are reported as <i>invalid</i> and not charged.

## `timeRange` (type: `string`):

Google picks the granularity: minutes for 1–4 hours, hourly for 1–7 days, daily up to ~9 months, weekly up to 5 years, monthly beyond.

## `customTimeRange` (type: `string`):

Overrides Time range. <code>YYYY-MM-DD YYYY-MM-DD</code> (e.g. <code>2024-01-01 2024-12-31</code>), from 2004-01-01 on. Hourly windows within the last 7 days: <code>2026-10-20T08 2026-10-21T08</code>.

## `category` (type: `integer`):

Google Trends category id; 0 = all categories. Examples: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 45 Health, 18 Shopping, 20 Sports, 67 Travel. Unknown ids fail fast with a clear message.

## `property` (type: `string`):

Which Google search property to measure.

## `includeInterestOverTime` (type: `boolean`):

0–100 values over the time range, with dates in UTC and in your time zone.

## `includeInterestByRegion` (type: `boolean`):

Countries (Worldwide), regions/states (country) or metros/cities, 0–100.

## `regionResolution` (type: `string`):

Google's default is countries for Worldwide and regions for a country.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also list regions where Google has too little data (value 0, hasData false). Off = same list as the Google Trends website.

## `comparisonPerKeywordRegions` (type: `boolean`):

For comparisons, also fetch each term's own region breakdown (one extra request per term).

## `includeRelatedQueries` (type: `boolean`):

Top and rising related searches (25 each), with Breakout flags.

## `includeRelatedTopics` (type: `boolean`):

Google currently returns an empty related-topics list to all signed-out visitors — including real browsers on home connections — so this is usually empty (<code>relatedTopicsStatus: notProvidedByGoogle</code>). It fills in automatically if Google turns it back on. Never affects status or price.

## `trendingNowGeos` (type: `array`):

Country codes (e.g. <code>US</code>, <code>GB</code>, <code>IN</code>) to fetch the live Trending Now list: term, search volume, % increase, start/end time, categories, related searches and up to 3 news articles per trend.

## `trendingNowHours` (type: `string`):

Time window of the Trending Now list.

## `maxTrendingPerGeo` (type: `integer`):

0 = all (the US list often has 300–600 trends). Charged per trend.

## `includeTrendingNews` (type: `boolean`):

Add up to 3 news articles (title, URL, source, published time, image) to each trend.

## `outputFormat` (type: `string`):

<b>One row per search term</b>: everything for a term in one item (like other Google Trends scrapers) — smallest dataset, best for APIs/JSON. <b>Flat</b>: separate rows for each date, region and related query (<code>recordType</code> column) — best for spreadsheets and BI tools.

## `competitorCompatibleFields` (type: `boolean`):

Also output <code>inputUrlOrTerm</code>, <code>searchTerm</code>, <code>interestOverTime_timelineData</code>, <code>interestBySubregion</code>, <code>relatedQueries_top</code>/<code>\_rising</code>, <code>relatedTopics_top</code>/<code>\_rising</code> etc. in Google's raw format, so existing integrations keep working. One-row-per-term format only.

## `maxItems` (type: `integer`):

Process at most this many queries (0 = no limit). You can also set "Max cost per run" in Run options; the run stops cleanly when it is reached and unprocessed terms are not charged.

## `language` (type: `string`):

Interface language (hl) for formatted dates and Trending Now news, e.g. <code>en-US</code>, <code>de</code>, <code>ja</code>.

## `timezoneOffset` (type: `integer`):

Google's convention: minutes <b>west</b> of UTC. 0 = UTC, 480 = US Pacific (PST), 420 = PDT, 300 = US Eastern (EST), -60 = Central Europe (CET), -330 = India. Affects <code>localTime</code> and <code>formattedTime</code>; <code>date</code> is always UTC. Google's data points themselves don't change with the time zone.

## `maxConcurrency` (type: `integer`):

Queries processed at the same time. 3–5 is the sweet spot; higher values trigger more Google rate-limiting.

## `maxRetries` (type: `integer`):

Each retry uses a fresh IP and cookies, with backoff.

## `proxyConfiguration` (type: `object`):

Default Apify datacenter proxy is enough for most runs. RESIDENTIAL is the most reliable. GOOGLE_SERP cannot reach Google Trends.

## `fallbackToResidential` (type: `boolean`):

If Google keeps rate-limiting the datacenter IPs, switch to RESIDENTIAL automatically for the rest of the run (only if your plan includes it).

## `debugLog` (type: `boolean`):

Log every retry.

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping"
  ],
  "spreadsheetHasHeader": true,
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeLowSearchVolumeRegions": false,
  "comparisonPerKeywordRegions": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "trendingNowHours": "24",
  "maxTrendingPerGeo": 0,
  "includeTrendingNews": true,
  "outputFormat": "perKeyword",
  "competitorCompatibleFields": false,
  "maxItems": 0,
  "language": "en-US",
  "timezoneOffset": 0,
  "maxConcurrency": 3,
  "maxRetries": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "fallbackToResidential": true,
  "debugLog": false
}
```

# Actor output Schema

## `results` (type: `string`):

All dataset items (keyword reports and Trending Now rows). Each item has a status: ok, partial, no_data, invalid or failed.

## `runStats` (type: `string`):

JSON summary of the run: counts per status, charged keyword reports and trending searches, retries, proxy tier used, per-query timings and warnings.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "web scraping"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("griffie/google-trends-reliable-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["web scraping"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("griffie/google-trends-reliable-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "web scraping"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call griffie/google-trends-reliable-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,griffie/google-trends-reliable-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/51U6kco0u5HRJlJCL/builds/vphhuD2XP0qVQJVYq/openapi.json
