# Google Trends Bulk Scraper (`parkville/google-trends-bulk`) Actor

Bulk Google Trends reports for many keywords: interest over time, interest by region, related queries and topics, 5 keyword comparisons and trending searches. Failed reports are never charged.

- **URL**: https://apify.com/parkville/google-trends-bulk.md
- **Developed by:** [ParkVille LLC](https://apify.com/parkville) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 trends reports

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 Bulk Scraper

Get Google Trends data for hundreds of keywords in one run. Each keyword (or comparison of up to 5 keywords) in each country becomes one dataset row with interest over time, interest by region, related queries and related topics. Rows that fail say why, and failed reports are never charged.

It talks to Google Trends over plain HTTP, without a browser, so runs start fast and use 256 MB of memory.

### What you can do with it

- Track seasonality and demand for a product catalogue, a list of brands or a keyword plan.
- Compare up to 5 keywords on the same 0 to 100 scale, exactly like the Compare box on trends.google.com.
- Find where a topic is most popular, by country, region, city or US metro area.
- Mine rising and top related queries for content and SEO ideas.
- Pull today's trending searches for several countries.

### Features

- **Bulk:** many keywords times many countries in one run, one row per report, in input order.
- **All sections in one row:** interest over time, interest by region, related queries (top and rising), related topics (top and rising). Switch off what you do not need to save requests.
- **Compare mode:** each input line is a comparison of up to 5 comma separated keywords (Google's limit). Values are relative to each other.
- **Trending now mode:** current trending searches per country from Google's trending feed, with approximate traffic and news links.
- **Any timeframe:** past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, since 2004, or a custom date range.
- **Filters:** category, search type (web, images, news, YouTube, Shopping), language and time zone.
- **Built for reliability:** a cookie session per proxy IP, reused while it works; a fresh session and IP after a rate limit or token error; exponential backoff with jitter; a global slow down when Google pushes back; and a time limit per report so one stubborn keyword never stalls the run.
- **Honest results:** a keyword without enough search volume is a valid row with `status: "empty"`, empty arrays and a note, not an error, and it is not charged. A failed report has a clear `error` and `errorType`.
- **Polite by default:** 2 reports at a time and a short pause between requests on the same session.

### Input example

Only `keywords` is required (except in Trending now mode).

```json
{
    "keywords": ["coffee", "matcha", "cold brew"],
    "geos": ["US", "GB", "DE"],
    "timeframe": "today 12-m",
    "includeInterestOverTime": true,
    "includeInterestByRegion": true,
    "includeRelatedQueries": true,
    "includeRelatedTopics": false
}
```

This gives 9 reports (3 keywords in 3 countries).

A comparison of 5 keywords, worldwide, over the past 90 days:

```json
{
    "mode": "compare",
    "keywords": ["coffee, tea, mate, matcha, kombucha"],
    "timeframe": "today 3-m"
}
```

A custom date range on YouTube search:

```json
{
    "keywords": ["bitcoin"],
    "geos": ["GB"],
    "timeframe": "custom",
    "startDate": "2024-01-01",
    "endDate": "2024-03-31",
    "property": "youtube"
}
```

Trending searches in two countries:

```json
{
    "mode": "trending",
    "geos": ["US", "PT"]
}
```

Geos are ISO 3166-1 country codes (US, DE, GB, ...) or regions (US-CA). Leave `geos` empty for worldwide. An invalid code becomes a failed row for that geo only; the rest of the run goes on. All options with their defaults are listed on the Input tab.

### Output

One dataset row per report. Shortened example from a real run (custom range, GB, YouTube search):

```json
{
    "index": 1,
    "type": "keyword",
    "keywords": ["bitcoin"],
    "keyword": "bitcoin",
    "geo": "GB",
    "geoLabel": "GB",
    "timeframe": "2024-01-01 2024-03-31",
    "timeRange": "2024-01-01 2024-03-31",
    "category": 0,
    "property": "youtube",
    "language": "en-US",
    "timezoneOffset": 0,
    "status": "ok",
    "interestOverTime": {
        "timeline": [
            { "date": "2024-01-01T00:00:00.000Z", "timestamp": 1704067200, "formattedTime": "Jan 1, 2024", "values": [31], "hasData": [true], "isPartial": false },
            { "date": "2024-01-02T00:00:00.000Z", "timestamp": 1704153600, "formattedTime": "Jan 2, 2024", "values": [44], "hasData": [true], "isPartial": false }
        ],
        "averages": []
    },
    "interestByRegion": null,
    "relatedQueries": [
        {
            "keyword": "bitcoin",
            "top": [
                { "query": "bitcoin news", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/trends/explore?q=bitcoin+news&date=2024-01-01+2024-03-31&geo=GB" },
                { "query": "bitcoin price", "value": 88, "formattedValue": "88", "link": "https://trends.google.com/trends/explore?q=bitcoin+price&date=2024-01-01+2024-03-31&geo=GB" }
            ],
            "rising": [
                { "query": "bitcoin halving explained", "value": 23600, "formattedValue": "Breakout", "link": "https://trends.google.com/trends/explore?q=bitcoin+halving+explained&date=2024-01-01+2024-03-31&geo=GB" }
            ]
        }
    ],
    "relatedTopics": null,
    "trends": null,
    "notes": [],
    "error": null,
    "errorType": null,
    "attempts": 1,
    "requestCount": 4,
    "durationMs": 5600,
    "fetchedAt": "2026-11-10T08:26:11.703Z"
}
```

- `values` arrays follow the order of `keywords`. A single keyword report has one value per point; a comparison has one per keyword.
- `interestByRegion.regions` holds `{ geoCode, geoName, values, hasData }` per region.
- `relatedQueries` and `relatedTopics` are lists with one entry per keyword. Topics have `mid`, `title` and `type` instead of `query`. A rising `formattedValue` of "Breakout" means growth above 5000%.
- A section you switched off is `null`.
- `status` is `ok` (data delivered), `empty` (Google has no data for this keyword, geo and timeframe) or `failed` (see `error`).
- `errorType` is one of `invalid_input`, `rate_limited`, `bad_request`, `timeout`, `token`, `network`, `server`, `parse`, `not_found`, `internal`.
- In Trending now mode, `trends` lists `{ title, approxTraffic, pubDate, picture, pictureSource, newsItems }` for the country.

A `SUMMARY` record in the key-value store counts ok, empty, failed and skipped reports, requests sent, rate limits hit, sessions used and reports charged.

### Use it over the API

Replace `<YOUR_API_TOKEN>` with your Apify API token and `<ACTOR_ID>` with this Actor's ID (shown in the API tab, in the form `username~actor-name`).

#### Run and get the results in one call (curl)

The synchronous endpoint suits small batches that finish within 5 minutes; use an asynchronous run for long keyword lists.

```bash
curl -X POST "https://api.apify.com/v2/acts/<ACTOR_ID>/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["coffee", "matcha"], "geos": ["US"], "timeframe": "today 3-m"}'
```

#### Node.js (apify-client)

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('<ACTOR_ID>').call({
    keywords: ['coffee', 'matcha'],
    geos: ['US', 'GB'],
    includeRelatedTopics: false,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    console.log(item.keyword, item.geoLabel, item.status, item.error ?? item.interestOverTime?.timeline.length);
}
```

#### Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("<ACTOR_ID>").call(run_input={
    "mode": "compare",
    "keywords": ["coffee, tea, mate"],
    "timeframe": "today 5-y",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["keyword"], item["status"], item["error"])
```

### Pricing

Pricing: pay per report. Failed reports are never charged.

A report is one row: one keyword or comparison in one geo, with all the sections you selected. Rows with `status: "empty"` (Google has no data) are not charged either. The maximum cost per run you set is respected: when it is reached, no new reports are started and the log says how many were skipped.

### Limits and honest notes

- **Values are relative, not search volumes.** Google Trends gives a 0 to 100 index, where 100 is the peak within that one report. Numbers from different reports are not on the same scale. Use Compare mode when you need keywords side by side.
- **Google may rate limit.** Trends has no public API (Google's official one is in closed alpha), and Google throttles automated traffic, data centre IPs most of all. The Actor rotates sessions and residential IPs and backs off, but on a bad day some reports can still fail with `rate_limited`. They are not charged; run them again later.
- **Related topics are often empty.** Google frequently returns no related topics even for popular keywords, and never for comparisons of several keywords. The row says so in `notes`.
- **Low volume keywords** come back as `empty` rows. Try a wider geo or a longer timeframe.
- **Trending now** comes from Google's public trending feed: about 10 current searches per country, with approximate traffic. It needs a country code; there is no worldwide feed.
- **Hourly timeframes** (past hour, 4 hours, day, 7 days) are only available for recent data, as on trends.google.com.
- **Google changes Trends from time to time.** The Actor checks the shape of every response and fails a report with a clear message rather than returning wrong data.
- No login and no CAPTCHA solving: only the public Trends data that anyone can see on trends.google.com.

### FAQ

**Why do my numbers differ from what I see on trends.google.com?**
Google samples its data, so the same query can shift by a few points between requests. Also check that geo, timeframe, category and search type match.

**Why is a keyword "empty"?**
Google has too little search volume for it in that geo and timeframe. It is a real answer, so the row is kept, with a note, and it is not charged.

**Can I compare more than 5 keywords?**
Not in one report; that is Google's limit. Put one keyword in every comparison line (for example a benchmark term) to relate several comparisons to each other.

**What does "Breakout" mean in rising queries?**
The query grew by more than 5000% compared with the previous period.

**Can I run it without a proxy?**
Yes, set the proxy to none. It works for small runs, but Google rate limits data centre IPs quickly, so residential proxies are the default.

# Actor input Schema

## `mode` (type: `string`):

Separate keywords: one report per keyword. Compare: each line is one comparison of up to 5 comma separated keywords on the same 0 to 100 scale. Trending now: the current trending searches per country (keywords are ignored).

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

One keyword per line. In Compare mode, one comparison per line with up to 5 keywords separated by commas, for example: coffee, tea, mate. Required unless the mode is Trending now.

## `geos` (type: `array`):

ISO 3166-1 country codes such as US, DE or GB, or regions such as US-CA. Leave empty for worldwide. Each keyword gets one report per entry. Write "worldwide" to mix worldwide with countries.

## `timeframe` (type: `string`):

Time range of the report. Custom uses the start and end dates below.

## `startDate` (type: `string`):

First day of a custom timeframe, YYYY-MM-DD, 2004-01-01 or later.

## `endDate` (type: `string`):

Last day of a custom timeframe, YYYY-MM-DD, not in the future.

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

Google Trends category id. 0 means all categories. Ids are in the cat= parameter of a trends.google.com explore URL, for example 71 for Food and Drink.

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

Which Google search the data comes from.

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

Time series of the 0 to 100 interest index.

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

Interest index per country, region, city or metro area.

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

Level of the interest by region breakdown. Automatic: countries for worldwide, regions (states) for a country. Metro areas (DMA) exist only for US geos.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also list regions where Google has too little data (their value is 0).

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

Top and rising related search queries, per keyword.

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

Top and rising related topics, per keyword. Google does not offer them for comparisons and often returns an empty list.

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

Interface language for names in the results (region names, formatted dates), for example en-US, de or pt-BR.

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

Minutes behind UTC, as Google expects it: 0 for UTC, 300 for New York in winter, -60 for Berlin in winter. Affects how hourly and daily points are bucketed.

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

Residential proxies are strongly recommended: Google rate limits data centre IP ranges quickly. Each session uses its own IP, and a new one after a rate limit.

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

Reports fetched at the same time. Low values are gentler on Google and less likely to be rate limited.

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

How many times a report is retried after a rate limit or a temporary error, each time with a new session and a longer wait. Errors that retrying cannot fix are not retried.

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

Pause between two requests of the same session (about 25% random jitter is added). A report takes 3 to 12 requests.

## `reportTimeoutSecs` (type: `integer`):

Total time one report may take, retries and waits included. When it runs out the report is marked failed and the run moves on.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "coffee",
    "matcha"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m",
  "category": 0,
  "property": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "auto",
  "includeLowSearchVolumeRegions": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "language": "en-US",
  "timezoneOffset": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 2,
  "maxRetries": 4,
  "requestDelayMs": 800,
  "reportTimeoutSecs": 180
}
```

# Actor output Schema

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

One item per report with status, interest over time, interest by region, related queries and topics, or the error.

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

Counts of ok, empty, failed and skipped reports, requests sent, rate limits and charges.

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

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

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

```

## MCP server setup

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

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/IeYCV0YC5C99rq3vE/builds/cyloHercTGqZX1rlU/openapi.json
