# Google Trends Scraper – Compare Unlimited Keywords (`fast_data_asap/google-trends-scraper`) Actor

Google Trends API alternative for $3 per 1,000 results: interest over time, by country, region or city and related & rising queries. Compare more than 5 keywords on one scale. Any country, time range and search type.

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

## Pricing

from $2.30 / 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/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 – Compare Unlimited Keywords

Get Google Trends data for any keyword, country and time range: **interest over time**, **interest by country, region or city** and **related & rising queries**.

**$3 per 1,000 results.** Unlike the Google Trends website, you can **compare more than 5 keywords on one scale**. The scraper links batches through an anchor keyword and rescales everything so all terms are directly comparable.

### What you get

Each result is one dataset item with a `type`:

| `type` | Contents |
|---|---|
| `interestOverTime` | `timeline: [{time, formattedTime, isPartial, values: {keyword: 0-100}}]` plus `averages` per keyword |
| `interestByRegion` | `regions: [{geoCode, geoName, values: {keyword: 0-100}}]` |
| `relatedQueries` | `top` and `rising` queries for one keyword, with values (rising shows growth in % or "Breakout") |

Every item also includes `geo`, `timeRange`, `category` and `searchProperty`.

### Inputs

- **Search terms**: any number of keywords.
- **Country / region code**: e.g. `US`, `DE`, `US-CA`. Empty means worldwide.
- **Time range**: past hour to 2004–present, or a custom range like `2025-01-01 2025-12-31`.
- **Search type**: web, image, news, Google Shopping or YouTube search.
- **Compare mode**: all terms on one scale (default) or each on its own scale.
- **Anchor term**: the keyword used to link batches when you compare more than 5.

### Example output

```json
{
  "type": "interestOverTime",
  "keywords": ["chatgpt", "claude", "gemini"],
  "geo": "US",
  "timeRange": "today 12-m",
  "averages": {"chatgpt": 78.4, "claude": 9.1, "gemini": 21.6},
  "timeline": [{"time": 1729987200, "formattedTime": "Oct 27 – Nov 2, 2024", "isPartial": false, "values": {"chatgpt": 74, "claude": 7, "gemini": 18}}]
}
```

### Use cases

- Keyword and content research for SEO and marketing
- Product and market research: what is rising, where and when
- Seasonality planning for e-commerce and ads
- Brand vs. competitor tracking over time

### Why this scraper

- ✅ **Unlimited keywords on one scale** via anchor normalization (Google itself stops at 5)
- ✅ **Reliable**: paced requests, automatic retries and proxy rotation
- ✅ **Any country, region, time range, category** and search type (web, YouTube, news, images, shopping)
- ✅ **Clean JSON**: one item per timeline, regional breakdown or related-queries list

### How much does it cost?

You pay $3 per 1,000 results. A typical run for 5 keywords with timeline, regions and related queries returns about 7 results, i.e. about $0.02.

### FAQ

**Are these absolute search volumes?** No. Google Trends returns relative interest from 0 to 100. Use it to compare terms, regions and time periods.

**How does comparing more than 5 keywords work?** Terms are split into batches that all contain one anchor term. Each batch is rescaled through the anchor so all terms end up on one 0–100 scale.

**Is this a Google Trends API or pytrends alternative?** Yes. Google has no public Trends API and pytrends breaks often; this Actor returns the same data as JSON, CSV or Excel via the Apify API, MCP or integrations.

### Use it with Claude, ChatGPT and other AI agents

1. Add the Apify MCP server to your assistant (e.g. in Claude: Settings → Connectors → add `https://mcp.apify.com`, then sign in with Apify).
2. Ask in plain language. The assistant finds this Actor, runs it and works with the results.

Or connect only this Actor: `https://mcp.apify.com?tools=fast_data_asap/google-trends-scraper`

Example prompts:

- "Compare Google search interest for ChatGPT, Claude, Gemini, Perplexity and Copilot in Germany over the last 12 months."
- "Which related queries are rising for 'air fryer' in the US right now?"

You can also run it via the Apify API, on a schedule, or connect it to Make, Zapier, n8n and Google Sheets.

#### Free n8n workflow

[Weekly keyword trend report in Google Sheets](https://github.com/ichkifokkus/data-recipes/tree/main/3-weekly-trend-report) – import-ready n8n workflow using this Actor. More in [Data Recipes](https://github.com/ichkifokkus/data-recipes).

#### Pay per call with x402 – no account needed

AI agents can run this Actor and pay per call with **x402** (USDC stablecoin payments over HTTP) through Apify's agentic payments – no Apify account or API key required. You pay the same pay-per-event prices listed above. Details: [Apify x402 integration](https://docs.apify.com/platform/integrations/x402).

### Notes

- Values are Google's relative interest scores (0–100), not absolute search volumes.
- Requests are paced and retried automatically, switching to residential proxies when Google rate-limits.
- No login or cookies required.

# Actor input Schema

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

Keywords to look up. More than 5 are compared on one scale automatically (see compare mode).

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

Empty = worldwide. Examples: US, DE, GB, US-CA, DE-BY.

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

Period to look at. Ignored when a custom time range is set.

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

Optional, overrides the time range. Format: YYYY-MM-DD YYYY-MM-DD

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

Which Google search the interest is measured in.

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

Google Trends category ID. 0 = all categories.

## `compareMode` (type: `string`):

Compare all terms on one scale, or give each term its own 0-100 scale.

## `anchorTerm` (type: `string`):

Used to link batches when comparing more than 5 terms. Defaults to the first term. Pick a term with steady, medium search volume.

## `includeInterestOverTime` (type: `boolean`):

Timeline of relative interest (0-100) for every term.

## `includeInterestByRegion` (type: `boolean`):

Relative interest per country, region or city.

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

Empty = countries for worldwide searches, regions otherwise.

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

Top and rising search queries related to each term.

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

Language of the Google Trends interface, e.g. en-US or de-DE. Affects names of regions.

## `timezoneOffset` (type: `integer`):

Offset from UTC as Google expects it, e.g. 0 for UTC, -60 for CET, 300 for EST.

## `requestDelaySecs` (type: `number`):

Pause between requests to avoid being rate limited.

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

How often a request is retried with a new proxy when Google rate-limits it.

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

Cheap data-center proxies are used first. Keep 'Residential fallback' on so blocked requests are retried through residential IPs.

## `residentialFallback` (type: `boolean`):

When Google blocks a request, retry it through Apify residential proxies. Recommended.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude",
    "gemini"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "searchProperty": "web",
  "category": 0,
  "compareMode": "together",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "language": "en-US",
  "timezoneOffset": 0,
  "requestDelaySecs": 1.5,
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

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

No description

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "searchTerms": [
        "chatgpt",
        "claude",
        "gemini"
    ]
};

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

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = { "searchTerms": [
        "chatgpt",
        "claude",
        "gemini",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fast_data_asap/google-trends-scraper").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 '{
  "searchTerms": [
    "chatgpt",
    "claude",
    "gemini"
  ]
}' |
apify call fast_data_asap/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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

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/Qwyd8JrGW5isOMfMA/builds/nOhtYj012iUL1rshi/openapi.json
