# Google Trends Scraper: search interest by keyword and region (`bepolabs/google-trends`) Actor

Trending now or daily since 2004? Schedule runs, call it by API or hand it to an AI agent. Pick a period from the past hour to everything since 2004 and receive one row per date, to export into spreadsheets.

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

## Pricing

$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

### 📈 What is Google Trends Scraper?

Type in products, companies or ideas and get tidy tables showing how often people look them up on Google, worldwide, by categories and time ranges. No browser, login or key needed. Each result is verified before the run ends, and slowdowns on Google's side trigger repeated attempts.

- **SEO and content planning**: find out which topics grow and which related searches to write about next
- **Market and product research**: compare brands or categories next to each other over months or years
- **Seasonality**: see when demand for a product peaks, five years back or since 2004
- **Investing and crypto**: track public attention for a coin, a stock or a company
- **Dashboards and reports**: schedule a run and feed the rows into Google Sheets, Looker Studio or a database

![Google Trends Scraper: Interest over time for up to five keywords on one 0 to 100 scale, any country or worldwide, plus top and rising related queries.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/google-trends-hero.png)

#### ✨ Why use this Actor?

- ✅ **Comparisons on one scale**: up to five keywords in one run share the same 0 to 100 axis, exactly as on Google Trends
- ✅ **Retries built in**: every request is retried with exponential backoff when Google answers 429 or a server error
- ✅ **Self-check on every run**: a run only counts as good when every keyword has rows and real values; otherwise it fails with the reason
- ✅ **Clean, stable rows**: the same eight fields in every row, ready for spreadsheets, databases and AI agents
- ✅ **No account, no key**: no Google login, no proxy setup, nothing to configure but your keywords
- ✅ **Pay per row**: 3 USD per 1,000 rows, nothing per run or per keyword

### 📦 What data can you get with Google Trends Scraper?

| | | |
|---|---|---|
| 🔤 Keyword | 📅 Date (ISO, start of the period) | 🏷️ Date label as Google shows it |
| 📊 Interest value (0 to 100) | ✅ Has data flag | ⏳ Partial flag for the running period |
| 🌍 Country code or WORLD | 🕒 Time range | 🔍 Top related queries |
| 🚀 Rising related queries |  |  |

> Related queries are stored once per run in the key-value store (`RELATED`), not in every row.

### 🚀 How to use Google Trends Scraper

Google Trends Scraper works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [Google Trends Scraper](https://apify.com/bepolabs/google-trends) and click **Try for free**.
3. Enter one to five keywords, pick a country (or leave it empty for worldwide) and a time range.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How Google Trends Scraper works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/google-trends-workflow.png)

### ⬇️ Input

Only `keywords` is required. One keyword gives its own curve; two to five keywords are compared on the same scale.

##### Country

Use an ISO country code such as `US`, `DE` or `GB`. Leave `geo` empty for worldwide; rows then show `WORLD`.

##### Time range

Any Google Trends range: `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m` (default), `today 5-y` or `all` (since 2004). Google picks the step: hours, days, weeks or months.

##### Related queries

On by default. Switch `includeRelated` off when you only need the curve; the run then skips that lookup.

| Field | Type | What it does | Default |
|---|---|---|---|
| **Keywords** (`keywords`) | array | One to five search terms. | `["bitcoin"]` |
| **Country** (`geo`) | string | ISO country code such as US or DE, or empty for worldwide. | `""` |
| **Time range** (`timeRange`) | string | A Google Trends range. | `"today 12-m"` |
| **Category id** (`category`) | integer | Google Trends category id, 0 for all categories. | `0` |
| **Include related queries** (`includeRelated`) | boolean | Also store the top and rising related queries per keyword. | `true` |
| **Maximum retries** (`maxRetries`) | integer | Retries per request with exponential backoff. | `4` |

![Google Trends Scraper input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/google-trends-input.png)

#### Input example

```json
{
    "keywords": [
        "bitcoin",
        "ethereum"
    ],
    "geo": "US",
    "timeRange": "today 12-m"
}
```

### ⬆️ Output

Every keyword gets one row per date. The last period of a range is usually still running and is marked with `isPartial: true`, so you can leave it out of charts. The run summary (`OUTPUT` in the key-value store) holds the self-check result and the input.

![Google Trends Scraper output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/google-trends-output.png)

#### Output example

One row of the dataset (bitcoin, United States, last 12 months):

```json
{
    "keyword": "bitcoin",
    "date": "2025-10-12",
    "label": "Oct 12 – 18, 2025",
    "value": 41,
    "hasData": true,
    "isPartial": false,
    "geo": "US",
    "timeRange": "today 12-m"
}
```

#### Related queries

The key-value store record `RELATED` lists the leading and rising searches for each keyword, with Google's value (0 to 100, or growth in percent, or `Breakout`). From the same run, shortened:

```json
[
    {
        "keyword": "bitcoin",
        "top": [
            {
                "query": "bitcoin price",
                "value": 100,
                "formattedValue": "100"
            },
            {
                "query": "bitcoin today",
                "value": 19,
                "formattedValue": "19"
            },
            {
                "query": "bitcoin stock",
                "value": 19,
                "formattedValue": "19"
            }
        ],
        "rising": [
            {
                "query": "how to buy bitcoin safely",
                "formattedValue": "Breakout"
            },
            {
                "query": "spacex stock",
                "formattedValue": "+1,850%"
            }
        ]
    }
]
```

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.

