# Google Trends Scraper — Interest Over Time & Related (`vertaizen/google-trends-fast`) Actor

Fast, reliable Google Trends scraper API. Get interest-over-time plus top & rising related queries for any keyword and geo — clean JSON, one item per keyword. Built to stay reliable where the popular official Trends actor breaks. Failed keywords are never charged. MCP-ready.

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

## Pricing

from $10.00 / 1,000 keywords

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 API — Fast, Reliable Interest & Related Queries

A **fast, reliable Google Trends scraper API** that returns clean **interest-over-time** data and **top & rising related queries** for any keyword, in any country — via the same unofficial public Google Trends API that powers `pytrends`. Built specifically to be **reliable where the popular official Google Trends actor breaks**: the most-installed Trends actor has ~10k users but only ~3.1★ because the endpoint is semi-protected and its runs frequently return errors or empty data. This actor is engineered around that fragility — realistic browser headers, optional Apify Proxy routing, one keyword pulled at a time, and a hard rule that **you are never charged for a keyword that failed**.

If you need a **Google Trends API** you can actually schedule and trust — for keyword research, market research or a data pipeline — this is built for exactly that.

### Why this actor over the official Google Trends actor?

The official actor is popular but low-rated precisely because it breaks. Here's the honest comparison:

| | **This Google Trends Scraper API** | The popular official Trends actor (~3.1★) |
|---|---|---|
| Reliability | Per-keyword isolation, consent-wall detection | Runs frequently error out or return empty |
| Related queries (top + rising) | ✅ Included | Often missing or partial |
| Charging for failed keywords | ❌ Never — failed keywords are free | You can pay for empty results |
| Speed | Plain `fetch`, no headless browser | Heavier |
| Proxy | Apify Proxy on by default | Varies |
| Output shape | One clean item per keyword | Varies |

- **Reliability first.** Each keyword is queried independently, so one blocked or empty keyword never poisons the rest of your run. Consent/redirect walls are detected and reported instead of silently returning garbage.
- **Speed.** Plain `fetch` against Google's JSON API — no headless browser overhead. A keyword resolves in two lightweight requests.
- **Related queries included.** Not just the interest curve — you also get **top** and **rising** related search queries, the part most keyword-research workflows actually need.
- **Fair pricing.** Pay per keyword successfully returned. Failed keywords are written to a `FAILED` record and **never charged**.
- **AI-agent ready.** Flat input, clean JSON output. Works out of the box via the Apify MCP server for LLM pipelines and agents.

### What you get for each keyword

