# Google Trends Scraper — Fast & Reliable (`signalbench/google-trends-scraper`) Actor

Scrape Google Trends interest over time, interest by region, related queries, and related topics for any keyword. API-based (no browser), built for reliability. Export to JSON, CSV, Excel.

- **URL**: https://apify.com/signalbench/google-trends-scraper.md
- **Developed by:** [SignalBench](https://apify.com/signalbench) (community)
- **Categories:** SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.00 / 1,000 keyword scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 — Fast & Reliable (No Browser)

Scrape **Google Trends** data for any keyword without the official API: **interest over time**, **interest by region**, **related queries**, and **related topics**. Built API-first (no browser automation), so runs are fast, cheap, and reliable. Export results as **JSON, CSV, Excel, or XML**, or pull them straight through the Apify API into your own app, agent, or spreadsheet.

> **Try it free:** Apify's free plan includes $5/month in credit — about **1,000 keywords/month** on this Actor at no cost. No waitlist, no quota approval.

**No per-datapoint games, never charged for failures.** You pay a flat **$5 per 1,000 keywords** — one charge per *complete* keyword (interest over time plus any extras you select), billed only when Google actually returns data. No tricks that bill you 100× per keyword, no charges for failed or empty terms.

### Why this Google Trends scraper?

- ⚡ **API-based, not browser-based** — no Puppeteer, no broken selectors, no 10× compute cost. This is why it stays fast and cheap where browser scrapers time out.
- 🛡️ **Built for reliability** — residential proxy rotation, cookie warm-up, automatic session rotation on rate limits (HTTP 429/403), and exponential backoff with jitter.
- 💰 **Fair, transparent pricing** — **$5 per 1,000 keywords** ($0.005 each), charged only per *successfully scraped keyword*. **Failed terms and no-data terms are never charged.**
- ✅ **Honest run status** — partial failures don't silently "succeed"; every term's outcome is in the run log and status message. The run only fails if *zero* keywords succeed.

### Google Trends API alternative

Google announced an official **Google Trends API** in 2025, but it's an **alpha** open only to a small group of approved testers with tight quotas. For everyone else there's still no public API. This Actor is the practical, available-today alternative — and it covers things the alpha API doesn't expose, like **related queries, related topics, and all geographies** with no waitlist and no quota.

### pytrends alternative

The popular **pytrends** Python library was **archived in April 2025** and no longer maintained, so it breaks against current Google Trends endpoints. This Actor is a maintained, hosted **pytrends alternative** — call it from any language over HTTP, no library to patch, no endpoints to chase when Google changes them.

### What data can it scrape?

| Data type | Description |
|---|---|
| **Interest over time** | Normalized search interest (0–100) timeline for any range, from the past hour to 2004–present |
| **Interest by region** | Country / region / subregion / city-level breakdown |
| **Related queries** | Top & rising queries with growth values and breakout flags |
| **Related topics** | Top & rising topics with growth values |

Supports all Google properties — **Web Search, Image Search, News, YouTube, and Shopping** — plus category filters and custom date ranges.

### Input example

```json
{
    "searchTerms": ["claude ai", "chatgpt"],
    "timeRange": "today 12-m",
    "geo": "US",
    "includeInterestOverTime": true,
    "includeRelatedQueries": true
}
````

### Output example

```json
{
    "searchTerm": "claude ai",
    "geo": "US",
    "timeRange": "today 12-m",
    "averageInterest": 62.4,
    "peakDate": "May 11 – 17, 2026",
    "interestOverTime": [
        { "date": "Jun 15 – 21, 2025", "value": 38, "isPartial": false }
    ],
    "relatedQueries": {
        "top": [{ "label": "claude api", "value": 100 }],
        "rising": [{ "label": "claude cowork", "formattedValue": "+1,250%" }]
    },
    "scrapedAt": "2026-06-12T18:00:00.000Z"
}
```

Export the dataset as **CSV, Excel, JSON, or XML** from the Apify Console, or fetch it via the Apify API / SDK.

### How it works

The Actor calls the same internal JSON endpoints the Google Trends website uses (`/trends/api/explore` → `/trends/api/widgetdata/*`), using browser-grade TLS fingerprints and rotating residential proxy sessions. When Google rate-limits a session, the Actor transparently warms up a fresh session and retries with backoff — you just get your data, no browser to render or break.

### Use it from n8n, Zapier, Make, MCP, and LangChain

Every Apify Actor is exposed via API and through Apify's integrations, so you can run this **Google Trends scraper** on a schedule or as a step in your automation:

- **n8n / Zapier / Make** — trigger a run and pipe trends data into sheets, dashboards, or alerts
- **MCP / LangChain** — give an AI agent live Google Trends data as a tool
- **Apify API & SDK** — call it directly from your own backend, then export CSV/JSON

### FAQ

**Is there an official Google Trends API?** Google announced an alpha API in 2025, but access is limited to a small group of approved testers with tight quotas. This Actor is the practical alternative for everyone else, and it returns related queries/topics the alpha doesn't.

**How much does it cost?** $0.005 per successfully scraped keyword — **$5 per 1,000 keywords**. You're never charged for failed terms or for terms Google has no data for. The free Apify plan's $5 monthly credit covers ~1,000 keywords.

**Is scraping Google Trends legal?** This Actor extracts publicly available, anonymized, aggregated data. As always, consult your own counsel for your specific use case.

**Why residential proxies?** Google rate-limits datacenter IPs aggressively. The default residential proxy configuration is what keeps the success rate high. Residential proxy access requires a paid Apify plan.

# Actor input Schema

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

Keywords or topics to scrape from Google Trends (one per row).

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

Time range for the trends data.

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

Optional custom range in Google Trends format, e.g. "2025-01-01 2025-06-01".

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

Two-letter country code (e.g. US, GB, DE) or region code (e.g. US-CA). Leave empty for Worldwide.

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

Restrict trends to a Google Trends category. Defaults to all categories.

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

Which Google property to get trends for.

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

Scrape the interest-over-time timeline.

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

Scrape the geographic breakdown.

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

Scrape top & rising related queries.

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

Scrape top & rising related topics.

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

Interface language (hl parameter), affects labels in output.

## `maxRetriesPerTerm` (type: `integer`):

How many times to retry a term with a fresh proxy session before giving up.

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

Residential proxies are strongly recommended — Google Trends rate-limits datacenter IPs aggressively.

## Actor input object example

```json
{
  "searchTerms": [
    "claude ai",
    "chatgpt"
  ],
  "timeRange": "today 12-m",
  "geo": "",
  "category": "0",
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": false,
  "includeRelatedQueries": false,
  "includeRelatedTopics": false,
  "language": "en-US",
  "maxRetriesPerTerm": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped trends items in JSON.

## `resultsCsv` (type: `string`):

All scraped trends items as a CSV export.

## `viewInConsole` (type: `string`):

Open the run (with its results dataset) in the Apify Console.

# 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": [
        "claude ai",
        "chatgpt"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("signalbench/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 = {
    "searchTerms": [
        "claude ai",
        "chatgpt",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("signalbench/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 '{
  "searchTerms": [
    "claude ai",
    "chatgpt"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call signalbench/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper — Fast & Reliable",
        "description": "Scrape Google Trends interest over time, interest by region, related queries, and related topics for any keyword. API-based (no browser), built for reliability. Export to JSON, CSV, Excel.",
        "version": "1.0",
        "x-build-id": "h4Y4Crr8GuOXbUZkm"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/signalbench~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-signalbench-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/signalbench~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-signalbench-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/signalbench~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-signalbench-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",
                "required": [
                    "searchTerms"
                ],
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "Keywords or topics to scrape from Google Trends (one per row).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "timeRange": {
                        "title": "Time range",
                        "enum": [
                            "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"
                        ],
                        "type": "string",
                        "description": "Time range for the trends data.",
                        "default": "today 12-m"
                    },
                    "customTimeRange": {
                        "title": "Custom time range (overrides above)",
                        "type": "string",
                        "description": "Optional custom range in Google Trends format, e.g. \"2025-01-01 2025-06-01\"."
                    },
                    "geo": {
                        "title": "Geography",
                        "type": "string",
                        "description": "Two-letter country code (e.g. US, GB, DE) or region code (e.g. US-CA). Leave empty for Worldwide.",
                        "default": ""
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "0",
                            "3",
                            "47",
                            "44",
                            "22",
                            "12",
                            "5",
                            "7",
                            "71",
                            "8",
                            "45",
                            "65",
                            "11",
                            "13",
                            "958",
                            "19",
                            "16",
                            "299",
                            "14",
                            "66",
                            "29",
                            "533",
                            "174",
                            "18",
                            "20",
                            "67"
                        ],
                        "type": "string",
                        "description": "Restrict trends to a Google Trends category. Defaults to all categories.",
                        "default": "0"
                    },
                    "property": {
                        "title": "Search property",
                        "enum": [
                            "",
                            "images",
                            "news",
                            "youtube",
                            "froogle"
                        ],
                        "type": "string",
                        "description": "Which Google property to get trends for.",
                        "default": ""
                    },
                    "includeInterestOverTime": {
                        "title": "Interest over time",
                        "type": "boolean",
                        "description": "Scrape the interest-over-time timeline.",
                        "default": true
                    },
                    "includeInterestByRegion": {
                        "title": "Interest by region",
                        "type": "boolean",
                        "description": "Scrape the geographic breakdown.",
                        "default": false
                    },
                    "includeRelatedQueries": {
                        "title": "Related queries",
                        "type": "boolean",
                        "description": "Scrape top & rising related queries.",
                        "default": false
                    },
                    "includeRelatedTopics": {
                        "title": "Related topics",
                        "type": "boolean",
                        "description": "Scrape top & rising related topics.",
                        "default": false
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Interface language (hl parameter), affects labels in output.",
                        "default": "en-US"
                    },
                    "maxRetriesPerTerm": {
                        "title": "Max retries per term",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times to retry a term with a fresh proxy session before giving up.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Residential proxies are strongly recommended — Google Trends rate-limits datacenter IPs aggressively."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
