# Google Trends Scraper — Queries, Regions & Trending Now (`glitchbound/google-trends-scraper`) Actor

Scrape Google Trends: interest over time, interest by region, related and rising queries, and real-time Trending Now searches. Batch up to 100 keywords, any country, any timeframe. Charged per row of real data — a keyword that returns nothing costs nothing.

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

## Pricing

from $1.25 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

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

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

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

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

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

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

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

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

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


# README

## Google Trends Scraper — Queries, Regions & Trending Now

Extract **Google Trends data at scale**: search interest over time, interest by country and region, related queries (top + rising), and real-time **Trending Now** searches — up to 100 keywords per run, any country, any timeframe.

### If it returns nothing, you pay nothing

The usual way a Google Trends scraper wastes your money is that it runs for twenty minutes, hits Google's rate limits, and hands you an empty dataset — after billing you the whole time.

This one is built so that can't happen:

- **You are charged per row of real data.** Billing on dataset writes is switched off entirely, so a failed keyword produces an `error` row that costs **$0.00**. No data, no charge.
- **Memory is capped at 512 MB** (most Actors default to 4 GB). Compute is billed as memory × time, so a slow run here costs a fraction of what the same run costs elsewhere.
- **No headless browser.** Plain HTTP against Google's own endpoints — runs finish in about a minute, not twenty.
- **One bad keyword never kills the run.** Each keyword is isolated; the other 99 still return.
- **Your run charge limit is honored.** Set a maximum charge and the Actor stops cleanly at it instead of burning compute for revenue it can't collect.

Rotating proxies and staged backoff handle Google's rate limiting, which is what causes most empty results in the first place.

### What you get

| Data type | What it returns |
|---|---|
| **Keyword comparison** | Up to 5 keywords on **one shared 0–100 scale**, with each one's average, peak, and rank |
| **Interest over time** | 0–100 search-interest score per week/day/hour for your timeframe |
| **Interest by region** | Score per country, state, or US metro area |
| **Related queries** | Top related searches + **rising** searches (with growth %, including "Breakout") |
| **Trending Now** | Real-time trending searches for any country, with approximate traffic and linked news |

### What this Actor deliberately does not return

Two Google Trends data types are widely advertised by scrapers and **do not actually work**, because Google itself stopped returning them:

| Not included | Why |
|---|---|
| **Related topics** | Google's endpoint returns an empty ranked list on both of its backends. Every result would be blank. |
| **City-level interest** | Google returns 200 cities with `hasData: false` on every one. Region (51) and US metro (210) do return real data, and both are supported. |

Shipping an option that silently returns nothing is the fastest way to waste your money, so these were removed rather than left in the input schema to look impressive. Everything the schema offers returns data.

### Use cases

- **SEO & content research** — find rising queries before they peak; catch "Breakout" terms early
- **E-commerce & dropshipping** — validate product demand by country before you spend on ads
- **Market research** — compare seasonality and regional demand across markets
- **Trading & finance signals** — track search interest for tickers, brands, and events
- **AI agents & LLM pipelines** — clean JSON via API, ready for automated workflows
- **News & social monitoring** — Trending Now with attached news stories, refreshed in real time

### Compare keywords head-to-head

Set `compareKeywords: true` and every keyword is scored against the **same** ceiling, so the numbers are directly comparable — the question Google Trends is most often asked:

