# Google Trends Scraper API 💰$2/1k terms (`flyingnimbus/google-trends-scraper`) Actor

Fast, reliable Google Trends data: interest over time, interest by region, related queries and average interest for any keywords. Auto session/proxy rotation; failed or empty terms are never charged.

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

## Pricing

$2.00 / 1,000 search term with data

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 (Reliable)

Pulls Google Trends data for any list of keywords: **interest over time**, **interest by region**, **related queries** (top and rising) and an **average interest score**. Results come back as clean JSON, CSV or Excel, or through the API.

#### Why this one

- **Built to not fail.** Each worker keeps its own Google session. When Google rate-limits a session, the worker switches to a fresh IP and cookie and backs off. In our tests, 100 out of 100 keywords succeeded in a single run.
- **Fast.** Runs up to 10 parallel sessions, with no headless browser. 100 keywords took about 80 seconds.
- **You only pay for data.** Keywords that fail, or that Google has no data for, are returned with a status flag and are **not charged**.
- **Compare mode.** Query up to 5 terms together, so their values share one 0–100 scale, as in the Trends "compare" view.

#### Input

| Field | Example | Notes |
|---|---|---|
| `searchTerms` | `["bitcoin","ethereum"]` | Required |
| `compareTerms` | `false` | Group terms in fives on one shared scale |
| `geo` | `US`, `CA`, `GB`, `US-CA` | Empty = worldwide |
| `timeRange` | `past_12_months` | Past hour up to all time (2004–) |
| `customTimeRange` | `2024-06-01 2024-09-01` | Overrides `timeRange` |
| `category` | `0` | Google Trends category id |
| `searchProperty` | `web` | `web`, `youtube`, `news`, `images`, `shopping` |
| `maxConcurrency` | `4` | 1–10 parallel sessions |

#### Output (one row per term or comparison group)

```json
{
  "searchTerms": ["bitcoin"],
  "geo": "CA",
  "timeRange": "today 12-m",
  "status": "ok",
  "averageInterest": {"bitcoin": 41.3},
  "interestOverTime": [{"time": "2025-10-05T00:00:00+00:00", "formattedTime": "Oct 5 – 11, 2025", "isPartial": false, "values": {"bitcoin": 47}}],
  "interestByRegion": [{"geoCode": "CA-ON", "geoName": "Ontario", "values": {"bitcoin": 100}}],
  "relatedQueries": {"bitcoin": [{"list": "top", "query": "bitcoin price", "value": 100, "formattedValue": "100"}, {"list": "rising", "query": "...", "formattedValue": "Breakout"}]}
}
```

`status` is `ok`, `no_data` (not charged) or `failed` (not charged, includes `error`).

#### Pricing

Pay per event: you are charged once for each search term (or comparison group) that returns data. There is no start fee.

#### Notes

- Trends values are relative (0–100) within each query, not absolute search volumes.
- Use compare mode when you need values on one scale across terms.
- Related topics are not included: Google currently returns them empty to automated clients.

### More actors by flyingnimbus

All pay-per-event and fast. Failed or empty runs are free:

- [Google Flights](https://apify.com/flyingnimbus/google-flights-scraper)
- [Google Hotels](https://apify.com/flyingnimbus/google-hotels-scraper)
- [AI Search Visibility Tracker](https://apify.com/flyingnimbus/ai-search-visibility-tracker)
- [Google Ads Transparency](https://apify.com/flyingnimbus/google-ads-transparency-scraper)
- [Google Jobs](https://apify.com/flyingnimbus/google-jobs-scraper)
- [Google Shopping](https://apify.com/flyingnimbus/google-shopping-scraper)
- [Career Site Jobs](https://apify.com/flyingnimbus/career-site-jobs-scraper)
- [YouTube Search](https://apify.com/flyingnimbus/youtube-search-intelligence-scraper)
- [Hacker News](https://apify.com/flyingnimbus/hackernews-intelligence-scraper)

# Actor input Schema

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

Keywords to look up. Each term is queried separately unless 'Compare terms' is on.

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

Query terms together in groups of up to 5 so values are on the same relative scale (like the Trends compare view).

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

Country or region code, e.g. US, CA, GB, US-CA. Empty = worldwide.

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

Period to analyse.

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

Overrides Time range. Format: 'YYYY-MM-DD YYYY-MM-DD'.

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

Google Trends category id. 0 = all categories.

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

Which Google property's search data to use.

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

Return the interest-over-time series.

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

Return interest broken down by sub-region.

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

Return top and rising related queries.

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

Interface language (hl), e.g. en-US.

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

Minutes from UTC as Google expects (e.g. 240 for EDT).

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

How many independent Google sessions run in parallel. Higher is faster; lower is gentler on rate limits.

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

How many times to rotate session/proxy and retry when Google rate-limits.

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

Apify Proxy is recommended; Google rate-limits datacenter IPs.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "past_12_months",
  "category": 0,
  "searchProperty": "web",
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueries": true,
  "language": "en-US",
  "timezoneOffset": 0,
  "maxConcurrency": 4,
  "maxRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All rows in the default dataset (JSON). Each row has a status of ok, no_data or failed.

## `overview` (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": [
        "bitcoin",
        "ethereum"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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