# Google Trends Scraper (`nordtrail-data/google-trends-scraper`) Actor

Reliable Google Trends API alternative. Get interest over time, interest by region, related queries and related topics for any keyword, country and time range. Compare up to 5 terms. Pay only for keywords that succeed.

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

## Pricing

from $20.00 / 1,000 keywords

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

Get Google Trends data as clean JSON, CSV or Excel - **interest over time, interest by region, related queries and related topics** - for any keyword, country and time range. A dependable alternative to an official Google Trends API, which does not exist.

**You only pay for keywords that succeed.** If Google blocks a request, the Actor retries with a fresh residential IP. Keywords that still fail come back as free `failed` rows, never as a charge.

### What you can do with it

- **SEO & content planning** - find rising queries before your competitors and see which topics are growing.
- **Market & product research** - compare brands, products or categories side by side across countries.
- **E-commerce & seasonality** - spot when demand peaks so you can time stock and ad spend.
- **AI agents & dashboards** - feed fresh Trends data to your LLM workflow, Make, n8n, Zapier, Google Sheets or BI tool on a schedule.

### Features

- Interest over time (0-100), with **average, peak, peak date and trend change %** already calculated.
- Interest by region: countries, states, cities or US metro areas (DMA).
- Related queries and related topics, both *top* and *rising* (breakout).
- Compare up to 5 terms on one shared scale, or score every term separately.
- Any country or sub-region (`US`, `GB`, `DE`, `US-CA`) or worldwide.
- Preset ranges from the past hour to 2004-present, or any custom date range.
- Web, Image, News, YouTube and Google Shopping search.
- Category filter, interface language, concurrency and retry controls.

### Input example

```json
{
  "searchTerms": ["electric cars", "hybrid cars"],
  "compareTerms": true,
  "geo": "US",
  "timeRange": "past_12_months",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true
}
```

### Output example

One row per keyword:

```json
{
  "status": "ok",
  "keyword": "electric cars",
  "comparedWith": ["hybrid cars"],
  "geo": "US",
  "timeRange": "past_12_months",
  "averageInterest": 61.4,
  "peakInterest": 100,
  "peakDate": "2026-03-01T00:00:00+00:00",
  "trendChangePct": 12.5,
  "interestOverTime": [
    { "date": "2025-10-12T00:00:00+00:00", "formattedTime": "Oct 12 - 18, 2025", "value": 57, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "US-CA", "geoName": "California", "value": 100 }
  ],
  "relatedQueries": {
    "top": [{ "query": "tesla", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/..." }],
    "rising": [{ "query": "ev tax credit 2026", "value": 450, "formattedValue": "+450%", "link": "https://trends.google.com/..." }]
  },
  "scrapedAt": "2026-10-12T15:00:00+00:00"
}
```

Values are Google's relative 0-100 index, not absolute search volumes. With **Compare terms** on, all terms in the same group share one scale.

### Pricing

Pay per successful keyword. One keyword includes every data type you switched on (timeline, regions, related queries and topics) - no extra charge per row or per data point. Failed keywords are free.

### Tips

- Keep **Max concurrency** at 3-5 for large lists. It is usually faster overall than pushing Google hard.
- For long keyword lists, split them into several scheduled runs.
- Use the **Overview** tab of the dataset for a quick summary table.

### FAQ

**Is scraping Google Trends legal?** The Actor only collects aggregated, anonymous statistics that Google publishes on trends.google.com - no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

**Why do my values differ slightly from the website?** Google samples its data, so numbers can move by a point or two between requests. Recent periods are marked `isPartial: true`.

**Something broke?** Open an issue on the Actor's Issues tab. Issues are answered fast.

# Actor input Schema

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

Keywords to look up on Google Trends. Each term is billed once per run, and only if it succeeds.

## `compareTerms` (type: `boolean`):

On: terms are queried together in groups of up to 5, so their values share one scale (like typing them into the Trends compare box). Off: every term gets its own 0-100 scale.

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

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

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

Period to fetch. Ignored if a custom time range is set.

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

Optional exact range as 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-12-31'. Overrides Time range.

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

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

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

Interest per country, or per sub-region when a country is set.

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

Top and rising related search queries.

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

Top and rising related topics (entities).

## `cleanRisingQueries` (type: `boolean`):

Google's 'rising' lists are often polluted by unrelated bot searches (e.g. 'golang' rising for 'electric cars'). On: rising queries that share no word with your keyword and are not in the top list are removed, and the number removed is reported. Off: raw Google output.

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

Granularity of Interest by region. Leave on Auto unless you need cities or US metro areas.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also return regions with too little data for a score.

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

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

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

Which Google search to measure.

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

Language for topic names and labels, e.g. en-US, de, fi.

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

How many keywords to fetch in parallel. Higher is faster but more likely to be rate-limited.

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

Each attempt uses a fresh proxy IP.

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

Google Trends blocks datacenter IPs quickly. Residential proxies are used by default.

## Actor input object example

```json
{
  "searchTerms": [
    "electric cars",
    "hybrid cars"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "past_12_months",
  "includeInterestOverTime": true,
  "includeInterestByRegion": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "cleanRisingQueries": true,
  "regionResolution": "",
  "includeLowSearchVolumeRegions": false,
  "category": 0,
  "searchProperty": "",
  "language": "en-US",
  "maxConcurrency": 3,
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per keyword with average, peak and trend change.

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

Full data per keyword: timeline, regions, related queries and topics.

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

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

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

```

## MCP server setup

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