# Google Trends Scraper: Interest Over Time & Related Queries (`blond_terrarium/google-trends-scraper-reliable`) Actor

Get Google Trends data for any keywords: interest over time, by country/state/city, related queries (top + rising) and topics. Compare up to 5 terms, any country, any time range, Web/YouTube/News/Shopping. Smart pacing for fewer 429s. Pay only for terms with data.

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

## Pricing

from $2.50 / 1,000 search term with trend data

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: Interest Over Time, Regions & Related Queries

Get **Google Trends data for any list of keywords** in one run, with **one clean row per keyword**:

- **Interest over time**: the 0-100 time series, plus the average interest and the peak date
- **Interest by region**: countries, states/regions, cities or US metro areas (DMA)
- **Related queries**: top and rising (incl. "Breakout"), with links
- **Related topics**: top and rising (Google sometimes returns none)
- **Compare mode**: put up to 5 terms on one relative scale, exactly like on trends.google.com
- Any location (worldwide, a country like `US`, or a state like `US-NH`), any time range (past hour to 2004-present, or custom dates), any category, and Web, Image, News, Shopping or **YouTube** search

Google Trends rate-limits aggressive clients. This Actor paces its requests, warms up a fresh cookie session when Google pushes back, and backs off exponentially, so runs finish instead of failing with 429 errors.

**You only pay for terms that returned trend data.** Terms with too little search volume and failed requests get a free row with the reason.

### Use cases

- Keyword and content research, seasonality planning, and SEO
- Product and market research (what's rising, where demand is)
- Comparing brands, products or candidates over time
- Feeding trend signals to dashboards, spreadsheets or AI agents (via the Apify MCP server)

### Input example

```json
{
  "searchTerms": ["web scraping", "electric bike"],
  "geo": "US",
  "timeRange": "today 12-m",
  "includeInterestByRegion": true,
  "includeRelatedQueries": true
}
```

### Output example (shortened)

```json
{
  "searchTerm": "pizza",
  "geo": "US",
  "timeRange": "today 12-m",
  "status": "OK",
  "averageInterest": 27.54,
  "peakDate": "2026-06-14",
  "interestOverTime": [{ "date": "2025-10-19", "formattedTime": "Oct 19 – 25, 2025", "value": 22, "isPartial": false }],
  "regionResolution": "REGION",
  "interestByRegion": [{ "geoCode": "US-PA", "geoName": "Pennsylvania", "value": 100 }, { "geoCode": "US-RI", "geoName": "Rhode Island", "value": 97 }],
  "relatedQueries": {
    "top": [{ "query": "pizza near me", "value": 100, "formattedValue": "100" }],
    "rising": [{ "query": "how to make pizza dough at home", "value": 2400, "formattedValue": "+2,400%" }]
  },
  "relatedTopics": { "top": [], "rising": [] },
  "charged": true
}
```

In compare mode, each time point and region has one column per term, and `related` holds related queries/topics per term.

### Pricing (pay per event)

You pay per **search term with trend data** (or per comparison of up to 5 terms), with all the sections you selected included:

| Apify plan | Price per 1,000 terms |
|---|---|
| Free | $4.00 |
| Bronze (Starter) | $3.50 |
| Silver (Scale) | $3.00 |
| Gold (Business) | $2.50 |

Platform usage is included. Each run also has Apify's standard start fee of $0.00005 per GB of memory. Optional Apify datacenter proxy (or your own proxy URLs) is included in the price; residential proxy isn't supported. Set **Max total charge** to cap your spend; the run stops cleanly when it's reached.

### Tips

- Values are relative (0-100) within each request, as on Google Trends. Use compare mode to compare terms on the same scale.
- Speed: about 5-7 seconds per term by default (Google's limits). Lowering the request delay is faster but triggers more rate limits.
- Location codes: `US`, `GB`, `DE`, `US-CA`, `US-NH`, `GB-SCT`. Leave empty for worldwide.

### Notes

Data comes from Google Trends' public endpoints. Google samples and normalizes this data, so values can differ slightly between runs, just like on the website.

# Actor input Schema

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

Keywords or phrases. Each term gets its own result row (unless 'Compare terms' is on).

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

Puts all terms on one relative 0-100 scale in a single result row, like comparing terms on trends.google.com.

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

Empty = worldwide. Country code (US, GB, DE...) or region code (US-NH, US-CA, GB-ENG...).

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

Ignored if a custom range is set.

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

Optional, e.g. '2024-01-01 2024-06-30'.

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

Google Trends category number (0 = all categories), e.g. 71 = Food & Drink, 3 = Arts & Entertainment.

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

Which Google search to measure.

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

Time series (0-100), plus average and peak date.

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

Countries, states or cities.

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

Automatic = countries for worldwide, states for a country.

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

What else people searched.

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

Entities related to the term (Google sometimes returns none).

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

Language for region and topic names, e.g. en-US, de, es.

## `requestDelayMs` (type: `integer`):

Google Trends rate-limits fast clients; higher is more reliable.

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

On rate limits a new session is started with exponential backoff.

## `requestTimeoutSecs` (type: `integer`):

Per request.

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

Optional. Apify datacenter proxy or your own proxy URLs (a new IP per session). Residential proxy isn't supported (it would raise the price for everyone).

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping",
    "electric bike"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "auto",
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "language": "en-US",
  "requestDelayMs": 1200,
  "maxRetries": 5,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Summary table.

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

Full rows incl. time series and regions.

## `summary` (type: `string`):

Totals for the 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": [
        "web scraping",
        "electric bike"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("blond_terrarium/google-trends-scraper-reliable").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": [
        "web scraping",
        "electric bike",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("blond_terrarium/google-trends-scraper-reliable").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": [
    "web scraping",
    "electric bike"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call blond_terrarium/google-trends-scraper-reliable --silent --output-dataset

```

## MCP server setup

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

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/4NieIDpJ1dDP49eYl/builds/shUpxpc5zEhw02fem/openapi.json
