# Google Trends Scraper (`datasteady/google-trends-scraper`) Actor

Pay Per Result Google Trends scraper — interest over time for any term, compare up to 5, 249 countries, custom date ranges. No browser, no subscription.

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

## Pricing

from $0.35 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Google Trends Scraper

**Pay Per Result Google Trends scraper — and the price you see is your entire bill.** Most Trends scrapers, including the official one, charge platform usage on top of the listed price — and their heavy architecture makes that usage expensive. This Actor was engineered for speed and efficiency from day one, and that efficiency is passed on to you: **platform usage included, retries and IP rotation on us, empty runs cost nothing.** You pay for the results you receive. Nothing else.

### Why this scraper?

Google Trends has **no official API**, and most scrapers around it are slow, fragile, and stack usage fees on top of their listed price. This Actor is different:

- 💸 **All-inclusive pricing** — no platform usage charges, no start fees, no subscription. The per-result price is the whole bill.
- ⚡ **Seconds, not minutes** — a term typically resolves in ~3-5 s, even large term lists finish fast.
- 🔁 **Built-in IP rotation** — every retry gets a fresh US residential IP. Blocks and 429s are our cost, not yours.
- 🩺 **Monitored around the clock** — scheduled health checks catch Trends-side changes before your pipeline does. In our latest load test: 100/100 successful runs.

### What does Google Trends Scraper do?

- **interest over time** — the full 0–100 timeline for any search term
- **compare up to 5 terms** (`isMultiple`) with shared normalisation — exactly like the Trends UI compare view
- **249 countries** via `geo` (e.g. `US`, `DE`, `TR`) or worldwide
- **any time range** — presets from the last hour to 2004, or `customTimeRange` with exact dates
- **category filtering** — restrict interest data to any Trends category
- **scrape by URL** — paste Trends explore URLs with all filters baked in (`startUrls`)

### Output

One dataset item per term, in the standard shape:

```json
{
  "inputUrlOrTerm": "iphone, samsung",
  "searchTerm": "iphone",
  "interestOverTime_timelineData": [
    {
      "time": "1751846400",
      "formattedTime": "Jul 6 – 12, 2026",
      "formattedAxisTime": "Jul 6, 2026",
      "value": [65],
      "hasData": [true],
      "formattedValue": ["65"]
    }
  ]
}
````

Download as JSON, CSV, Excel, XML, or JSONL — or pull it via API.

### How to use it

1. Click **Try for free**.
2. Type your terms into **Search Terms** (add several + enable **Compare Terms** for comparison mode), or paste Trends explore URLs into **Start URLs**.
3. Pick **Time Range** / **Geo** / **Category** if you need them.
4. Run — results land in the dataset in seconds.

#### Track search interest on a schedule

Put the Actor on an Apify **schedule** (daily/weekly) with your terms and a short `timeRange` (e.g. `now 7-d`): each run appends the freshest interest data to your dataset — a living time series for dashboards, SEO trend alerts, or market research. You pay per result, so a small watchlist costs almost nothing.

### Input parameters

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | Terms to analyse (up to 5 in comparison mode). |
| `startUrls` | array | Trends explore URLs — all filters (q, geo, date, cat) baked in. Alternative to searchTerms. |
| `isMultiple` | boolean | Compare terms in one normalised run (like the Trends UI compare view). |
| `timeRange` | string | `now 1-H` · `now 4-H` · `now 1-d` · `now 7-d` · `today 1-m` · `today 3-m` · `today 5-y` · `all`. Empty = last 12 months. |
| `customTimeRange` | string | Exact window `"YYYY-MM-DD YYYY-MM-DD"` — overrides `timeRange`. |
| `geo` | string | Two-letter country code; empty = worldwide. |
| `category` | string | Trends category code; empty = all. |
| `maxItems` | integer | Max output items; 0 = unlimited. |
| `includeGeo` | boolean | Also return **interest by region and city** (`interestBySubregion`, `interestByCity`). Off by default. |
| `includeRelated` | boolean | Also return **related queries and topics** (`relatedQueries_top/_rising`, `relatedTopics_top/_rising`). Off by default. |
| `viewedFrom`, `spreadsheetId`, `maxConcurrency`, `maxRequestRetries`, `pageLoadTimeoutSecs`, `skipDebugScreen` | – | Accepted for drop-in compatibility with existing configurations. |

By default each run returns **interest over time** — the fastest, cheapest result. Turn on `includeGeo` and/or `includeRelated` when you also need geographic breakdowns or related search terms; these fetch extra data per term.

### Migrating from another Trends scraper?

Input keys and output fields mirror the most-used Google Trends actor exactly — same `searchTerms`, same `interestOverTime_timelineData` item shape. **Change the actor ID, keep everything else.** Your downstream parsing continues to work unchanged, minus the monthly subscription.

### FAQ

**Is scraping Google Trends legal?** The Actor reads the same publicly available data the Trends website shows anyone, without login. Use it in line with Google's terms and your local regulations.

**Why do values top out at 100?** Trends data is relative: 100 is the peak popularity within your chosen time window and term set, not an absolute search volume.

# Actor input Schema

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

Search terms to analyse (up to 5 for comparison mode).

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

Google Trends URLs (alternative to searchTerms; filters baked into URL).

## `isMultiple` (type: `boolean`):

Run multiple terms in comparison mode.

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

Time range for trends data. Empty = last 12 months.

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

Two-letter country code (e.g. US, TR, DE). Empty = worldwide.

## `category` (type: `string`):

Trends category code (empty = all categories).

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

Custom date range 'YYYY-MM-DD YYYY-MM-DD'. Takes priority over timeRange.

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

Maximum output items. 0 = unlimited.

## `viewedFrom` (type: `string`):

Accepted for compatibility. Trends are fetched through US residential IPs; use 'geo' to filter data by country.

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

Accepted for compatibility. Google Sheets input is not yet supported — pass terms via searchTerms.

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

Accepted for compatibility. Requests are paced automatically with per-attempt IP rotation.

## `maxRequestRetries` (type: `integer`):

Accepted for compatibility. Retries with fresh residential IPs are built in.

## `pageLoadTimeoutSecs` (type: `integer`):

Accepted for compatibility. Not needed here — pages load in seconds.

## `skipDebugScreen` (type: `boolean`):

Accepted for compatibility. Debug screenshots are not produced.

## `includeGeo` (type: `boolean`):

Also fetch interestBySubregion and interestByCity. Adds requests per term (higher cost); off by default.

## `includeRelated` (type: `boolean`):

Also fetch relatedQueries and relatedTopics (top + rising). Adds requests per term (higher cost); off by default.

## `keyword` (type: `string`):

Single search term shorthand. Prefer searchTerms for drop-in compat.

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

Google Trends timeframe string (legacy; prefer timeRange). E.g. 'today 12-m'.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://trends.google.com/trends/explore?q=bitcoin&geo=US"
    }
  ],
  "isMultiple": false,
  "timeRange": "",
  "geo": "",
  "category": "",
  "maxItems": 0,
  "includeGeo": false,
  "includeRelated": false
}
```

