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

Get Google Trends interest over time, interest by region, related queries and trending searches. Compare more than 5 keywords on one 0-100 scale. Fast, no browser, and failed keywords are never charged.

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

## Pricing

from $3.00 / 1,000 keyword 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

Get **Google Trends** data as clean JSON, CSV or Excel: interest over time, interest by region, related queries, related topics and today's trending searches, for any country and time range.

What makes it different:

- 🔢 **Compare more than 5 keywords on one scale.** Google Trends only lets you compare 5 terms at a time. This Actor chains batches through an anchor keyword, so 10, 20 or 50 keywords end up on one shared 0-100 scale you can actually rank.
- 📈 **Ready-made summary for every keyword**: average, peak value and date, latest value, % change and a simple `rising` / `stable` / `falling` label. No spreadsheet needed to answer "is this growing?".
- ⚡ **No browser.** It talks to the same endpoints the Google Trends website uses, so runs are fast and cheap.
- 🛡️ **Built for Google's rate limits**: every retry uses a fresh residential IP with backoff.
- 💸 **You only pay for results.** Keywords that fail after all retries are **never charged**. They are listed in the `FAILED` record of the run's key-value store.

### Use cases

- **SEO and content planning**: find rising queries before they peak.
- **Product and market research**: compare brands, products or competitors in any country.
- **E-commerce and dropshipping**: spot seasonal demand and which regions search most.
- **AI agents and automations**: simple input, flat predictable output. Works great with the Apify MCP server, Make, Zapier and n8n.
- **Daily monitoring**: schedule it and get today's trending searches for any country with approximate traffic and news links.

### Input

| Field | What it does |
|---|---|
| `searchTerms` | Keywords to analyze. One result per keyword. |
| `compareMode` | `individual` (each keyword scored on its own 0-100 scale) or `compare` (all keywords on one shared scale, no 5-term limit). |
| `geo` | Country (`US`, `BR`, `GB`...) or region (`US-CA`). Empty = worldwide. |
| `timeRange` / `customTimeRange` | From the past hour to 2004-present, or `2024-01-01 2024-12-31`. |
| `property` | Web, Images, News, Google Shopping or YouTube search. |
| `category` | Google Trends category ID (0 = all). |
| `includeInterestOverTime`, `includeInterestByRegion`, `includeRelatedQueries`, `includeRelatedTopics` | Turn each data block on or off. |
| `regionResolution` | Countries, states/provinces, cities or US metro areas. |
| `trendingNowGeos` | Countries to also fetch today's trending searches for. |

Example:

```json
{
    "searchTerms": ["netflix", "disney plus", "max", "hulu", "peacock", "paramount plus", "apple tv"],
    "compareMode": "compare",
    "geo": "US",
    "timeRange": "today 3-m",
    "trendingNowGeos": ["US"]
}
```

### Output

One item per keyword:

```json
{
    "type": "comparison",
    "keyword": "hulu",
    "geo": "US",
    "timeRange": "today 3-m",
    "property": "web",
    "googleTrendsUrl": "https://trends.google.com/trends/explore?q=hulu&date=today%203-m&geo=US",
    "comparedWith": ["netflix", "disney plus", "max", "peacock", "paramount plus", "apple tv"],
    "anchorKeyword": "max",
    "summary": {
        "average": 8.51,
        "peakValue": 11.2,
        "peakDate": "2026-09-14T00:00:00Z",
        "latestValue": 9.8,
        "changePercent": 21.4,
        "trend": "rising"
    },
    "interestOverTime": [
        { "date": "2026-07-06T00:00:00Z", "formattedTime": "Jul 6, 2026", "value": 7.1, "isPartial": false }
    ],
    "interestByRegion": [
        { "geoCode": "US-NY", "geoName": "New York", "value": 100 }
    ],
    "relatedQueries": {
        "top": [{ "query": "hulu login", "value": 100, "formattedValue": "100" }],
        "rising": [{ "query": "hulu new shows", "value": 250, "formattedValue": "+250%" }]
    },
    "scrapedAt": "2026-10-06T22:40:00Z"
}
```

Trending searches come as separate items with `type: "trendingNow"`, `rank`, `title`, `approxTraffic`, `approxTrafficMin`, `publishedAt` and `news` (title, url, source).

### How the values work

Google Trends values are **relative**, not absolute search volumes: 100 is the peak popularity within the request, 50 is half of it. In `compare` mode every keyword is on the same scale, so a keyword with average 40 is searched about twice as much as one with average 20.

For more than 5 keywords, the strongest keyword of the first batch becomes the **anchor** and is included in every following batch, which is how all batches are rescaled onto one scale. Very small keywords next to very large ones may show 0, the same way they would on the Google Trends website.

### Pricing

Pay per result: you are charged per keyword result and per trending search returned. Failed keywords are never charged. Proxy and compute costs are included in the price.

### Tips

- Keep **residential proxies** on (default). Google blocks datacenter IPs quickly.
- Need more speed? Raise `maxConcurrency` in Individual mode. If you see many retries, lower it.
- **Related topics** are off by default. Google often withholds this block for automated traffic, so turn it on only if you need it.

### Is it legal to scrape Google Trends?

This Actor only collects aggregated, publicly available statistics and contains no personal data. Still, you are responsible for how you use the data, so check Google's terms and your local laws for your use case.

### Feedback

Found a bug or need a field? Open an issue in the **Issues** tab. We reply quickly and ship fixes fast.

# Actor input Schema

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

Keywords to look up on Google Trends. Each term is one result. In 'Compare' mode there is no 5-keyword limit: all terms end up on one shared 0-100 scale.

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

'Individual' scores each term on its own 0-100 scale (best for spotting each term's trend). 'Compare' puts all terms on one scale so you can see which is searched more (like typing them together in Google Trends, but without the 5-term limit).

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

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

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

Period to analyze. Short ranges give hourly/daily points, long ranges give weekly/monthly points.

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

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

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

Which Google search to measure.

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

Optional Google Trends category (0 = all). Find the ID in the 'cat=' part of a Google Trends URL, e.g. 7 = Finance, 18 = Shopping, 20 = Sports.

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

Timeline of search interest (0-100) plus a summary: average, peak, latest value, % change and trend direction.

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

Where the term is most popular.

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

Level of detail for 'Interest by region'. Leave on default to let Google choose (countries for worldwide, states/provinces for a country).

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

Top and rising searches related to each term. Great for keyword research and content ideas.

## `includeRelatedTopics` (type: `boolean`):

Top and rising topics (Individual mode only). Off by default: Google often withholds topics for automated traffic, so this block may come back empty.

## `trendingNowGeos` (type: `array`):

Optional. Two-letter country codes (e.g. US, BR, GB) to also get today's trending searches with approximate traffic and news links.

## `maxTrendingItems` (type: `integer`):

How many trending searches to return per country (Google lists up to about 100 per day).

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

Language for names of regions and topics, e.g. en-US, pt-BR, es-ES.

## `maxConcurrency` (type: `integer`):

How many terms are processed in parallel (Individual mode).

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

Google rate-limits aggressively. Each retry uses a fresh proxy IP.

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

Residential proxies are strongly recommended, Google blocks datacenter IPs quickly.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "gemini",
    "claude"
  ],
  "compareMode": "individual",
  "geo": "",
  "timeRange": "today 12-m",
  "property": "",
  "category": 0,
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "maxTrendingItems": 50,
  "language": "en-US",
  "maxConcurrency": 3,
  "maxRetries": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per keyword (interest over time, summary, regions, related queries) plus one item per trending search.

## `failed` (type: `string`):

Keywords or countries that failed after all retries. These are never charged.

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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