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

Fast, reliable Google Trends data: interest over time, related queries, related topics, and interest by region for any keyword, country, and timeframe. A maintained replacement for the dead pytrends library — survives Google rate limits via rotating residential proxies. $4 per 1,000 results.

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

## Pricing

from $4.00 / 1,000 result items

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 trends data by keyword

### What does Google Trends Scraper do?

Google Trends Scraper extracts **search interest data from [Google Trends](https://trends.google.com)** for any list of keywords — no browser, no API key, no rate-limit babysitting. For each keyword it can return:

- **Interest over time** — the 0–100 search interest curve for any time range from the past hour to 2004–present
- **Related queries** — top and rising searches connected to your keyword (rising includes "Breakout" terms)
- **Related topics** — top and rising topics with their category
- **Interest by region** — which countries, states, or cities search for your term the most

Built for **reliability first**: it uses lightweight HTTP requests (not a heavy headless browser), rotates proxies and sessions automatically, and retries failed requests with fresh IPs. You pay only for results delivered, and runs can be scheduled, triggered by API, or wired into any integration on the Apify platform.

### Why use Google Trends Scraper?

- **pytrends is dead.** The popular Python library stopped working in 2025 and is unmaintained. This Actor is a hosted, maintained replacement.
- **Market and product research** — validate demand for a product, niche, or content idea before you invest in it.
- **SEO and content planning** — find rising queries and breakout topics before they peak.
- **Brand and competitor tracking** — schedule daily runs and watch interest in your brand vs. competitors.
- **Trading and forecasting signals** — search interest is a leading indicator for tickers, crypto, retail demand, and consumer behavior.
- **No quota lottery** — Google's official Trends API is alpha-only with limited access. This works today for everyone.

### How to use Google Trends Scraper

1. Click **Try for free** and open the Actor in Apify Console.
2. Enter one or more **search terms** (one per line).
3. Pick a **country** (or leave empty for worldwide) and a **time range**.
4. Choose which **data types** you want (interest over time, related queries, related topics, interest by region).
5. Click **Start**. Results land in the dataset within seconds to a couple of minutes.
6. Download the data as **JSON, CSV, Excel, or HTML**, or pull it via API.

### Input

```json
{
    "searchTerms": ["bitcoin", "ethereum"],
    "geo": "US",
    "timeframe": "today 12-m",
    "dataTypes": ["interestOverTime", "relatedQueries"]
}
````

| Field | Description | Default |
|---|---|---|
| `searchTerms` | Keywords to scrape (required) | — |
| `geo` | Country/region code (`US`, `GB`, `US-CA`, empty = worldwide) | worldwide |
| `timeframe` | `now 1-H` to `all` (2004–present) | `today 12-m` |
| `dataTypes` | Any of `interestOverTime`, `relatedQueries`, `relatedTopics`, `interestByRegion` | interest + related queries |
| `category` | Google Trends category ID to narrow context | 0 (all) |
| `proxyConfiguration` | Residential proxies recommended | residential |

### Output

One dataset item per keyword per data type. Example interest-over-time item:

```json
{
    "dataType": "interestOverTime",
    "keyword": "bitcoin",
    "geo": "US",
    "timeframe": "today 12-m",
    "data": [
        { "timestamp": 1717200000, "date": "Jun 1, 2026", "value": 73, "hasData": true },
        { "timestamp": 1717804800, "date": "Jun 8, 2026", "value": 80, "hasData": true }
    ]
}
```

Example related-queries item:

```json
{
    "dataType": "relatedQueries",
    "keyword": "bitcoin",
    "data": {
        "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100" }],
        "rising": [{ "query": "bitcoin etf", "value": 4350, "formattedValue": "Breakout" }]
    }
}
```

You can download the dataset in JSON, CSV, Excel, or HTML from the **Storage** tab or via the API.

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

Pricing is **pay-per-result**: you're charged a small fee per result item delivered, nothing for failed requests. A typical run with 10 keywords and 2 data types = 20 result items. Scheduled daily tracking of a 50-keyword watchlist costs a few dollars per month.

### Tips

- **Keep keyword batches reasonable** (under ~100 per run) for the fastest turnaround.
- **Schedule it**: pair this Actor with an Apify Schedule to build a daily time series of interest data — Google Trends only shows relative values, so consistent scheduled snapshots are how you build absolute history.
- **Use `geo` + region data types together** to find where demand is concentrated before launching local campaigns.
- Values are **relative** (0–100 within your query window), not absolute search volumes — that's how Google Trends works everywhere.

### FAQ and disclaimers

**Is it legal to scrape Google Trends?** This Actor extracts only public, anonymous, aggregated data — no personal information. You're responsible for using the data in line with applicable laws and Google's terms.

**Why do some keywords return empty data?** Very low-volume terms have no Trends data; Google returns an empty timeline. The Actor saves the empty result rather than failing.

**Something broken or missing?** Open an issue on the Actor's **Issues** tab — reliability reports get fixed fast. Custom data needs (more widgets, comparisons, CSV shapes) are welcome too.

More docs and use cases: [apify.alecrodriguez.net/google-trends](https://apify.alecrodriguez.net/google-trends)

# Actor input Schema

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

Keywords to get Google Trends data for. One result set per keyword.

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

Two-letter country code like US, GB, DE, or a region code like US-CA. Leave empty for worldwide.

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

Time range for the trends data.

## `dataTypes` (type: `array`):

Which Google Trends datasets to extract for each keyword. Each extracted dataset counts as one result.

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

Google Trends category ID to narrow results. 0 = all categories. See Google Trends category list for IDs.

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

Language code for localized labels (hl parameter).

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

Proxies to use. Residential proxies strongly recommended — Google rate-limits datacenter IPs aggressively.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "dataTypes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "category": 0,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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": [
        "bitcoin"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("4l3c/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": ["bitcoin"],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper",
        "description": "Fast, reliable Google Trends data: interest over time, related queries, related topics, and interest by region for any keyword, country, and timeframe. A maintained replacement for the dead pytrends library — survives Google rate limits via rotating residential proxies. $4 per 1,000 results.",
        "version": "0.1",
        "x-build-id": "ADN5gsf1i1JenftA0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/4l3c~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-4l3c-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/4l3c~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-4l3c-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/4l3c~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-4l3c-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 to get Google Trends data for. One result set per keyword.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "geo": {
                        "title": "Country / region",
                        "type": "string",
                        "description": "Two-letter country code like US, GB, DE, or a region code like US-CA. Leave empty for worldwide.",
                        "default": ""
                    },
                    "timeframe": {
                        "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"
                    },
                    "dataTypes": {
                        "title": "Data to extract",
                        "type": "array",
                        "description": "Which Google Trends datasets to extract for each keyword. Each extracted dataset counts as one result.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "interestOverTime",
                                "interestByRegion",
                                "relatedQueries",
                                "relatedTopics"
                            ],
                            "enumTitles": [
                                "Interest over time",
                                "Interest by region",
                                "Related queries",
                                "Related topics"
                            ]
                        },
                        "default": [
                            "interestOverTime",
                            "relatedQueries"
                        ]
                    },
                    "category": {
                        "title": "Category ID",
                        "type": "integer",
                        "description": "Google Trends category ID to narrow results. 0 = all categories. See Google Trends category list for IDs.",
                        "default": 0
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Language code for localized labels (hl parameter).",
                        "default": "en-US"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxies to use. Residential proxies strongly recommended — Google rate-limits datacenter IPs aggressively.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