```json
{ "keywords": ["nike", "adidas", "new balance", "hoka"], "compareKeywords": true, "geo": "US" }
````

```
#1  nike           avg 53.6   peak 100
#2  adidas         avg 23.0   peak  52
#3  new balance    avg 16.3   peak  34
#4  hoka           avg  6.6   peak  14
```

Each row carries the full timeline plus `averageInterest`, `peakInterest`, and `rank`, so you can chart it or sort it without post-processing.

### Input example

```json
{
  "keywords": ["matcha", "protein powder", "creatine gummies"],
  "dataTypes": ["interestOverTime", "relatedQueries", "interestByRegion"],
  "geo": "US",
  "timeframe": "today 12-m",
  "trendingNowGeo": "US"
}
```

### Output example (one row per keyword × data type)

```json
{
  "keyword": "matcha",
  "dataType": "relatedQueries",
  "geo": "US",
  "timeframe": "today 12-m",
  "top": [{ "query": "matcha latte", "value": 100 }],
  "rising": [{ "query": "matcha shortage", "formattedValue": "Breakout" }]
}
```

Export as JSON, CSV, Excel, or feed it straight into Google Sheets, Make, Zapier, LangChain, or your own code via the [Apify API](https://docs.apify.com/api/v2).

### Pricing

Pay per result: you are charged a small fee per successfully returned data row (keyword × data type). Failed lookups cost nothing. A run with 10 keywords × 2 data types = 20 results.

### Notes & fair use

- Google Trends values are **relative** (0–100 within your query), not absolute search volumes.
- By default each keyword is normalized independently. Set `compareKeywords: true` to put up to 5 on one shared 0–100 scale (see above).
- Regions with no search data are omitted rather than returned as zeros, so every row you get is a real signal.
- This Actor collects **publicly available, aggregated, anonymous** data only — no personal data is touched.

### FAQ

**Why do I sometimes see a keyword with an `error` field?**
Google aggressively rate-limits. The Actor retries with rotating proxies and exponential backoff; in the rare case a keyword still fails, it's reported transparently — and not charged.

**Does it support any country?**
Yes — worldwide by default, or any ISO country/region code (`US`, `GB`, `DE`, `IL`, `US-CA`…).

**Can I schedule it?**
Yes — use Apify Schedules to run it hourly/daily and deliver fresh trend data to your stack automatically.

# Actor input Schema

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

Search terms to analyze, one per line. Each keyword is fetched independently (its scores are normalized 0–100 against itself). Up to 100 per run.

## `compareKeywords` (type: `boolean`):

Score all your keywords on ONE shared 0–100 scale, so they can be compared directly (e.g. is Nike or Adidas trending harder?). Uses the first 5 keywords, and returns each one's average, peak, and rank. Leave off to analyze each keyword independently.

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

Which datasets to fetch for every keyword. Ignored when 'Compare keywords' is on.

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

Two-letter country code (US, GB, DE, IL…), or a region like US-NY. Leave empty for worldwide.

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

Google Trends timeframe.

## `regionResolution` (type: `string`):

Granularity for interest-by-region.

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

Google Trends category ID to narrow results (0 = all categories). Example: 71 = Food & Drink.

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

Which Google surface to measure.

## `trendingNowGeo` (type: `string`):

Also fetch real-time trending searches for this country code (e.g. US). Works with or without keywords.

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

Proxy settings. Keep Apify Proxy enabled — Google rate-limits aggressively without rotation.

## Actor input object example

```json
{
  "keywords": [
    "coffee"
  ],
  "compareKeywords": false,
  "dataTypes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "timeframe": "today 12-m",
  "regionResolution": "COUNTRY",
  "category": 0,
  "property": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Interest over time, regional breakdowns, related queries and trending searches.

# 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": [
        "coffee"
    ],
    "geo": "",
    "trendingNowGeo": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("glitchbound/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 = {
    "keywords": ["coffee"],
    "geo": "",
    "trendingNowGeo": "",
}

# Run the Actor and wait for it to finish
run = client.actor("glitchbound/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 '{
  "keywords": [
    "coffee"
  ],
  "geo": "",
  "trendingNowGeo": ""
}' |
apify call glitchbound/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper — Queries, Regions & Trending Now",
        "description": "Scrape Google Trends: interest over time, interest by region, related and rising queries, and real-time Trending Now searches. Batch up to 100 keywords, any country, any timeframe. Charged per row of real data — a keyword that returns nothing costs nothing.",
        "version": "0.2",
        "x-build-id": "jrCqodMbXk0RbbzJd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/glitchbound~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-glitchbound-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/glitchbound~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-glitchbound-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/glitchbound~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-glitchbound-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Search terms to analyze, one per line. Each keyword is fetched independently (its scores are normalized 0–100 against itself). Up to 100 per run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "compareKeywords": {
                        "title": "Compare keywords against each other",
                        "type": "boolean",
                        "description": "Score all your keywords on ONE shared 0–100 scale, so they can be compared directly (e.g. is Nike or Adidas trending harder?). Uses the first 5 keywords, and returns each one's average, peak, and rank. Leave off to analyze each keyword independently.",
                        "default": false
                    },
                    "dataTypes": {
                        "title": "Data to fetch per keyword",
                        "type": "array",
                        "description": "Which datasets to fetch for every keyword. Ignored when 'Compare keywords' is on.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "interestOverTime",
                                "interestByRegion",
                                "relatedQueries"
                            ],
                            "enumTitles": [
                                "Interest over time",
                                "Interest by region",
                                "Related queries (top + rising)"
                            ]
                        },
                        "default": [
                            "interestOverTime",
                            "relatedQueries"
                        ]
                    },
                    "geo": {
                        "title": "Country / region",
                        "type": "string",
                        "description": "Two-letter country code (US, GB, DE, IL…), or a region like US-NY. Leave empty for worldwide."
                    },
                    "timeframe": {
                        "title": "Timeframe",
                        "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": "Google Trends timeframe.",
                        "default": "today 12-m"
                    },
                    "regionResolution": {
                        "title": "Region breakdown level",
                        "enum": [
                            "COUNTRY",
                            "REGION",
                            "DMA"
                        ],
                        "type": "string",
                        "description": "Granularity for interest-by-region.",
                        "default": "COUNTRY"
                    },
                    "category": {
                        "title": "Category ID",
                        "type": "integer",
                        "description": "Google Trends category ID to narrow results (0 = all categories). Example: 71 = Food & Drink.",
                        "default": 0
                    },
                    "property": {
                        "title": "Search surface",
                        "enum": [
                            "",
                            "images",
                            "news",
                            "youtube",
                            "froogle"
                        ],
                        "type": "string",
                        "description": "Which Google surface to measure.",
                        "default": ""
                    },
                    "trendingNowGeo": {
                        "title": "Trending Now country (optional)",
                        "type": "string",
                        "description": "Also fetch real-time trending searches for this country code (e.g. US). Works with or without keywords."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy settings. Keep Apify Proxy enabled — Google rate-limits aggressively without rotation.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
