# Google Trends API: Interest, Regions, Queries (`fernandosord/google-trends-reliable`) Actor

Get Google Trends data for any keyword, country and time range: interest over time, interest by region (countries, states, cities or metros) and top and rising related queries. Compare up to 5 terms and pick web, YouTube, news, images or shopping search. Retries and changes proxy when Google blocks.

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

## Pricing

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

This Google Trends API gets Google Trends data for any keyword, country and time range: interest over time, interest by region and related searches, in clean JSON you can export to CSV, Excel or Google Sheets.

- **Built to finish.** Google throttles Trends hard. This Actor rotates sessions, backs off and switches proxies on its own, so a run returns data instead of a pile of 429 errors.
- **Everything in one result.** Each search term (or comparison group) comes back as one item with its timeline, regional breakdown, top and rising queries and average interest.
- **Compare up to 5 terms** on one scale, exactly like the compare box on trends.google.com.

### What Google Trends data you get

| Field | What it holds |
|---|---|
| `interestOverTime` | Timeline points with date, label, value 0 to 100 per term, and whether the last point is still partial |
| `averages` | Average interest per term across the period |
| `interestByRegion` | Countries, regions, cities or US metro areas with a value per term |
| `relatedQueries` | Top and rising searches per term, including "Breakout" ones |
| `relatedTopics` | Top and rising topics per term, when Google provides them |
| `errors`, `notes` | Any section Google refused or left empty, explained in plain words |

### How to scrape Google Trends

1. Add one or more search terms. You can also use Google Trends topic IDs such as `/m/0k8z`.
2. Pick a location (`US`, `CA`, `GB`, `US-CA`, `CA-ON`) or leave it empty for worldwide.
3. Choose a time range, or type a custom one like `2025-01-01 2025-06-30`.
4. Optional: switch on **Compare terms** to put them on one chart, and choose the search type (web, YouTube, news, images or shopping).
5. Run it, then download the dataset or call it from the API, Make, Zapier, n8n or an AI agent through the Apify MCP server.

#### Example input

```json
{
  "searchTerms": ["minecraft", "roblox"],
  "compareTerms": true,
  "geo": "CA",
  "timeRange": "today 3-m"
}
```

#### Example output (shortened)

```json
{
  "searchTerms": ["minecraft", "roblox"],
  "geo": "CA",
  "timeRange": "today 3-m",
  "averages": { "minecraft": 71, "roblox": 57 },
  "interestOverTime": [
    { "date": "2026-07-28T00:00:00.000Z", "formattedTime": "Jul 28, 2026", "values": { "minecraft": 71, "roblox": 59 }, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "CA-AB", "geoName": "Alberta", "values": { "minecraft": 55, "roblox": 45 } }
  ],
  "relatedQueries": {
    "minecraft": {
      "top": [{ "query": "minecraft bedrock", "value": 100, "formattedValue": "100" }],
      "rising": [{ "query": "sift minecraft", "value": 63350, "formattedValue": "Breakout" }]
    }
  },
  "errors": []
}
```

### How much does it cost to scrape Google Trends?

You pay per result: one result is one search term, or one comparison group of up to 5 terms. A result costs $0.003, plus $0.0005 once per run. Checking 100 keywords one by one costs about $0.30, and 1,000 keywords about $3.00. Apify's free plan includes $5 of monthly credit, which covers about 1,600 results. Failed terms are not charged; they are listed in the `FAILED_TERMS` record of the run's key-value store instead.

### Google Trends use cases

- **SEO and content planning:** find rising queries before they peak and see which regions care most.
- **Market research:** compare brands, products or competitors over 5 years.
- **Seasonality:** spot when demand for a product starts climbing each year.
- **Dashboards and AI agents:** feed fresh trend data into Sheets, BI tools or an agent workflow on a schedule.

### FAQ

**Why are the values 0 to 100 and not search counts?**
Google Trends only publishes relative interest. 100 is the peak for the chosen terms, place and period. Compared terms share one scale, so their values can be compared directly.

**Why are related topics often empty?**
Since 2026 Google's data feed returns related topics empty for most searches, and never returns them for compared terms. The option is off by default; when it is on and Google sends nothing, the result says so in `notes`.

**What happens when Google blocks a request?**
The Actor waits, opens a new session with a new proxy IP and tries again, up to 7 times per request, switching to residential proxies after repeated blocks when your plan has them.

**Can I find category IDs?**
They are the numbers in the `cat=` parameter of a trends.google.com URL after you pick a category there.

### Other Actors by this developer

- [Google Trending Now](https://apify.com/fernandosord/google-trending-now): today's trending searches for any list of countries, with the news behind them.
- [Website Change Detection](https://apify.com/fernandosord/website-change-monitor): get the exact lines that changed on any page you watch.
- [Website Tech Stack Detector](https://apify.com/fernandosord/website-tech-stack-detector): the CMS, frameworks and analytics behind a list of sites.
- [Telegram Scraper](https://apify.com/fernandosord/telegram-channel-scraper): posts, views and reactions from public Telegram channels.

# Actor input Schema

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

Keywords or Google Trends topic IDs (like /m/0k8z) to look up. Each term gets its own result unless 'Compare terms' is on.

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

Put the terms on one chart, like the compare box on trends.google.com. Terms are grouped 5 at a time. Values are then relative to each other.

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

Country or region code, for example US, CA, GB, US-CA or CA-ON. Leave empty for worldwide.

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

Period to cover. Ignored when a custom range is set.

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

Optional. Two dates as YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-12-31.

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

Google Trends category number. 0 means all categories.

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

Which Google search to measure.

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

Timeline of search interest from 0 to 100.

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

Search interest per country, region or city.

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

Level of detail for interest by region. Worldwide searches always use countries.

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

Top and rising searches related to each term.

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

Top and rising topics related to each term. As of October 2026 Google returns this list empty for most searches; the result then says so in 'notes'.

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

Language for names of regions and topics, for example en-US or fr-CA.

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

Google limits how often one IP can ask for Trends data. The Actor rotates proxies and retries automatically.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee"
  ],
  "compareTerms": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "REGION",
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per search term or comparison group: timeline, regions and related queries.

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

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

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

```

## MCP server setup

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