# Google Trends Scraper - Bulk Keywords & Comparable Scores (`donrulezz/google-trends-bulk`) Actor

Reliable Google Trends data for any number of keywords: interest over time, by region, related queries and topics, plus an unlimited-keyword comparison on one 0-100 scale. Auto-retries rate limits with fresh IPs.

- **URL**: https://apify.com/donrulezz/google-trends-bulk.md
- **Developed by:** [Ashish Agarwal](https://apify.com/donrulezz) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 1,000 keyword analyseds

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/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 – Bulk Keywords & Comparable Scores

Get Google Trends data for **any number of keywords** in one run: interest over time, interest by region, related queries (top + rising/breakout) and related topics. Turn on **Compare keywords** to rank *all* your keywords on one shared 0–100 scale – not limited to Google's 5-term comparison.

Built for reliability: when Google rate-limits, the scraper backs off and retries with a fresh IP and fresh cookies instead of failing your run.

### What you get

| Data | Per keyword |
|---|---|
| Interest over time | Full 0–100 timeline + average, peak date/value, latest value, trend direction (rising / stable / falling) and % change |
| Interest by region | Countries, states/regions, cities or US metro areas (DMA), sorted by interest |
| Related queries | Top and rising queries, including "Breakout" terms – ideal for content and SEO ideas |
| Related topics | Top and rising topics (when Google has topic data for the term) |
| Comparison | One extra result ranking every keyword on the same scale, with a combined timeline |

Works for Web, Image, News, Google Shopping and YouTube search, any country or region, any category, preset ranges (past hour → 2004-present) or a custom date range.

### Why this scraper

- **No 5-keyword limit for comparisons.** Google compares at most 5 terms at a time. This actor chains batches through an *anchor keyword* and rescales them, so 50 or 500 keywords end up on one comparable scale.
- **Doesn't give up on rate limits.** Exponential backoff + a new proxy session on every retry. You get data, not a failed run.
- **Everything in one pass.** Timeline, regions and related queries for each keyword without running several tools.
- **Summary fields ready for spreadsheets.** Average interest, trend direction and top rising query sit at the top level, so a CSV/Excel export is useful right away.
- **Pay only for keywords analysed.** Failed keywords are not charged.

### Use cases

- **SEO & content:** find rising queries and breakout topics before competitors; prioritise keyword lists by real interest.
- **E-commerce & product research:** compare product names, brands or categories over time and by region; spot seasonality.
- **Market & investment research:** track brands, tickers, technologies or competitors; detect momentum shifts.
- **Agencies & reporting:** schedule a run and get fresh Trends data in Google Sheets, Excel or your dashboard automatically.
- **AI agents:** call it through the Apify MCP server or API to give an agent live search-interest data.

### Input example

```json
{
  "keywords": ["ai agents", "chatgpt", "claude ai"],
  "geo": "US",
  "timeRange": "today 12-m",
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueries": true,
  "compareKeywords": true,
  "anchorKeyword": "claude ai"
}
```

- `geo`: two-letter country code (`US`, `IN`, `GB`, `DE`, …) or region code (`US-CA`). Empty = worldwide.
- `timeRange`: `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`. Or set `customTimeRange` to `"2025-01-01 2025-06-30"`.
- `searchProperty`: empty (web), `images`, `news`, `froogle` (Google Shopping), `youtube`.
- `category`: Google Trends category ID (0 = all).

### Output example (one keyword, sample – arrays shortened)

```json
{
  "type": "keyword",
  "keyword": "claude ai",
  "geo": "US",
  "timeRange": "today 3-m",
  "averageInterest": 72.1,
  "peakDate": "2026-10-19T00:00:00Z",
  "peakValue": 100,
  "latestValue": 81,
  "trendDirection": "stable",
  "changePercent": 3.4,
  "topRisingQuery": "anthropic claude eu ai watermarks",
  "interestOverTime": [{ "date": "2026-07-22T00:00:00Z", "value": 64, "isPartial": false }],
  "interestByRegion": [{ "geoCode": "US-DC", "geoName": "District of Columbia", "value": 100 }],
  "relatedQueries": {
    "top": [{ "query": "claude ai login", "value": 100, "formattedValue": "100" }],
    "rising": [{ "query": "anthropic claude eu ai watermarks", "value": 4250, "formattedValue": "Breakout" }]
  },
  "trendsUrl": "https://trends.google.com/trends/explore?q=claude+ai&date=today+3-m&geo=US",
  "scrapedAt": "2026-10-23T03:30:00Z"
}
```

### Output example (comparison)

```json
{
  "type": "comparison",
  "anchorKeyword": "gemini",
  "keywords": ["chatgpt", "gemini", "claude ai", "perplexity", "deepseek", "grok", "copilot"],
  "ranking": [
    { "keyword": "chatgpt", "averageInterest": 75.42 },
    { "keyword": "gemini", "averageInterest": 44.88 },
    { "keyword": "claude ai", "averageInterest": 4.41 }
  ],
  "timeline": [{ "date": "2026-10-22T00:00:00Z", "chatgpt": 84.0, "gemini": 46.0, "claude ai": 5.0 }]
}
```

### Pricing

Pay per event: you are charged per keyword analysed (each keyword result, and each keyword included in a comparison). Keywords that fail are not charged. Higher Apify plans get a Store discount automatically.

| Event | Free plan | Bronze | Silver | Gold and up |
|---|---|---|---|---|
| Keyword analysed | $0.0040 | $0.0038 | $0.0035 | $0.0032 |
| Actor start (per run, 1 GB) | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

10 keywords ≈ $0.04 · 100 keywords ≈ $0.40 · 1,000 keywords ≈ $4 on the Free plan. Set **Max cost per run** in the run options to cap any run.

### Send results to Google Sheets

Add [Google Sheets Sync](https://apify.com/donrulezz/google-sheets-sync) as an integration of this Actor (Integrations → Apify Actor) with this input, and every run lands in your spreadsheet:

```json
{ "spreadsheet": "https://docs.google.com/spreadsheets/d/<your-sheet-id>/edit", "datasetId": "{{resource.defaultDatasetId}}", "mode": "append" }
```

### Tips

- **Anchor keyword:** choose a term with medium popularity relative to the rest. A very rare anchor loses precision; a dominant one squashes small terms towards 0.
- **Values are relative.** Google Trends reports 0–100 relative interest, not absolute search volume. 100 = the peak for that query, place and time.
- **Related topics** can be empty when Google has no topic data for a term – that comes from Google, not from the scraper.
- **Short ranges** (`now 1-H`, `now 4-H`) return minute-level data; `today 5-y` and `all` return weekly/monthly points.

### Integrations

Export results as JSON, CSV, Excel or HTML, connect to Google Sheets, Make, Zapier, n8n or webhooks, schedule recurring runs, or call the actor from your code with the Apify API and SDKs (Python / JavaScript).

### Use it in n8n and AI agents

Search-trend data is the missing input in most AI content workflows: which topics are rising, which phrasing people actually use, and where.

**n8n – HTTP Request node (nothing to install):**

- Method `POST`, URL `https://api.apify.com/v2/acts/donrulezz~google-trends-bulk/run-sync-get-dataset-items`
- Header `Authorization: Bearer <your Apify API token>`
- JSON body, for example:

```json
{ "keywords": ["{{ $json.topic }}"], "geo": "IN", "timeRange": "today 3-m", "relatedQueries": true }
```

The response is the dataset itself – one item per keyword with interest over time and top/rising related queries – so you can pass it straight to an AI Agent or OpenAI node. The sync endpoint waits up to 5 minutes; for long keyword lists start a normal run and fetch the dataset when it finishes. You can also use n8n's Apify node ("Run an Actor") with the same input.

**Workflow idea:** weekly Schedule trigger → this actor for your seed keywords → keep the *rising* related queries → AI writes short content briefs → Google Sheets or Notion.

**AI agents (MCP):** add the actor as a tool through Apify's MCP server, `https://mcp.apify.com/?actors=donrulezz/google-trends-bulk`, in Claude, Cursor, VS Code or n8n's MCP Client node, then ask things like *"Which of these 10 topics is rising fastest in India over the last 90 days?"*

### Is it legal?

The actor collects aggregated, anonymised public statistics from Google Trends. It does not collect personal data. You are responsible for using the data in line with applicable laws and Google's terms.

### Support

Found a problem or need a feature (another output format, a new filter)? Open an issue on the actor's **Issues** tab – fixes usually ship within a few days.

# Actor input Schema

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

Search terms to analyse. No limit: each keyword gets its own result, and with 'Compare keywords' on they are also put on one shared scale.

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

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

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

Period to analyse. Ignored when 'Custom time range' is set.

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

Optional exact range as 'YYYY-MM-DD YYYY-MM-DD', for example '2025-01-01 2025-06-30'.

## `searchProperty` (type: `string`):

Which Google search to measure.

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

Google Trends category ID to narrow results (0 = all categories). Example: 47 = Autos & Vehicles, 18 = Shopping.

## `interestOverTime` (type: `boolean`):

Timeline of 0-100 interest values, plus average, peak and trend direction.

## `interestByRegion` (type: `boolean`):

Where the keyword is most searched.

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

Granularity for interest by region. Default: countries for worldwide, sub-regions when a country is set.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with low search volume.

## `relatedQueries` (type: `boolean`):

Top and rising (breakout) related searches.

## `relatedTopics` (type: `boolean`):

Top and rising related topics.

## `individualResults` (type: `boolean`):

Analyse each keyword on its own (full data per keyword). Turn off if you only need the comparison.

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

Adds one 'comparison' result that ranks ALL keywords on a shared 0-100 scale - not limited to Google's 5 terms. Works by chaining batches through an anchor keyword.

## `anchorKeyword` (type: `string`):

Keyword present in every comparison batch to link their scales. Defaults to the first keyword. Pick a term of medium popularity for the most precise scaling.

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

Language for region and topic names, e.g. en-US, de, hi.

## `maxRetries` (type: `integer`):

How many times to retry with a fresh IP when Google rate-limits.

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

Proxy used for requests. Each retry switches to a new IP.

## Actor input object example

```json
{
  "keywords": [
    "ai agents",
    "chatgpt",
    "claude ai"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "searchProperty": "",
  "category": 0,
  "interestOverTime": true,
  "interestByRegion": true,
  "includeLowVolumeRegions": false,
  "relatedQueries": true,
  "relatedTopics": false,
  "individualResults": true,
  "compareKeywords": false,
  "anchorKeyword": "chatgpt",
  "language": "en-US",
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Summary table: average interest, trend direction, % change, peak, latest value and top rising query per keyword.

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

Full items including the interest-over-time timeline, interest by region, related queries/topics and the comparison item.

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

// Run the Actor and wait for it to finish
const run = await client.actor("donrulezz/google-trends-bulk").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": [
        "ai agents",
        "chatgpt",
        "claude ai",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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

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/qEptcHrhJBRKfw37R/builds/nYqoXLmENIy1sfeOz/openapi.json
