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

Get Google Trends data: interest over time, interest by region, related & rising queries, and daily trending searches. Compare more than 5 keywords on one scale. Auto-retries and proxy rotation for reliable runs.

- **URL**: https://apify.com/tidelark/google-trends-scraper.md
- **Developed by:** [Tidelark Data](https://apify.com/tidelark) (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.00 / 1,000 search term results

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 - Compare Unlimited Keywords

Extract Google Trends data at scale: **interest over time**, **interest by region** (countries, states, cities, metro areas), **related & rising queries**, and **daily trending searches** for any country. Export to JSON, CSV, Excel, or use it from the API, Make, Zapier, n8n, LangChain or any AI agent (MCP).

### Why this Google Trends scraper?

- **Compare more than 5 keywords on ONE scale.** Google Trends only compares 5 terms at a time. This Actor links batches with an anchor term, so 10, 50 or 200 keywords end up on a single comparable 0-100 scale. No more guessing whether "keyword 6" is bigger than "keyword 2".
- **Built for reliability.** Automatic retries, fresh sessions and proxy rotation when Google rate-limits (HTTP 429). If datacenter IPs get blocked, it falls back to residential proxies automatically.
- **Ready-made insights.** Every keyword comes with average interest, peak value and date, and a trend direction (rising / falling / stable with % change), so you don't need to post-process the time series.
- **Everything in one run.** Interest over time, regional breakdown and related queries for every keyword in a single dataset item.
- **Trending now.** Daily trending searches for any country, with approximate search volume and the news articles behind each trend.

### What can you use it for?

- SEO and content planning: find rising queries before competitors do
- Market research and product validation: compare brands, products and categories over time
- E-commerce: spot seasonal demand and regional hot spots
- Investing and finance research: track public interest in companies, tickers and crypto
- AI agents and dashboards: feed fresh, structured trend data into your pipelines

### Input

| Field | Description |
|---|---|
| `mode` | `explore` (analyse your keywords) or `trendingNow` (daily trending searches) |
| `searchTerms` | Any number of keywords. More than 5 are normalised onto one scale automatically |
| `geo` | Country code (`US`, `GB`, `NL`, `DE`...) or sub-region (`US-CA`). Empty = worldwide |
| `timeRange` | Past hour ... 2004-present, or `customTimeRange` like `2024-01-01 2024-12-31` |
| `category` | Google Trends category ID (0 = all) |
| `searchProperty` | Web, Images, News, Google Shopping or YouTube search |
| `includeInterestOverTime` / `includeInterestByRegion` / `includeRelatedQueries` | Choose which data you need |
| `regionResolution` | Countries, sub-regions, cities or US metro areas (DMA) |
| `trendingGeos` | Countries for `trendingNow` mode |

Example input:

```json
{
  "searchTerms": ["chatgpt", "gemini", "claude", "perplexity", "copilot", "deepseek", "grok"],
  "geo": "US",
  "timeRange": "today 12-m"
}
```

### Output

One dataset item per search term (real output, shortened - 7 AI assistants compared in the US over 12 months):

```json
{
  "searchTerm": "gemini",
  "geo": "US",
  "timeRange": "today 12-m",
  "resolvedTimeRange": "2025-10-11 2026-10-11",
  "category": 0,
  "searchProperty": "web",
  "googleTrendsUrl": "https://trends.google.com/trends/explore?q=gemini&date=today%2012-m&geo=US",
  "comparedWith": [
    "chatgpt",
    "claude",
    "perplexity",
    "copilot"
  ],
  "interestOverTime": [
    {
      "date": "2025-10-05T00:00:00Z",
      "label": "Oct 5 – 11, 2025",
      "value": 22,
      "isPartial": false,
      "rawValue": 22
    },
    {
      "date": "2025-10-12T00:00:00Z",
      "label": "Oct 12 – 18, 2025",
      "value": 20,
      "isPartial": false,
      "rawValue": 20
    }
  ],
  "regionResolution": "REGION",
  "interestByRegion": [
    {
      "geoCode": "US-CA",
      "geoName": "California",
      "value": 100
    },
    {
      "geoCode": "US-DC",
      "geoName": "District of Columbia",
      "value": 82
    }
  ],
  "relatedQueries": {
    "top": [
      {
        "query": "google gemini",
        "value": 100,
        "formattedValue": "100"
      },
      {
        "query": "gemini ai",
        "value": 90,
        "formattedValue": "90"
      }
    ],
    "rising": [
      {
        "query": "gemini 4 argon",
        "value": 1750,
        "formattedValue": "+1,750%"
      },
      {
        "query": "gemini argon",
        "value": 850,
        "formattedValue": "+850%"
      }
    ]
  },
  "averageInterest": 27.77,
  "peakValue": 36,
  "peakDate": "2026-04-19T00:00:00Z",
  "trend": {
    "direction": "rising",
    "changePercent": 31.1,
    "comparison": "last 25% of period vs first 25%"
  },
  "normalization": {
    "method": "anchor",
    "anchorTerm": "chatgpt",
    "batches": 2,
    "comparable": true,
    "note": "Values are on one 0-100 scale across ALL search terms in this run (100 = highest point of any term)."
  },
  "scrapedAt": "2026-10-11T19:38:16.689096Z"
}
```

In `trendingNow` mode you get one item per trending search: `title`, `rank`, `approxTraffic`, `startedAt`, `picture` and related `news` articles.

### Pricing

Pay per result: you are charged per search term result (explore mode) or per trending search (trending mode). No monthly rental. Platform usage and proxies are included in the price. Set a maximum cost per run in the run options if you want a hard cap.

### How the cross-batch comparison works

Google returns values from 0 to 100 relative to the highest point among the (max 5) terms in a request. When you send more terms, the Actor builds batches of 5 that all contain the same anchor term (the first search term, or `anchorTerm`). Each batch is rescaled so the anchor's curve matches across batches, then everything is rescaled so the single highest point of all terms equals 100. `rawValue` always keeps Google's original number. For best accuracy pick an anchor with steady, medium-to-high search volume.

### Tips

- Values are relative (0-100), not absolute search counts. That's how Google Trends works.
- Very low-volume terms may return all zeros for short time ranges or small regions.
- Use `customTimeRange` for exact periods, e.g. `2025-11-01 2025-12-31` for holiday season analysis.

### Is it legal to scrape Google Trends?

This Actor only collects publicly available, aggregated and anonymised search interest data. 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 bug or need a feature (e.g. a new output format)? Open an issue on the Issues tab - issues are answered quickly.

# Actor input Schema

## `mode` (type: `string`):

Explore = analyse your own search terms. Trending now = what people are searching right now in a country.

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

Keywords or phrases to analyse. Any number of terms: more than 5 are automatically compared on one shared 0-100 scale (see 'Compare across batches').

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

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

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

Period to analyse. Short ranges return hourly/minute data, long ranges weekly/monthly data.

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

Overrides 'Time range'. Format: 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-12-31'.

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

Google Trends category ID (0 = all categories). E.g. 7 = Finance, 71 = Food & Drink, 45 = Health.

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

Which Google search to analyse: web (default), images, news, shopping or YouTube.

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

Time series of search interest (0-100) for each term.

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

Where each term is most popular (0-100 per region).

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

Granularity of 'Interest by region'. Automatic = countries for worldwide, sub-regions for a country, metros/cities for a sub-region.

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

Also return regions with low search volume (often zeros).

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

Top and rising (breakout) queries related to each term.

## `compareAcrossBatches` (type: `boolean`):

Google compares max 5 terms at a time. When on, every batch includes an anchor term so ALL terms end up on one comparable 0-100 scale.

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

Term used to link batches. Defaults to the first search term. Pick a term with steady, mid-to-high search volume for best accuracy.

## `trendingGeos` (type: `array`):

Two-letter country codes. Used only in 'Trending now' mode.

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

Interface language for region names and labels, e.g. en-US, de, nl, fr.

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

How many times a blocked or failed request is retried with a fresh session/IP.

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

If Google keeps rate-limiting datacenter IPs, automatically switch to residential proxies. Recommended.

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

Apify Proxy is recommended. The default works well for most runs.

## Actor input object example

```json
{
  "mode": "explore",
  "searchTerms": [
    "chatgpt",
    "gemini",
    "claude"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "AUTO",
  "includeLowVolumeRegions": false,
  "includeRelatedQueries": true,
  "compareAcrossBatches": true,
  "trendingGeos": [
    "US"
  ],
  "language": "en-US",
  "maxRetries": 8,
  "residentialFallback": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Summary table: average interest, peak, trend direction per search term.

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

Full results with time series, regions and related queries (JSON, CSV, Excel via the format parameter).

## `runSummary` (type: `string`):

Counts of results, failed terms and retries for this run.

# 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",
        "gemini",
        "claude"
    ],
    "trendingGeos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidelark/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",
        "gemini",
        "claude",
    ],
    "trendingGeos": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidelark/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/hc2YfS7ukeKlGI7gu/builds/SZu56PIVFVal4jge7/openapi.json
