# 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
- **Features:** Limited permissions
- **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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Trends Scraper 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call vertaizen/google-trends-fast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vertaizen/google-trends-fast"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wzppMZq42PTpJbrkw/builds/7Arc2DyvC29PcD4ZL/openapi.json
