# Google Trends Scraper — Pay per Keyword (`oloro/google-trends-scraper`) Actor

Google Trends without the per-row bill. One flat price per keyword covers interest over time, interest by region, top and rising queries, and Trending now. Keywords that fail or come back empty are free. Monitor mode for schedules and a Standby API for AI agents.

- **URL**: https://apify.com/oloro/google-trends-scraper.md
- **Developed by:** [Oloro Software LTDA](https://apify.com/oloro) (community)
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 analyzed keywords

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/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: pay per keyword, not per row

Get Google Trends data for any keyword and pay **one flat price per keyword**, no matter how many rows it returns. Keywords that fail or come back empty are **never charged**, and every keyword ends with a clear record of what happened.

Use it as a **Google Trends API**: from the Console, from Python or JavaScript, from n8n, Make or Zapier, or from an AI agent over HTTP. No Google account or API key needed. It's a stable alternative to `pytrends` and other unofficial libraries that break when Google changes its endpoints or starts blocking requests.

- 📈 **Interest over time**: up to 5 keywords compared on the same scale, like on the Google Trends website.
- 🗺️ **Interest by region**: country, state, city or US metro area.
- 🔎 **Related queries**: top and rising, including "Breakout".
- 🔥 **Trending now**: what people are searching for right now in any country, with the related news.
- 🎯 **Filters**: location, time range (past hour to 2004), category and search source (Web, YouTube, News, Images, Shopping).

### Why this Actor

#### One price per keyword, all data included

Most Google Trends scrapers charge **per result row**. One keyword over the past 12 months in one country easily returns 130 rows or more:

| Data                        | Typical rows |
| --------------------------- | ------------ |
| Interest over time (weekly) | 52-53        |
| Interest by region          | ~27 (states) |
| Related queries             | ~50          |

With per-row pricing you pay for each of those rows, and the bill grows every time you widen the time range or add regions. Here, **all of it counts as one keyword**. See the **Pricing** tab for the current price.

|                                 | Per-row pricing                | This Actor                |
| ------------------------------- | ------------------------------ | ------------------------- |
| 1 keyword, past 12 months       | ~130 billed rows               | 1 keyword                 |
| Same keyword, past 7 days       | ~190 billed rows (hourly data) | 1 keyword                 |
| Keyword Google has no data for  | often still billed             | free, with a `noData` row |
| Keyword blocked by Google       | depends on the scraper         | free, with a `failed` row |
| Daily schedule, nothing changed | billed again in full           | free in monitor mode      |

#### Who it's for

- **SEO and content teams**: seasonality, rising queries and regional demand before you write or launch.
- **Data and analytics teams**: a clean daily feed of Google Trends into a warehouse, spreadsheet or dashboard.
- **Product and market research**: compare brands, products or competitors by country and over time.
- **AI agents and automations**: one HTTP call returns the rows, and every field has a default.

#### You never pay for empty results

- A keyword is charged only when it returns data.
- Keywords that fail (blocked, rate-limited, timed out) or have no data on Google are **not charged**.
- In monitor mode, a keyword with nothing new since the last run is **not charged**.
- Your spending limit is respected: once it's reached, the remaining keywords are skipped and marked as such.
- The only charge that doesn't depend on results is Apify's tiny **Actor start** fee, once per run (see **Pricing**).

#### You always know what happened

Every keyword that doesn't come back complete gets a **status row** in the dataset: `failed`, `partial`, `noData` or `skipped`. The row includes the reason (for example `RATE_LIMITED` or `DEADLINE_EXCEEDED`), how many attempts were made and whether it was charged. No more guessing whether an empty result means "no interest" or "the scraper broke".

The run summary is stored in the `OUTPUT` record. When Google doesn't deliver something you asked for, the run tells you in `OUTPUT.warnings` instead of failing silently.

#### Built to get through Google's limits

Google Trends rate-limits aggressively. Each request is retried with exponential backoff, switching to a new proxy IP and a fresh cookie session after every block, within a time limit per keyword that you control. One keyword hitting a wall doesn't stop the others.

#### Region data you can trust in comparisons

When you compare keywords, Google's comparison map shows each keyword's **share** of the searches in a region. In that view, a smaller keyword looks like zero everywhere. This Actor returns each keyword's **own 0-100 regional index** instead, the same number you'd get searching for that keyword alone. That makes regional values comparable across runs, with or without comparison.

#### Made for schedules and AI agents

- **Monitor mode**: schedule the Actor and get only what's new each time, such as new rising queries, new data points, regions that changed and new trending topics.
- **Standby API**: call it over HTTP and get the rows back in the response. No dataset polling.
- **Agent-friendly input**: every field has a default, so even `{}` is a valid input. The output is one flat row format that's easy to filter, export to CSV, or hand to an LLM.

### How to use it

1. Enter one or more **Search terms**.
2. Optionally turn on **Compare terms**, and pick a **Location** and **Time range**.
3. Click **Start**. Results appear in the **Output** tab, with ready-made views for interest over time, related queries, trending now, and failures and warnings.

#### Input example

```json
{
    "searchTerms": ["chatgpt", "gemini", "claude"],
    "compareTerms": true,
    "geo": "US",
    "timeRange": "today 12-m",
    "dataTypes": ["interestOverTime", "interestByRegion", "relatedQueries"]
}
```

To also get trending searches, add country codes to `trendingNowGeos`, for example `["US", "GB"]`.

### Output

Every row has a `type` field. All types share one flat format, so the dataset exports cleanly to CSV, Excel or JSON.

| `type`             | Main fields                                                                     |
| ------------------ | ------------------------------------------------------------------------------- |
| `interestOverTime` | term, comparedWith, date, formattedTime, value, isPartial                       |
| `interestByRegion` | term, geoCode, geoName, value                                                   |
| `relatedQuery`     | term, listType (`top`/`rising`), query, value, formattedValue, link             |
| `relatedTopic`     | term, listType, topicTitle, topicType, topicMid, value, formattedValue          |
| `trendingNow`      | geo, title, approxTraffic, pubDate, newsTitle, newsUrl, newsSource, newsCount   |
| `status`           | term, status (`failed`/`partial`/`noData`/`skipped`), reason, attempts, charged |

Every row also includes `geo`, `timeRange`, `property`, `category` and `scrapedAt`.

Example (shortened, illustrative values):

```json
[
    {
        "type": "interestOverTime",
        "term": "claude",
        "comparedWith": "chatgpt | gemini",
        "geo": "US",
        "date": "2026-11-01T00:00:00.000Z",
        "formattedTime": "Nov 1 – 7, 2026",
        "value": 21,
        "isPartial": true
    },
    {
        "type": "interestByRegion",
        "term": "claude",
        "geoCode": "US-CA",
        "geoName": "California",
        "value": 100
    },
    {
        "type": "relatedQuery",
        "term": "claude",
        "listType": "rising",
        "query": "claude code",
        "value": 82000,
        "formattedValue": "Breakout",
        "link": "https://trends.google.com/trends/explore?q=claude+code&date=today+12-m&geo=US"
    },
    {
        "type": "status",
        "term": "some rare keyword",
        "status": "noData",
        "reason": "Google has not enough data for this term and filter",
        "attempts": 1,
        "charged": false
    }
]
```

#### What the values mean

- **Interest over time**: Google's 0-100 index, where 100 is the peak within the chart. In comparisons, all keywords in the group share the same scale. The last point can be `isPartial: true` while the current period is still in progress. Periods where Google has too little data come out as `0`, as on the Google Trends website, so the series is always complete.
- **Interest by region**: each keyword's own 0-100 index per region, also when comparing (see above).
- **Related queries**: for `top`, a 0-100 relative score. For `rising`, the growth percentage. `Breakout` means growth above 5,000%.

#### Related topics

You can request `relatedTopics` in **Data to collect**, but it is off by default. Google never sends related topics for comparisons, and it currently tends to return an empty list for single keywords too. If you request them and none arrive, the run says so in `OUTPUT.warnings`.

### Pricing

This Actor uses **pay per event**:

- **Analyzed keyword**: charged once per keyword that returns data, with all selected data types included.
- **Trending search**: charged per Trending now search returned.
- **Actor start**: a fixed Apify fee charged when a run starts, one event per GB of memory (one at the default 512 MB). It's a fraction of a cent.

Failed, empty and skipped keywords are free. Check the **Pricing** tab for the current prices.

### Use it from code

Get your API token in **Apify Console → Settings → API & Integrations** and keep it in an environment variable (`APIFY_TOKEN`).

#### Python

```python
import os
from apify_client import ApifyClient  # pip install apify-client

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("oloro/google-trends-scraper").call(
    run_input={"searchTerms": ["chatgpt", "gemini"], "compareTerms": True, "geo": "US"}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["type"], row.get("term"), row.get("date"), row.get("value"))
```

#### JavaScript / TypeScript

```js
import { ApifyClient } from 'apify-client'; // npm i apify-client

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('oloro/google-trends-scraper').call({
    searchTerms: ['chatgpt', 'gemini'],
    compareTerms: true,
    geo: 'US',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### One HTTP call (curl, n8n, Make, Zapier)

The run-sync endpoint starts a run, waits for it and returns the dataset rows:

```bash
curl -X POST "https://api.apify.com/v2/acts/oloro~google-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms":["chatgpt"],"geo":"US","timeRange":"today 3-m"}'
```

In **n8n**, put the same request in an HTTP Request node, behind a Schedule Trigger. In **Make** and **Zapier**, use Apify's own integration and pick this Actor. For a daily feed, turn on `monitorMode` so each run returns only what's new.

#### AI agents (MCP)

Through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), Claude, Cursor and other MCP clients can call this Actor as a tool. Add `oloro/google-trends-scraper` to the server's Actors. For direct HTTP calls without a dataset, use the Standby API below.

### Standby API (for AI agents and apps)

The Actor can answer HTTP requests directly. It takes the same input as a normal run, as query parameters or as a JSON body:

```
GET  https://oloro--google-trends-scraper.apify.actor/?searchTerms=chatgpt,gemini&geo=US&compareTerms=true
POST https://oloro--google-trends-scraper.apify.actor/
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

