# Google Trends Scraper — Interest, Regions & Related Queries (`innolabs/google-trends-scraper`) Actor

Google Trends scraper & API: interest over time, interest by region, related queries and topics for any keyword, country, timeframe, category or explore URL. No login.

- **URL**: https://apify.com/innolabs/google-trends-scraper.md
- **Developed by:** [Tristan Leroux](https://apify.com/innolabs) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event

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 — Interest, Regions & Related Queries

Get Google Trends data as clean rows: interest over time, interest by region, related queries
and related topics for any search term, country, time range, category or Google property.
No Google login and no API key needed. Paste keywords or Google Trends explore URLs and
export the results as JSON, CSV or Excel.

### What does Google Trends Scraper do?

Google Trends Scraper works as an unofficial Google Trends API. For each search term it
collects:

- **Interest over time** — Google's 0–100 interest score for every day/week/month of the range.
- **Interest by region** — the score per state (for a country) or per country (worldwide).
- **Related queries** — top and rising searches, with Google's "Breakout" flag.
- **Related topics** — top and rising topics, when Google serves them (see Limits).

You can compare up to 5 terms side by side exactly like on trends.google.com, query many
countries in one run, and scrape up to 50 terms per run (grouped into comparisons of 5).
Already have a chart open in Google Trends? Copy its URL into **Google Trends explore URLs**
and the scraper uses the same terms, country, time range, category and property.

Every data point is its own dataset row, so the output drops straight into Google Sheets,
Excel, a BI tool or a database.

### Use cases

- **SEO and content marketers** — find rising queries and seasonal peaks before planning content.
- **E-commerce and product teams** — compare demand for products or brands per country and month.
- **Crypto and finance analysts** — track search interest in coins or tickers as a sentiment signal.
- **Market researchers** — see which states or countries care most about a topic.
- **Data scientists** — feed weekly interest series into forecasting models on a schedule.
- **Agencies** — produce recurring trend reports for clients without manual chart exports.

### How much does it cost?

You pay only for the data points you get. One data point = one dataset row (one week of
interest, one region, or one related query).

| Event | What you pay for | Free plan | Paid plans (from) |
| --- | --- | --- | --- |
| `data-point` | One dataset row (time point, region, related query or topic) | $1.00 per 1,000 | $0.30 per 1,000 (Gold+) |

A small fixed actor-start fee charged by Apify ($0.00005) applies per run.

Worked examples (measured on a real run):

- **1 keyword × 12 months, US, all sections** ≈ 148 data points (53 weekly values + 51 regions +
  44 related queries) → **$0.15** on the Free plan, **$0.04** on Gold+.
- **50 keywords × 12 months, US, all sections** ≈ 7,400 data points → **$7.40** on the Free
  plan, **$2.22** on Gold+. Turn off sections you don't need to pay less.

The Apify Free plan includes $5 monthly credit, enough for about 5,000 data points
(roughly 30 keywords with every section) each month.

### How to use Google Trends Scraper

1. Open the actor in Apify Console and click **Try for free**.
2. Enter your search terms (e.g. `bitcoin`, `ethereum`) or paste Google Trends explore URLs.
3. Pick countries, a time range, and optionally a category and property (Web, YouTube, News…).
4. Choose which sections to include, then click **Start**.
5. When the run finishes, open the **Output** tab and export to JSON, CSV or Excel.

Using the API instead:

1. Get your API token from **Settings → Integrations** in Apify Console.
2. Call `run-sync-get-dataset-items` with your input (see [Integrations and API](#integrations-and-api)).
3. Read the returned JSON rows directly, or fetch the run's dataset later.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `keywords` | list of strings | Search terms to compare, up to 50. Groups of 5 are compared together. |
| `startUrls` | list of URLs | Google Trends explore URLs, e.g. `https://trends.google.com/trends/explore?q=chatgpt,gemini&geo=GB&date=today%203-m`. Each URL uses its own terms, country, range, category and property. |
| `geo` | list of strings | Country codes like `US`, `GB`, `DE`, or sub-regions like `US-CA`. Empty string `""` = worldwide. Default `US`. |
| `timeframe` | string | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or a custom range `2024-01-01 2024-12-31` (max 5 years). Default `today 12-m`. |
| `category` | integer | Google Trends category id, `0` = all categories. |
| `property` | select | `web`, `images`, `news`, `shopping` or `youtube`. |
| `includeInterestOverTime` | boolean | Include the interest-over-time series. Default on. |
| `includeInterestByRegion` | boolean | Include the regional breakdown. Default on. |
| `includeRelatedQueries` | boolean | Include top and rising related queries. Default on. |
| `includeRelatedTopics` | boolean | Include top and rising related topics. Default on. |
| `maxItems` | integer | Stop after this many rows. Default 5,000. |
| `requestDelaySec` | number | Pause between requests to Google. Default 4. |
| `maxRetries` | integer | Retries when Google throttles a request. Default 4. |
| `proxyConfiguration` | object | Proxy settings. Apify Proxy is on by default; residential works best. |

Provide `keywords`, `startUrls`, or both (each is scraped as its own query).

```json
{
    "keywords": ["bitcoin", "ethereum"],
    "geo": ["US"],
    "timeframe": "today 12-m",
    "startUrls": [
        { "url": "https://trends.google.com/trends/explore?q=chatgpt,gemini&geo=GB&date=today%203-m&gprop=youtube" }
    ]
}
```

### Output

One row per data point. Rows below are from a real run on 2026-11-02.

```json
{
    "type": "interest_over_time",
    "keyword": "bitcoin",
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "property": "web",
    "sourceUrl": null,
    "scrapedAt": "2026-11-02T13:48:55Z",
    "date": "2025-11-02T00:00:00Z",
    "value": 41,
    "isPartial": false
}
```

```json
{
    "type": "interest_by_region",
    "keyword": "bitcoin",
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "property": "web",
    "sourceUrl": "https://trends.google.com/trends/explore?q=bitcoin&geo=US&date=today%2012-m",
    "scrapedAt": "2026-11-02T13:49:20Z",
    "region": "Wyoming",
    "regionCode": "US-WY",
    "value": 100
}
```

```json
{
    "type": "related_query",
    "keyword": "bitcoin",
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "property": "web",
    "sourceUrl": "https://trends.google.com/trends/explore?q=bitcoin&geo=US&date=today%2012-m",
    "scrapedAt": "2026-11-02T13:49:20Z",
    "relatedKeyword": "bitcoin price",
    "value": 100,
    "isBreakout": false,
    "rankType": "top"
}
```

Related topic rows have the same shape as related queries plus `relatedTopicId` (Google
Knowledge Graph id, e.g. `/m/0663v`) and `relatedTopicType` (e.g. `Dish`).

Field notes:

- `type` — `interest_over_time`, `interest_by_region`, `related_query` or `related_topic`.
- `value` — Google's relative interest, 0–100, scaled to the peak within the request. It is
  not absolute search volume.
- `isPartial` — the latest period is still being collected.
- `isBreakout` — Google labels the rising query "Breakout" (growth above 5000%).
- `rankType` — `top` or `rising`.
- `sourceUrl` — the explore URL the row came from, or `null` for rows from `keywords`.

### Integrations and API

Run the actor and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/innolabs~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["bitcoin", "ethereum"], "geo": ["US"], "timeframe": "today 12-m"}'
```

Python with [apify-client](https://docs.apify.com/api/client/python):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("innolabs/google-trends-scraper").call(
    run_input={"keywords": ["bitcoin", "ethereum"], "geo": ["US"], "timeframe": "today 12-m"}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["type"], row["keyword"], row.get("date") or row.get("region"), row["value"])
```

- **Make, Zapier, n8n** — use the Apify app/node to start the actor and pass the rows to
  Google Sheets, Airtable, Slack or a database.
- **Scheduling** — create a schedule in Apify Console (e.g. every Monday) to build a weekly
  trend history automatically.
- **Webhooks** — get notified or trigger your pipeline when a run finishes.
- **AI agents (MCP)** — connect Claude, Cursor or other MCP clients through the Apify MCP
  server at https://mcp.apify.com and let your agent query Google Trends on demand.

### FAQ

#### Is it legal to scrape Google Trends?

The scraper only collects public, aggregated data that anyone can see on trends.google.com
without logging in. It does not collect personal data. Check that your use complies with
Google's terms and the laws that apply to you.

#### Do I need proxies?

Google throttles repeated requests from the same IP. Apify Proxy is enabled by default and
handles this; residential proxies give the most reliable results. The scraper also paces
requests and retries throttled ones automatically.

#### How many keywords can I scrape?

Up to 50 keywords per run plus any number of explore URLs. Google compares at most 5 terms
at a time, so values are only comparable within the same group of 5. For more keywords,
start several runs or use the API.

#### Can I get only new data?

Run it on a schedule with a short range like `now 7-d` or `today 1-m` and append the rows
to your sheet or database; use `date` + `keyword` + `geo` to drop rows you already have.
Duplicate rows inside a run are removed and never charged.

#### What happens if Google blocks a request?

The scraper retries with a fresh session. If one section still fails, the rest of the run
continues and the failure is listed in the run log. If nothing at all could be fetched, the
run fails with a clear message, so you are not charged for empty results.

#### Why is my value 0–100 and not a search count?

That is how Google Trends reports data: values are relative to the highest point in the
chosen range and country. Google does not publish absolute search volumes.

### Limits

- At most 5 terms are compared together; larger lists are split into groups of 5.
- Custom date ranges are limited to 5 years per query; use `all` for full history. Long
  ranges come back weekly or monthly, as on the Google Trends website.
- Related topics: Google often returns an empty topics list to automated sessions, so this
  section may produce no rows while related queries work normally.
- Region breakdown resolution is chosen by Google (states for a country, countries for
  worldwide). City-level data is not available.
- Values are relative interest (0–100), not absolute search volume.
- Trending searches / daily trends pages are not supported; only explore data.

# Changelog

This Actor's version history is a separate document: https://apify.com/innolabs/google-trends-scraper/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

Terms to compare, max 50. Google compares at most 5 per request, so larger lists are split into groups of 5 automatically. Provide keywords, explore URLs, or both.

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

Optional. Paste URLs from trends.google.com/trends/explore. Each URL is scraped with its own search terms (q), country (geo), time range (date), category (cat) and property (gprop); the form fields below are ignored for it.

## `geo` (type: `array`):

Country codes (ISO 3166-1 alpha-2, e.g. US, GB, DE) or sub-regions like US-CA. Use an empty string for worldwide. Each country is queried separately.

## `timeframe` (type: `string`):

Relative timeframe ('now 7-d', 'today 12-m', 'today 5-y', 'all') or a custom range 'YYYY-MM-DD YYYY-MM-DD' (max 5 years per request).

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

Google Trends category id, 0 = all categories.

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

Search property to query.

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

One data point per timestamp per keyword.

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

One data point per region (state/metro/country, decided by Google) per keyword.

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

Top and rising related search queries per keyword.

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

Top and rising related entities. Google currently returns an empty list to anonymous scraper sessions, so this section is often empty.

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

Hard cap on dataset items. The run stops cleanly when reached.

## `requestDelaySec` (type: `number`):

Pause inserted between Google requests. Trends throttles per IP aggressively.

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

Retries on 429/5xx with exponential backoff and a fresh session (new cookie + widget tokens).

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

Proxy for Google Trends. Residential proxies are strongly recommended: datacenter IPs are throttled almost immediately.

## `debug` (type: `boolean`):

Verbose logs for development.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "startUrls": [
    {
      "url": "https://trends.google.com/trends/explore?q=chatgpt,gemini&geo=GB&date=today%203-m"
    }
  ],
  "geo": [
    "US"
  ],
  "timeframe": "today 12-m",
  "category": 0,
  "property": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "maxItems": 5000,
  "requestDelaySec": 4,
  "maxRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All items produced by the run, one JSON object per record.

# 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 = {
    "keywords": [
        "bitcoin",
        "ethereum"
    ],
    "geo": [
        "US"
    ],
    "timeframe": "today 12-m"
};

// Run the Actor and wait for it to finish
const run = await client.actor("innolabs/google-trends-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 = {
    "keywords": [
        "bitcoin",
        "ethereum",
    ],
    "geo": ["US"],
    "timeframe": "today 12-m",
}

# Run the Actor and wait for it to finish
run = client.actor("innolabs/google-trends-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 '{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "geo": [
    "US"
  ],
  "timeframe": "today 12-m"
}' |
apify call innolabs/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,innolabs/google-trends-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/iekGGObxV0tYznnPZ/builds/SaeFagFEMOvLtyelm/openapi.json