# Actor output Schema

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

One item per term: interestOverTime\_timelineData plus related data sections. Comparison mode (isMultiple) shares normalisation across terms.

# 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 = {
    "startUrls": [
        {
            "url": "https://trends.google.com/trends/explore?q=bitcoin&geo=US"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datasteady/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 = { "startUrls": [{ "url": "https://trends.google.com/trends/explore?q=bitcoin&geo=US" }] }

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://trends.google.com/trends/explore?q=bitcoin&geo=US"
    }
  ]
}' |
apify call datasteady/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datasteady/google-trends-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper",
        "description": "Pay Per Result Google Trends scraper — interest over time for any term, compare up to 5, 249 countries, custom date ranges. No browser, no subscription.",
        "version": "0.1",
        "x-build-id": "nbR6hyzjMv04f8syj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datasteady~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datasteady-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datasteady~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datasteady-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datasteady~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datasteady-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchTerms": {
                        "title": "Search Terms",
                        "type": "array",
                        "description": "Search terms to analyse (up to 5 for comparison mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Google Trends URLs (alternative to searchTerms; filters baked into URL).",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "isMultiple": {
                        "title": "Compare Terms",
                        "type": "boolean",
                        "description": "Run multiple terms in comparison mode.",
                        "default": false
                    },
                    "timeRange": {
                        "title": "Time Range",
                        "enum": [
                            "",
                            "now 1-H",
                            "now 4-H",
                            "now 1-d",
                            "now 7-d",
                            "today 1-m",
                            "today 3-m",
                            "today 5-y",
                            "all"
                        ],
                        "type": "string",
                        "description": "Time range for trends data. Empty = last 12 months.",
                        "default": ""
                    },
                    "geo": {
                        "title": "Geo",
                        "type": "string",
                        "description": "Two-letter country code (e.g. US, TR, DE). Empty = worldwide.",
                        "default": ""
                    },
                    "category": {
                        "title": "Category",
                        "type": "string",
                        "description": "Trends category code (empty = all categories).",
                        "default": ""
                    },
                    "customTimeRange": {
                        "title": "Custom Time Range",
                        "type": "string",
                        "description": "Custom date range 'YYYY-MM-DD YYYY-MM-DD'. Takes priority over timeRange."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "type": "integer",
                        "description": "Maximum output items. 0 = unlimited.",
                        "default": 0
                    },
                    "viewedFrom": {
                        "title": "Viewed From",
                        "type": "string",
                        "description": "Accepted for compatibility. Trends are fetched through US residential IPs; use 'geo' to filter data by country."
                    },
                    "spreadsheetId": {
                        "title": "Spreadsheet ID",
                        "type": "string",
                        "description": "Accepted for compatibility. Google Sheets input is not yet supported — pass terms via searchTerms."
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "type": "integer",
                        "description": "Accepted for compatibility. Requests are paced automatically with per-attempt IP rotation."
                    },
                    "maxRequestRetries": {
                        "title": "Max Request Retries",
                        "type": "integer",
                        "description": "Accepted for compatibility. Retries with fresh residential IPs are built in."
                    },
                    "pageLoadTimeoutSecs": {
                        "title": "Page Load Timeout (s)",
                        "type": "integer",
                        "description": "Accepted for compatibility. Not needed here — pages load in seconds."
                    },
                    "skipDebugScreen": {
                        "title": "Skip Debug Screenshot",
                        "type": "boolean",
                        "description": "Accepted for compatibility. Debug screenshots are not produced."
                    },
                    "includeGeo": {
                        "title": "Include interest by region & city",
                        "type": "boolean",
                        "description": "Also fetch interestBySubregion and interestByCity. Adds requests per term (higher cost); off by default.",
                        "default": false
                    },
                    "includeRelated": {
                        "title": "Include related queries & topics",
                        "type": "boolean",
                        "description": "Also fetch relatedQueries and relatedTopics (top + rising). Adds requests per term (higher cost); off by default.",
                        "default": false
                    },
                    "keyword": {
                        "title": "Keyword (legacy)",
                        "type": "string",
                        "description": "Single search term shorthand. Prefer searchTerms for drop-in compat."
                    },
                    "timeframe": {
                        "title": "Timeframe (legacy)",
                        "type": "string",
                        "description": "Google Trends timeframe string (legacy; prefer timeRange). E.g. 'today 12-m'."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