### 💰 How much does Google Trends Scraper cost?

Google Trends Scraper is priced **per event**: **3 USD per 1,000 rows** (0.003 USD per row), with no monthly rental. Related queries are included; a run that Google blocks is not charged.

| You get | You pay |
|---|---|
| 100 rows | 0.3 USD |
| 1,000 rows | 3 USD |
| 10,000 rows | 30 USD |
| 100,000 rows | 300 USD |

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **1,666 rows** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ Google Trends Scraper vs. the alternatives

| | Google Trends Scraper | trends.google.com | Other Trends scrapers |
|---|---|---|---|
| **Compare up to 5 keywords** | ✅ | ✅ | often one at a time |
| **Clean rows for Sheets, databases, AI** | ✅ | CSV per chart | varies |
| **Retries when Google slows down** | ✅ | ❌ | often fail |
| **Self-check of every run** | ✅ | ❌ | ❌ |
| **Schedules, API and MCP** | ✅ | ❌ | ✅ |

### 🔌 Integrations, API and MCP

#### Connect Google Trends Scraper to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to Google Trends Scraper through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/google-trends
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "google-trends": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/google-trends"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then ask: *"Compare Google search interest for bitcoin and ethereum in the US over the last 12 months and tell me when each peaked."*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/google-trends").call(run_input={"keywords":["bitcoin","ethereum"],"geo":"US","timeRange":"today 12-m"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/google-trends').call({"keywords":["bitcoin","ethereum"],"geo":"US","timeRange":"today 12-m"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### What do the values mean?

Google Trends values are relative: 100 is the highest interest in the chosen range, region and keyword set, 50 is half of that. They are not search counts.

##### Why do the numbers change when I add a keyword?

All keywords in one run share one scale. Adding a more popular keyword lowers the values of the others, exactly as on trends.google.com.

##### What does isPartial mean?

The last step of a range is often still running. Google marks it, and so does every row dated in it.

##### How far back can I go?

`all` goes back to 2004. Short ranges such as `now 1-H` or `now 7-d` give minute or hour steps.

##### What if Google blocks a request?

The Actor retries each request with growing pauses (`maxRetries`, default 4). If Google still refuses, the run fails with a clear message and costs nothing.

##### Does it list Google's trending searches?

No, not Google's daily trending-searches page. It reads the interest in the keywords you enter, plus leading and rising queries around each, saved in the `RELATED` record.

##### Is it legal to use Google Trends Scraper?

Google Trends shows aggregated, anonymous search interest to everyone without a login; the Actor reads the same public data, with no personal data in it. Check Google's terms for your use case, and cite Google Trends as the source when you publish charts.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what Google Trends Scraper should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 📢 [Google Ads Transparency Scraper](https://apify.com/bepolabs/google-ads-transparency) | Every ad a company runs on Google, by domain, advertiser ID or name, from the Ads Transparency Center. |
| 📈 [Wikipedia Pageviews](https://apify.com/bepolabs/wikipedia-pageviews) | Daily or monthly views of any Wikipedia article in any language, with totals and averages, from the official Wikimedia API. |
| 🔗 [Broken Link Checker](https://apify.com/bepolabs/link-checker) | Every link and image on your pages checked: HTTP status, each redirect hop, final URL and response time. |
| ⚡ [Bulk PageSpeed Insights](https://apify.com/bepolabs/pagespeed) | Lighthouse scores, lab metrics and real-user Core Web Vitals for any list of URLs, on mobile, desktop or both. |
| 🩺 [SEO Audit](https://apify.com/bepolabs/seo-audit) | Any page to a 0 to 100 SEO score and grade, with the fixes that matter most first: on-page, links and Core Web Vitals. |
| 🗺️ [Sitemap URL Extractor](https://apify.com/bepolabs/sitemap-urls) | Every URL of a website from its sitemaps, in one deduplicated list with lastmod, changefreq and priority. |
| 🕰️ [Wayback Machine Scraper](https://apify.com/bepolabs/wayback-snapshots) | The archive history of any URL or domain: first and last seen, every capture, and the page text of old versions. |
| 📸 [Website Screenshot](https://apify.com/bepolabs/website-screenshot) | Full-page PNG, JPEG or PDF of any URL, on desktop, tablet and phone, with cookie banners closed. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/google-trends/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

One to five search terms. More than one compares them on the same 0 to 100 scale.

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

ISO country code such as US or DE, or empty for worldwide.

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

A Google Trends range.

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

Google Trends category id, 0 for all categories.

## `includeRelated` (type: `boolean`):

Also store the top and rising related queries per keyword.

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

Retries per request with exponential backoff.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "includeRelated": true,
  "maxRetries": 4
}
```

# Actor output Schema

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

Dataset items, one row per result, in the overview table view.

# 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 = {
    "keywords": [
        "bitcoin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bepolabs/google-trends").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 = { "keywords": ["bitcoin"] }

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

```

## MCP server setup

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

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/JvvaCAiEFzD1fRvD5/builds/3uqD7g2FiUcLOPnX0/openapi.json