The response is `{ "summary": { … }, "rows": [ … ] }`. Monitor mode is off in Standby, so every call is independent.

### Monitor mode

Turn on **Monitor mode** and schedule the Actor (for example daily). Each run compares the results with the previous run with the same settings and delivers only:

- new data points in interest over time (the in-progress point comes along when there's other news, but a change in it alone doesn't count as new);
- regions whose value changed;
- related queries that weren't there before;
- trending searches not seen before.

Keywords with nothing new are not charged. The state is kept in a named key-value store in your account (`oloro-trends-monitor`), so schedules with different settings never mix.

### FAQ

**Do I need a Google account or an API key?**
No.

**Which proxy should I use?**
Residential (the default). Google blocks datacenter IPs quickly.

**Why does a keyword show `noData`?**
Google doesn't have enough search volume for that keyword with the chosen location, time range and filters. Try a wider location or a longer time range. `noData` keywords are not charged.

**What does `partial` mean?**
Some of the selected data types arrived and others failed after all retries. The keyword is charged because it returned data, and the status row says which part failed.

**How fresh is the data?**
It's read live from Google Trends on every run, at the same detail the website shows.

### Feedback

Found a problem or missing a feature? Open an issue in the **Issues** tab. Reports with the run ID get fixed fastest.

# Actor input Schema

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

