# Google Trends Comparison: Fast, up to 5 Keywords (`clover_engineer/google-trends-compare`) Actor

Compare up to 5 keywords on one Google Trends scale in about 2 s. Interest over time as clean JSON, $0.02 per search, and you only pay for results.

- **URL**: https://apify.com/clover\_engineer/google-trends-compare.md
- **Developed by:** [Clover](https://apify.com/clover_engineer) (community)
- **Categories:** SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Comparison: compare up to 5 keywords in about 2 seconds

Get Google Trends **interest over time** for 1 to 5 keywords on **one shared 0–100 scale**, the same numbers you see in the Trends "Compare" view. Results arrive as clean JSON in about 2 seconds. It runs without a browser, so there's no waiting on page loads.

**$0.02 per search** ($0.014–0.018 on Apify's paid plans), whether you compare 1 keyword or 5. You aren't charged for failed searches.

### What it's for

- **Brand and competitor tracking:** `["nike", "adidas", "puma"]` in the US over 12 months ([example](https://apify.com/clover_engineer/google-trends-compare/examples/brand-vs-competitors))
- **Content and SEO planning:** check which topic is growing, or [which keyword wording people search](https://apify.com/clover_engineer/google-trends-compare/examples/seo-keyword-variants), before you write
- **Market research:** product demand by country (`geo: "IT"`, `"JP"`, …) ([example](https://apify.com/clover_engineer/google-trends-compare/examples/smartphone-brands-italy)) or [on Google Shopping](https://apify.com/clover_engineer/google-trends-compare/examples/google-shopping-product-demand)
- **AI agents and automations:** one call returns a structured answer to "is X more searched than Y?", with no scraping logic needed

### Example tasks

Ready-made searches you can run in one click and then edit ([all examples](https://apify.com/clover_engineer/google-trends-compare/examples)):

**Brands, products and markets**

- [Track brand search interest vs competitors](https://apify.com/clover_engineer/google-trends-compare/examples/brand-vs-competitors)
- [Compare brand demand in one country: phones in Italy](https://apify.com/clover_engineer/google-trends-compare/examples/smartphone-brands-italy)
- [Compare AI chatbot popularity on Google Trends](https://apify.com/clover_engineer/google-trends-compare/examples/compare-ai-chatbots)

**SEO, content and video**

- [Choose between SEO keyword variants with Google Trends](https://apify.com/clover_engineer/google-trends-compare/examples/seo-keyword-variants)
- [Compare YouTube search trends for any topic](https://apify.com/clover_engineer/google-trends-compare/examples/youtube-search-trends)
- [Compare programming language popularity](https://apify.com/clover_engineer/google-trends-compare/examples/programming-languages-popularity)

**E-commerce and demand planning**

- [Compare product demand on Google Shopping](https://apify.com/clover_engineer/google-trends-compare/examples/google-shopping-product-demand)
- [Spot seasonal demand with 5 years of Google Trends](https://apify.com/clover_engineer/google-trends-compare/examples/seasonal-demand)

**Events, news and fast-moving topics**

- [Measure an event's search impact over custom dates](https://apify.com/clover_engineer/google-trends-compare/examples/event-impact-custom-dates)
- [Track crypto search interest over the past 7 days](https://apify.com/clover_engineer/google-trends-compare/examples/crypto-interest-7-days)

### Why this actor

On 2026-09-24 we ran the same 8 queries through this actor and the 3 most-used Google Trends actors on Apify, with a 300 s timeout and the same scoring for all:

| Actor | Useful results | Median run time | Real 3-keyword comparison |
|---|---|---|---|
| **This actor** | **8/8** | **1.7 s** | ✅ |
| Official Google Trends Scraper | 4/8 (4 timeouts) | 279 s | ✅ |
| 2 other popular Trends actors | 7/8 each | 5–7 s | ❌ (no data returned) |

This was a single-day test of 8 queries per actor. Results may vary at other times.

For every fixed date range, the values match the other actors within Google's normal sampling noise. Tested queries covered worldwide and single countries, past hour to all-time ranges, a non-Latin keyword (ラーメン), a low-volume keyword, and a 3-keyword comparison.

### Input

```json
{
  "keywords": ["chatgpt", "gemini", "claude"],
  "geo": "US",
  "timeRange": "today 12-m"
}
```

| Field | Description |
|---|---|
| `keywords` | 1–5 terms compared on one scale. **One search.** |
| `searchTerms` | Alternative: several independent searches, one result row each. `"tea, coffee"` inside one entry compares those two. Each entry is one search. |
| `geo` | ISO country code (`US`, `IT`, `JP`…). Empty = worldwide. |
| `timeRange` | `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`, `all`, or a custom range `"2024-01-01 2024-06-30"`. Lower-case `now 1-h` also works. |
| `category` | Google Trends category id, `0` = all. |
| `property` | `""` web (default), `news`, `images`, `youtube`, `froogle` (Shopping). |
| `language` | Label language, default `en-US`. |
| `maxRetries` | Retries when Google rate-limits a request, with backoff and a fresh session (default 3). |
| `proxyConfiguration` | Optional. Off by default; enable it only if your runs get rate-limited. |

An invalid input stops the run immediately with a clear message, for example `Invalid timeRange "last week". Use one of: …`. It won't time out or return an empty dataset instead.

### Output

One dataset row per search:

```json
{
  "searchTerm": "chatgpt, gemini, claude",
  "keywords": ["chatgpt", "gemini", "claude"],
  "geo": "US",
  "timeRange": "today 12-m",
  "interestOverTime_timelineData": [
    {
      "time": "1758412800",
      "formattedTime": "Sep 21 – 27, 2025",
      "formattedAxisTime": "Sep 21, 2025",
      "value": [94, 25, 5],
      "hasData": [true, true, true],
      "isPartial": false
    }
  ],
  "interestOverTime_averages": [76, 27, 18],
  "pointCount": 53,
  "fetchedMs": 358
}
```

`value` holds one number per keyword, in the order you gave them. The field names match the official Google Trends Scraper's `interestOverTime_*` fields, so switching needs little or no change on your side.

### Pricing

| Apify plan | Per successful search (1–5 keywords) |
|---|---|
| Free | **$0.02** |
| Bronze | $0.018 |
| Silver | $0.016 |
| Gold and above | $0.014 |

- **Failed searches are free.** The actor start is billed at Apify's standard platform fee.
- **Example:** comparing 5 brands every day for a month is 30 searches: $0.60 on the Free plan, $0.42 on Gold.
- **Spending limits:** if you set a maximum cost per run, the actor stops before starting a search it can't charge for, and tells you how many searches it finished.

### Use it from code, n8n or an AI agent

**API (JavaScript):**

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('clover_engineer/google-trends-compare').call({
  keywords: ['chatgpt', 'gemini', 'claude'], geo: 'US', timeRange: 'today 12-m',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**Python:**

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("clover_engineer/google-trends-compare").call(
    run_input={"keywords": ["chatgpt", "gemini", "claude"], "geo": "US"})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

**n8n / Make / Zapier:** use the Apify integration and choose "Run Actor and get dataset items" with the input above.

**AI agents (MCP):** add this actor to the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Each input field is described so an agent can fill it in from a question like *"Compare interest in ChatGPT, Gemini and Claude in the US over the past year."*

### Limits

- **Interest over time only.** Regional breakdown, related queries and trending searches aren't included yet.
- **Values are relative, as in Google Trends itself.** 100 = the peak within your comparison. Low-volume keywords and short time ranges vary slightly between requests because of Google's sampling.
- **Past-hour and past-day ranges are rolling windows,** so two runs a few minutes apart cover slightly different periods.
- **This actor isn't affiliated with Google.** It reads publicly available Google Trends data.

### How it works

1. It opens a session with Google Trends, the same way the Trends website does.
2. It asks Trends for the comparison you requested: your keywords, country, time range, category and Google property.
3. It downloads the interest-over-time series as JSON. No browser is involved, which is why a search takes about 2 seconds.
4. If Google rate-limits the request, it waits, starts a fresh session and tries again (up to `maxRetries` times).
5. It saves one dataset row per search and charges one `search` event, only after the data is saved.

### FAQ

**Is this a Google Trends API?**
Google has no official public Google Trends API. This actor gives you the same interest-over-time data as the Trends website, as structured JSON you can call from code, n8n, Make, Zapier or an AI agent.

**How do I compare more than 5 keywords?**
Google Trends compares at most 5 terms on one scale. To compare more, put one keyword (for example your main brand) in every search as a shared reference, then rescale the other keywords' values against it.

**Why don't my numbers match another run exactly?**
Google Trends samples its data, so low-volume keywords and short time ranges can differ by a few points between requests. Past-hour and past-day ranges also move with the clock.

**Does it work with pytrends inputs?**
Yes. `timeRange` accepts the same strings as pytrends' `timeframe` (`today 12-m`, `now 7-d`, `2024-01-01 2024-06-30`…), and `geo` uses the same country codes.

**Do I need a proxy?**
Usually not. Enable `proxyConfiguration` only if your runs report repeated rate limits (HTTP 429).

**What happens if a search fails?**
The run stops with a clear error message and you aren't charged for that search.

# Actor input Schema

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

1 to 5 search terms compared on ONE shared 0-100 scale (a real Google Trends comparison). Each timeline point's `value` holds one number per keyword, in this order.

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

Several separate searches, one dataset row each. Use a comma inside an entry to compare terms, e.g. "tea, coffee". Ignored when `keywords` is set.

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

ISO 3166-1 alpha-2 country code, e.g. US, IT, JP. Leave empty for worldwide.

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

One of: now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all. Or a custom range "YYYY-MM-DD YYYY-MM-DD". Empty = past 12 months.

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

Google Trends category id. 0 = all categories.

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

Which Google search to measure.

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

Interface language for labels such as formattedTime, e.g. en-US.

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

Retries per search when Google rate-limits or errors (with backoff and a fresh session).

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

Optional. Off by default; enable if Google rate-limits your runs.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "gemini",
    "claude"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "language": "en-US",
  "maxRetries": 3
}
```

# Actor output Schema

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

All results as JSON: one item per search, with the full interest-over-time timeline (`interestOverTime_timelineData`, one number per keyword in each point's `value`).

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

One row per search with each keyword's average interest over the range.

## `timeline` (type: `string`):

One row per time period across all searches, flattened for spreadsheets.

# 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": [
        "chatgpt",
        "gemini",
        "claude"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clover_engineer/google-trends-compare").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": [
        "chatgpt",
        "gemini",
        "claude",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("clover_engineer/google-trends-compare").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": [
    "chatgpt",
    "gemini",
    "claude"
  ]
}' |
apify call clover_engineer/google-trends-compare --silent --output-dataset

```

## MCP server setup

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

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/q8AOdnAugVMhzQeeU/builds/Aa2JgEkvYjmUfYQ5g/openapi.json