```json
{
  "keyword": "bitcoin",
  "geo": "US",
  "timeRange": "today 12-m",
  "interestOverTime": [
    { "date": "2025-07-06T00:00:00.000Z", "value": 61 },
    { "date": "2025-07-13T00:00:00.000Z", "value": 68 },
    { "date": "2025-07-20T00:00:00.000Z", "value": 100 }
  ],
  "averageInterest": 74.3,
  "peakValue": 100,
  "peakDate": "2025-07-20T00:00:00.000Z",
  "relatedQueries": {
    "top": [
      { "query": "bitcoin price", "value": 100 },
      { "query": "bitcoin etf", "value": 74 }
    ],
    "rising": [
      { "query": "bitcoin halving 2028", "value": 250 }
    ]
  },
  "scrapedAt": "2026-07-02T12:00:00.000Z"
}
````

One dataset item per keyword (interest curve + summary stats + related queries together), which is the most convenient shape for keyword research and for feeding an LLM.

### How to use it

1. **Add keywords** — one or more search terms (e.g. `bitcoin`, `ai agents`, `black friday`).
2. **(Optional) Set a geo** — a country code like `US`, `GB`, `DE`, or a sub-region like `US-CA`. Leave empty for worldwide.
3. **Pick a time range** — past day, 7 days, month, 3 months, 12 months, or 5 years.
4. **(Optional) Toggle related queries** — on by default; turn off for a faster interest-only pull.
5. **Run** — or **schedule** it (e.g. weekly) to monitor how a keyword's interest and related queries evolve over time.

### Use cases

Each of these is a real search buyers make:

- **"Google Trends API for keyword research"** — find rising related queries to target before they peak, and see seasonal interest for your head terms.
- **"Measure demand for a product or brand over time"** — quantify interest across regions and time for market research and go-to-market timing.
- **"Time content and launches to a keyword's interest curve"** — plan articles and campaigns around when demand actually rises.
- **"Track a keyword's momentum week over week"** — schedule the actor and watch a term's trajectory and its emerging related queries.
- **"A reliable pytrends alternative I can schedule"** — the same data source as `pytrends`, but hosted, scheduled, and with failed keywords never charged.

### Pricing

**Pay per keyword.** You are charged once per keyword that returns real data (interest-over-time + related queries in a single pull). Keywords that fail — blocked, empty, or malformed — are recorded in the run's `FAILED` key-value record and are **never charged**. No subscription, no minimum.

### FAQ

#### How is this different from the official Google Trends actor?

Same data source, different engineering priorities. The official actor is popular but low-rated because the endpoint is semi-protected and its runs often break. This actor detects consent/redirect blocks, isolates each keyword, routes through Apify Proxy by default, and refuses to charge for keywords that returned nothing.

#### Why does the official Google Trends actor fail so often?

Google's Trends endpoint is semi-protected: it can serve a consent or redirect wall to the request, and a heavier headless-browser approach hits those walls and returns errors or empty data. This actor is built defensively around that — realistic headers, proxy routing, per-keyword isolation, and honest failure reporting instead of silent garbage.

#### Is this a pytrends alternative?

Yes. It uses the same public Google Trends JSON endpoints `pytrends` uses, but hosted on Apify — so you get scheduling, retries, proxy routing and clean JSON output without maintaining a Python script, and you're never charged for keywords that failed.

#### Where does the data come from?

The public, unofficial Google Trends JSON API (`/trends/api/explore` → `/widgetdata/multiline` and `/widgetdata/relatedsearches`) — the same endpoints `pytrends` uses. No login, no personal data. See [Google Trends](https://trends.google.com/trends/).

#### What do the interest values mean?

Google Trends normalizes search interest to a 0–100 scale within each query, where 100 is the peak for that keyword over the selected time range. `averageInterest` and `peakValue`/`peakDate` are computed from that series.

#### Why do I sometimes get fewer results than keywords?

A keyword can fail if Google serves a consent/redirect wall to the request IP or if the term has no meaningful search volume. Failed keywords appear in the `FAILED` record (not charged). Keeping Apify Proxy enabled (the default) improves success rates.

#### Can I use a proxy?

Yes — Apify Proxy is enabled by default (`useApifyProxy: true`, no named group, so it works on any account). It routes requests through Apify's IPs to reduce blocking.

#### Can AI agents use this actor?

Yes. The input schema is flat and agent-friendly, and every Apify actor is consumable via the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), so agents can call it as a tool.

#### Which geos and time ranges are supported?

Any Trends geo code (country like `US` or sub-region like `US-CA`), and time ranges from the past day up to the past 5 years.

# Actor input Schema

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

Search terms to pull Google Trends data for. Each keyword is queried separately (its own comparison item) for reliability. Examples: `bitcoin`, `ai agents`, `black friday`.

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

Two-letter country code (e.g. `US`, `GB`, `DE`) or a Trends sub-region code (e.g. `US-CA`). Leave empty for worldwide.

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

How far back the interest-over-time series goes.

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

Also fetch the top and rising related search queries for each keyword. Turn off for a faster, interest-only pull.

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

Google Trends blocks datacenter IPs. RESIDENTIAL proxy is required and set by default. A sticky session keeps the warmed consent cookie valid across requests.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "includeRelatedQueries": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "keywords": [
        "bitcoin",
        "ethereum"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "keywords": [
        "bitcoin",
        "ethereum",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper — Interest Over Time & Related",
        "description": "Fast, reliable Google Trends scraper API. Get interest-over-time plus top & rising related queries for any keyword and geo — clean JSON, one item per keyword. Built to stay reliable where the popular official Trends actor breaks. Failed keywords are never charged. MCP-ready.",
        "version": "1.0",
        "x-build-id": "7Arc2DyvC29PcD4ZL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/vertaizen~google-trends-fast/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-vertaizen-google-trends-fast",
                "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/vertaizen~google-trends-fast/runs": {
            "post": {
                "operationId": "runs-sync-vertaizen-google-trends-fast",
                "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/vertaizen~google-trends-fast/run-sync": {
            "post": {
                "operationId": "run-sync-vertaizen-google-trends-fast",
                "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": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Search terms to pull Google Trends data for. Each keyword is queried separately (its own comparison item) for reliability. Examples: `bitcoin`, `ai agents`, `black friday`.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "geo": {
                        "title": "Geo (country/region code)",
                        "type": "string",
                        "description": "Two-letter country code (e.g. `US`, `GB`, `DE`) or a Trends sub-region code (e.g. `US-CA`). Leave empty for worldwide.",
                        "default": ""
                    },
                    "timeRange": {
                        "title": "Time range",
                        "enum": [
                            "now 1-d",
                            "now 7-d",
                            "today 1-m",
                            "today 3-m",
                            "today 12-m",
                            "today 5-y"
                        ],
                        "type": "string",
                        "description": "How far back the interest-over-time series goes.",
                        "default": "today 12-m"
                    },
                    "includeRelatedQueries": {
                        "title": "Include related queries (top & rising)",
                        "type": "boolean",
                        "description": "Also fetch the top and rising related search queries for each keyword. Turn off for a faster, interest-only pull.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Google Trends blocks datacenter IPs. RESIDENTIAL proxy is required and set by default. A sticky session keeps the warmed consent cookie valid across requests.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