Keywords to analyze. Each keyword that returns data is charged once, with all selected data types included.

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

Turns comparison on: terms are grouped 5 at a time and interest over time is relative within each group, like on the Google Trends website. Interest by region always uses each term's own 0-100 index. When off, each term is analyzed on its own.

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

ISO code of the country or region, for example US, BR or US-CA. Empty = worldwide.

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

Time window of the analysis.

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

Which Google search to look at.

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

Google Trends category ID. 0 = all categories.

## `dataTypes` (type: `array`):

Series included for each keyword, all at the same per-keyword price. Related topics are off by default: Google never sends them in comparisons and currently tends to return an empty list for single terms too. If you request them and none arrive, the run says so in the log and in OUTPUT.warnings.

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

Level of geographic detail. Automatic follows what Google picks for the location.

## `trendingNowGeos` (type: `array`):

Country codes to fetch what's trending right now (for example US, BR). Charged per row returned. Empty = not collected.

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

Language for region and topic names (Google's hl parameter), for example en-US or pt-BR.

## `monitorMode` (type: `boolean`):

For scheduled runs: delivers only what changed since the previous run with the same settings (new rising queries, new points in the series, regions that changed, new Trending now topics). Runs with nothing new are not charged. The first run delivers everything.

## `maxTimePerTermSecs` (type: `integer`):

Time limit for each term, or group of compared terms. If it runs out, the term becomes a status row and is not charged.

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

How many times to retry a request that Google blocked or rate-limited, switching proxy IP each time.

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

More parallelism finishes sooner but raises the chance of Google rate limits.

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

Google quickly blocks datacenter IPs. Residential proxies are recommended.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "gemini"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "regionResolution": "auto",
  "trendingNowGeos": [],
  "language": "en-US",
  "monitorMode": false,
  "maxTimePerTermSecs": 60,
  "maxRetries": 5,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Every row of the run: interest over time, interest by region, related queries and topics, Trending now and status rows.

## `interestOverTime` (type: `string`):

Google's 0-100 index per keyword and period.

## `related` (type: `string`):

Top and rising related queries (and topics, when requested) per keyword.

## `trendingNow` (type: `string`):

Trending searches per country, with the related news.

## `status` (type: `string`):

One status row per keyword that didn't come back complete (failed, partial, noData or skipped), with the reason and whether it was charged.

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

Counts of keywords with data, failed, without data and skipped, what was charged, and warnings about data Google didn't deliver.

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

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

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

```

## MCP server setup

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