# Google Trends Compare: which keyword is more popular (`steadydata/google-trends-compare`) Actor

Compare up to 5 keywords in Google Trends on one scale and see which keyword is more popular: relative interest over time, the average per term, the leader and its share, and optionally which term wins per country or region. Up to 200 comparisons per run. Pay per comparison.

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

## Pricing

$5.00 / 1,000 comparison fetcheds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Trends Compare Scraper (up to 5 keywords)

Google Trends' Compare view as data: **2 to 5 keywords on one scale**, relative interest
over time for all of them, Google's average per term, the leader and its share, and
optionally which term wins in each country or region. **Up to 200 comparisons per run**,
one row per comparison. You only pay for comparisons that come back with data.

### Why this scraper

- **The comparison, not five separate curves.** Trends scales a comparison so that 100
  is the strongest term's peak and every other number is relative to it. Fetching terms
  one by one loses exactly that; this actor keeps it, the way the Compare page does.
- **Averages and a leader per row.** Google's own average per term is delivered with a
  computed leader and its share of the total, so a keyword list can be ranked without
  opening a single chart.
- **Who wins where.** Switch on `includeRegions` and each comparison also carries the
  share of every term per country (worldwide) or per region (inside a country), with the
  winning term named. In testing on 13-09-2026 a worldwide comparison came back with 64
  to 69 countries that had enough volume to score.
- **Lightweight route.** Two requests per comparison, about 10 KB for a 12-month weekly
  series of three terms.
- **Only delivered comparisons are charged.** A row with too little search volume comes
  back as a clear error record at no cost.

### Who this is for

Brand and category managers comparing themselves with competitors. Market researchers
sizing which option people search for most, per market. Content and SEO teams choosing
between candidate topics. Anyone who wants Compare results for a list, not one at a time.

### Who this is not for

Values are Google's relative 0 to 100 index within one comparison. They are not search
volumes, and a number from one comparison cannot be compared with a number from another.
For a single keyword's curve and related queries, use the Google Trends Batch Scraper from
the same publisher; for what is trending right now, the Trending Now Scraper; for one
keyword's regional map, the Interest by Region Scraper.

### Input example

```json
{
    "comparisons": ["bitcoin, ethereum, solana", "iphone, samsung galaxy, pixel"],
    "geo": "",
    "timeframe": "today 12-m",
    "includeRegions": false,
    "language": "en-US"
}
```

Separate keywords with commas (or `|`). Duplicates are dropped; 2 to 5 terms per row.

### Output example

```json
{
    "terms": ["bitcoin", "ethereum", "solana"],
    "geo": "worldwide",
    "timeframe": "today 12-m",
    "averages": [
        {"term": "bitcoin", "average": 43},
        {"term": "ethereum", "average": 7},
        {"term": "solana", "average": 6}
    ],
    "leader": "bitcoin",
    "leaderShare": 0.768,
    "pointCount": 54,
    "series": [
        {"time": "Sep 7 – 13, 2025", "timestamp": 1757203200, "values": [42, 12, 11], "isPartial": false},
        {"time": "Sep 14 – 20, 2025", "timestamp": 1757808000, "values": [44, 12, 10], "isPartial": false}
    ],
    "regions": null,
    "status": "ok"
}
```

With `includeRegions` on, `regions` holds one entry per country or region:

```json
{"regionCode": "KR", "regionName": "South Korea", "shares": [{"term": "bitcoin", "share": 30}, {"term": "ethereum", "share": 20}, {"term": "solana", "share": 50}], "leader": "solana"}
```

A comparison that returns nothing produces an error record instead, and is **not** charged:

```json
{
    "input": "qzxwv nonsense, zzzz zzzz",
    "status": "error",
    "errorCode": "NO_DATA",
    "error": "Empty time series for ['qzxwv nonsense', 'zzzz zzzz']: too little search volume"
}
```

Error codes: `BAD_QUERY`, `NO_DATA`, `BLOCKED`. `INPUT_TRUNCATED` appears once when your input is longer than this actor accepts.

### Related actors from steadydata

- [google-trends-batch](https://apify.com/steadydata/google-trends-batch): one keyword at a time, with related queries
- [google-trends-regions](https://apify.com/steadydata/google-trends-regions): the regional split per keyword

### Pricing

Pay per event: one `comparison-fetched` event per comparison delivered with data, whatever
the number of terms and points inside it. No charge for rows that fail, no separate
platform-usage surcharge.

### FAQ

**What do the numbers mean?**
Google's relative index for the whole comparison: 100 is the highest point of the
strongest term in the period; everything else is scaled to it. `averages` are Google's
averages per term on that same scale; `leaderShare` is the leader's average divided by
the sum of all averages.

**How many points will I get?**
Google picks the resolution for the timeframe: hourly for a day, daily for a month,
weekly for 12 months, monthly for 5 years and longer.

**Can I compare more than 5 terms?**
No; that is Google's limit. Split into several rows that share one anchor term.

**Is personal data collected?**
No. Google Trends publishes aggregate, anonymised search interest.

**What happens when Google changes something?**
Internal routes shift from time to time. The actor is monitored daily and fixed fast, and
while it is broken you are not charged, because only delivered comparisons cost anything.

# Actor input Schema

## `comparisons` (type: `array`):

One comparison per row: 2 to 5 keywords separated by commas, e.g. 'bitcoin, ethereum, solana'. Each row is one input and one charged event; a row without data comes back as a free error record.

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

Leave empty for worldwide, or a two-letter country code (US, GB, NL, DE ...).

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

The period the interest is measured over.

## `includeRegions` (type: `boolean`):

Also fetch the breakdown by country (worldwide) or region (within a country) with the share of each term, so you see which term wins where. One extra request per comparison.

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

Interface language (hl), e.g. en-US, nl, de.

## Actor input object example

```json
{
  "comparisons": [
    "bitcoin, ethereum, solana",
    "iphone, samsung galaxy, pixel"
  ],
  "geo": "",
  "timeframe": "today 12-m",
  "includeRegions": false,
  "language": "en-US"
}
```

# Actor output Schema

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

No description

# 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 = {
    "comparisons": [
        "bitcoin, ethereum, solana",
        "iphone, samsung galaxy, pixel"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/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 = { "comparisons": [
        "bitcoin, ethereum, solana",
        "iphone, samsung galaxy, pixel",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/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 '{
  "comparisons": [
    "bitcoin, ethereum, solana",
    "iphone, samsung galaxy, pixel"
  ]
}' |
apify call steadydata/google-trends-compare --silent --output-dataset

```

## MCP server setup

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