# Google Trends Bulk: Compare & Rising Queries (`ayoubdev5/google-trends-keyword-research`) Actor

Bulk Google Trends for hundreds of keywords in one run: interest over time with trend stats, interest by region, top and rising related queries with Breakout flags. Compare up to 5 keywords on the same scale. Pay only for keywords that succeed.

- **URL**: https://apify.com/ayoubdev5/google-trends-keyword-research.md
- **Developed by:** [Ayoub Taqi](https://apify.com/ayoubdev5) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.0025 / keyword result

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: Compare & Rising Queries

Get Google Trends data for **hundreds of keywords in one run**. For every keyword you get interest over time with ready-made trend stats, interest by region, and **top + rising related queries with Breakout flags**. Compare up to 5 keywords on the same scale, like the Compare box on Google Trends.

**You only pay for keywords that return data.** Failed keywords are free.

### What you get for each keyword

- 📈 **Interest over time**: the full series, plus average, latest value, peak and peak date, and trend change in %
- 🚀 **Rising related queries** with growth (`+250%`) and **Breakout** flags, plus a ready list of breakout queries
- 🔝 **Top related queries**
- 🌍 **Interest by region**: countries, or states / cities / US metro areas inside a country
- 🔗 A link to the same view on Google Trends

### Who it is for

- **SEO and content teams**: find rising and Breakout queries before they get crowded.
- **E-commerce and product research**: check if a product is growing or fading, and where.
- **Market research**: compare brands, products or topics on one scale.
- **Automation**: schedule a weekly run and send results to Google Sheets, Make, n8n or Zapier.

### How to use

1. Paste your keywords, one per line.
2. Pick a country (or leave empty for worldwide) and a timeframe.
3. Turn on **Compare mode** if you want keywords measured against each other.
4. Click **Start**, then export as JSON, CSV or Excel, or read the results through the API.

#### Input example

```json
{
  "keywords": ["air fryer", "standing desk", "protein powder"],
  "geo": "US",
  "timeframe": "past_12_months",
  "compareMode": false
}
```

| Field | What it does |
|---|---|
| `keywords` | One per line. Duplicates and empty lines are skipped. |
| `compareMode` | Groups keywords by 5 (in the order given) on the same 0-100 scale. |
| `geo` | Country code (US, GB, DE, SA, AE...) or region (US-CA). Empty = worldwide. |
| `timeframe` | Past hour to 2004-present. `customTimeframe` accepts `2025-01-01 2025-06-30`. |
| `category` | Optional Google Trends category ID. |
| `includeRelatedQueries`, `includeInterestByRegion` | Switch parts off to make runs faster. |
| `regionResolution` | Sub-regions, cities or US metro areas (when a country is set). |
| `maxConcurrency` | Keywords processed in parallel. Default 3, up to 10. |

### Output example (one row per keyword)

```json
{
  "keyword": "iphone 17",
  "comparedWith": [],
  "geo": "WORLDWIDE",
  "timeframe": "today 12-m",
  "averageInterest": 58.7,
  "latestInterest": 40,
  "peakInterest": 100,
  "peakDate": "Sep 6 – 12, 2026",
  "trendChangePct": -5.5,
  "topRelatedQueries": [{ "query": "iphone 17 pro", "value": 100 }],
  "risingRelatedQueries": [
    { "query": "iphone 17 vs 17e", "value": 6450, "formattedValue": "Breakout", "isBreakout": true },
    { "query": "iphone 17e", "value": 3050, "formattedValue": "+3,050%", "isBreakout": false }
  ],
  "breakoutQueries": ["iphone 17 vs 17e"],
  "interestByRegion": [{ "region": "Qatar", "geoCode": "QA", "value": 100 }],
  "interestOverTime": [{ "date": "Nov 2 – 8, 2025", "timestamp": 1762041600, "value": 60, "isPartial": false }],
  "trendsUrl": "https://trends.google.com/trends/explore?q=iphone+17&date=today+12-m",
  "scrapedAt": "2026-11-04T14:21:52+00:00"
}
```

The **Overview** tab in the Output shows a table with the key numbers. The **Related queries** tab shows the query lists.

### Pricing

**$2.50 per 1,000 keywords** (pay per result). Proxies are included, nothing else to pay for.

- Keywords that fail return an `error` row and are **not charged**.
- Set a **maximum cost per run** in the run options: the Actor stops cleanly when it is reached.

### Reliability

- Every keyword gets its own retries: when Google blocks a request, only that request is retried on a fresh IP.
- One bad keyword never stops the run.
- A time limit (`maxRuntimeSecs`) ends the run cleanly and keeps everything already collected.

### FAQ

**Are the values search volumes?**
No. Google Trends gives relative interest from 0 to 100, where 100 is the peak for the chosen period and place.

**What is the difference with Compare mode?**
Without it, each keyword is scaled on its own, so 100 means "its own peak". With it, up to 5 keywords share one scale, so you can see which one is searched more.

**What does `trendChangePct` mean?**
The average of the last quarter of the period compared with the first quarter. For seasonal keywords (for example "black friday") read it together with the full series.

**Why are some related query lists empty?**
Google shows related queries only when there is enough search volume. An empty list is Google's answer, not an error.

**Are related topics included?**
No. Google does not return related topics to automated clients, so this Actor focuses on related queries.

**Can I run it every week?**
Yes. Use Apify Schedules and connect the dataset to Google Sheets, Make, n8n or Zapier.

### Feedback

Found a problem or need a field? Open an issue on the **Issues** tab. Issues are answered quickly.

# Actor input Schema

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

One keyword per line. Hundreds are fine. Duplicates and empty lines are skipped.

## `compareMode` (type: `boolean`):

Group keywords by 5 (in the order given) and measure them on the same 0-100 scale, like the Compare box on Google Trends. Off = each keyword gets its own scale.

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

Two-letter country code (US, GB, DE, SA, AE, MA...) or a region code like US-CA. Leave empty for worldwide.

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

Period to analyse.

## `customTimeframe` (type: `string`):

Optional. Overrides Timeframe. Format: 'YYYY-MM-DD YYYY-MM-DD', e.g. '2025-01-01 2025-06-30'.

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

Optional Google Trends category ID (0 = all categories). Example: 71 = Food & Drink, 18 = Shopping.

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

Top and rising related queries, with Breakout flags.

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

Where the keyword is most searched.

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

Only used when a country is set. Default: sub-regions (states / provinces).

## `maxRegions` (type: `integer`):

0 = all regions.

## `includeLowVolumeRegions` (type: `boolean`):

Google hides small regions by default because their scores are noisy.

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

Keywords processed at the same time, each on its own IP. Higher is faster; 3 is a safe default.

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

When Google blocks a request, it is retried on a new IP this many times.

## `maxRuntimeSecs` (type: `integer`):

The run stops cleanly after this time and keeps everything collected so far.

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

Residential proxies are strongly recommended: Google blocks datacenter IPs quickly.

## Actor input object example

```json
{
  "keywords": [
    "air fryer",
    "standing desk",
    "protein powder"
  ],
  "compareMode": false,
  "geo": "",
  "timeframe": "past_12_months",
  "category": 0,
  "includeRelatedQueries": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "maxRegions": 50,
  "includeLowVolumeRegions": false,
  "maxConcurrency": 3,
  "maxRetries": 4,
  "maxRuntimeSecs": 3600,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per keyword: average, latest and peak interest, trend change and breakout queries.

## `relatedQueries` (type: `string`):

Top and rising related queries for each keyword.

## `allData` (type: `string`):

Full rows, including interest over time and interest by region.

## `runSummary` (type: `string`):

Keywords succeeded and failed, retries and runtime.

# 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": [
        "air fryer",
        "standing desk",
        "protein powder"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ayoubdev5/google-trends-keyword-research").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": [
        "air fryer",
        "standing desk",
        "protein powder",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ayoubdev5/google-trends-keyword-research").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": [
    "air fryer",
    "standing desk",
    "protein powder"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call ayoubdev5/google-trends-keyword-research --silent --output-dataset

```

## MCP server setup

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

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/ZMoJgGnWL7fObePLG/builds/WsPLaq24ue7RfU09s/openapi.json
