# Google Trends Scraper: Compare Unlimited Keywords (`kvali/google-trends-scraper`) Actor

Scrape Google Trends: interest over time, interest by region, related and rising queries, and trending searches with news. Compare unlimited keywords on one 0-100 scale (not just 5), with summary stats like peak, average and trend direction.

- **URL**: https://apify.com/kvali/google-trends-scraper.md
- **Developed by:** [Kvali Data](https://apify.com/kvali) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 keyword analyses

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

### What does Google Trends Scraper do?

**Google Trends Scraper** extracts data from [Google Trends](https://trends.google.com) for any keyword, location and time range:

- 📈 **Interest over time.** The 0-100 popularity timeline, from the past hour back to 2004.
- 🗺️ **Interest by region.** Where a keyword is most popular, by country, state, city or US metro area.
- 🔎 **Related queries.** Top and rising searches, including *Breakout* queries.
- 🔥 **Trending now.** Today's trending searches in any country, with traffic estimates and the news articles behind them.

Two things it does that other Google Trends scrapers don't:

- ⚖️ **Compare unlimited keywords on one scale.** Google Trends lets you compare only **5 terms** at a time. This Actor chains comparisons through a shared reference keyword, so you can compare **10, 50 or 200 keywords on the same 0-100 scale**. In our tests, cross-batch results matched Google's own direct comparison within about 1-2%.
- 🧮 **Summary statistics for every keyword.** Average, latest value, peak and peak date, low, % change over the period, and a simple trend label (rising, falling or stable), ready for spreadsheets, dashboards and AI agents without any extra math.

It's built to be **reliable**. It uses lightweight HTTP requests (no browser), paces itself, and recovers automatically when Google rate-limits. In testing, 40 keywords ran in one go with zero blocked requests and no proxy.

### Why use Google Trends data?

- **SEO and content strategy.** Find rising topics and seasonal peaks before you publish.
- **Product and market research.** Compare brands, products or categories and see where demand is growing.
- **E-commerce and dropshipping.** Spot trending products early, and see which regions search for them most.
- **Investing and finance.** Track attention on companies, tickers, crypto and commodities over time.
- **Marketing and advertising.** Time campaigns to seasonal demand and target the regions with the most interest.
- **AI agents and dashboards.** Summary stats and clean JSON make it easy to feed trend signals into LLMs, Sheets, Looker Studio or BI tools.

### How to use it

1. Click **Try for free**.
2. Enter your **keywords**, one per line.
3. Choose the **location** (leave it empty for worldwide), the **time range**, and optionally a category or search type (web, news, images, YouTube, Shopping).
4. Turn on **Compare all keywords on one scale** if you want the keywords to be comparable to each other.
5. Optionally add countries under **Trending now**.
6. Click **Start**, then download the results as JSON, CSV or Excel, or use the API.

### How much does it cost?

Simple pay-per-result pricing with **no start fee**:

| Result | Price |
|---|---|
| Keyword analysis (timeline, summary stats, regions and related queries for one keyword) | **$5.00 per 1,000 keywords** |
| Trending search (with traffic estimate and news articles) | **$2.00 per 1,000 trending searches** |

So 100 keywords cost **$0.50**, and today's top 50 trending searches in 3 countries cost **$0.30**. Failed keywords are never charged. The Apify Free plan's monthly credits are enough to try it.

### Input example

```json
{
    "keywords": ["chatgpt", "gemini", "claude", "perplexity", "copilot", "deepseek"],
    "compareKeywords": true,
    "geo": "US",
    "timeRange": "today 12-m",
    "includeInterestByRegion": true,
    "includeRelatedQueries": true,
    "trendingNowGeos": ["US", "GB"]
}
```

| Field | What it does |
|---|---|
| `keywords` | Search terms to analyze. |
| `compareKeywords` | Put all keywords on one 0-100 scale (any number of keywords). |
| `geo` | Location code: `US`, `GB`, `DE`, `IN`, `US-CA`, and so on. Empty = worldwide. |
| `timeRange` | `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 `custom` with `dateFrom`/`dateTo`. |
| `searchType` | Empty (web), `images`, `news`, `froogle` (Shopping) or `youtube`. |
| `category` | Google Trends category ID (0 = all). |
| `includeInterestOverTime`, `includeInterestByRegion`, `includeRelatedQueries`, `includeRelatedTopics` | Choose which data to collect. |
| `regionResolution` | `COUNTRY`, `REGION`, `CITY` or `DMA` (US metro areas). |
| `trendingNowGeos` | Countries to get today's trending searches for. |

### Output

**Keyword item** (lists shortened):

```json
{
    "type": "keyword",
    "keyword": "electric cars",
    "geo": "US",
    "timeRange": "today 12-m",
    "category": 0,
    "searchType": "web",
    "compared": false,
    "summary": {
        "average": 53.79,
        "latest": 46,
        "latestDate": "2026-09-13T00:00:00.000Z",
        "peak": 100,
        "peakDate": "2026-04-05T00:00:00.000Z",
        "low": 28,
        "lowDate": "2025-10-12T00:00:00.000Z",
        "changePercent": 69.89,
        "trend": "rising"
    },
    "interestOverTime": [
        {
            "date": "2025-09-21T00:00:00.000Z",
            "formattedTime": "Sep 21 – 27, 2025",
            "value": 37,
            "isPartial": false
        },
        {
            "date": "2025-09-28T00:00:00.000Z",
            "formattedTime": "Sep 28 – Oct 4, 2025",
            "value": 33,
            "isPartial": false
        },
        "..."
    ],
    "interestByRegion": [
        {
            "geoCode": "US-WY",
            "geoName": "Wyoming",
            "value": 100
        },
        {
            "geoCode": "US-VT",
            "geoName": "Vermont",
            "value": 62
        },
        {
            "geoCode": "US-KS",
            "geoName": "Kansas",
            "value": 41
        },
        "..."
    ],
    "relatedQueries": {
        "top": [
            {
                "query": "electric car",
                "value": 100,
                "formattedValue": "100",
                "isBreakout": false,
                "mentionsKeyword": true
            },
            {
                "query": "best electric cars",
                "value": 73,
                "formattedValue": "73",
                "isBreakout": false,
                "mentionsKeyword": true
            },
            "..."
        ],
        "rising": [
            {
                "query": "healthy recipes",
                "value": 25500,
                "formattedValue": "Breakout",
                "isBreakout": true,
                "mentionsKeyword": false
            },
            "..."
        ]
    },
    "scrapedAt": "2026-09-23T13:37:17.887Z"
}
```

`mentionsKeyword` flags related queries that contain a word from your keyword. Google's *rising* lists sometimes include unrelated searches, so this flag lets you filter out the noise while still keeping Google's raw data.

With **Compare all keywords on one scale** turned on, every keyword item also includes `compared: true`, `comparedWith`, `anchorKeyword` (the reference keyword used for chaining), and `lowPrecision` (true if a keyword is so much smaller than the anchor that its values are approximate).

**Trending search item:**

```json
{
    "type": "trending",
    "geo": "US",
    "rank": 1,
    "title": "hilary duff",
    "approxTraffic": "500+",
    "approxTrafficNumber": 500,
    "startedAt": "2026-09-23T13:20:00.000Z",
    "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQbfBKJ8qXXV5NtPaMwboiNCAnKv5IN8tV2IgLcm4vSmjTQwRbVFV9KScS37bw",
    "imageSource": "WIVB News 4",
    "news": [
        {
            "title": "Hilary Duff to play KeyBank Center in fall 2027",
            "url": "https://www.wivb.com/community/things-to-do-buffalo-ny/hilary-duff-to-play-keybank-center-in-fall-2027/",
            "source": "WIVB News 4",
            "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQbfBKJ8qXXV5NtPaMwboiNCAnKv5IN8tV2IgLcm4vSmjTQwRbVFV9KScS37bw",
            "snippet": ""
        },
        "..."
    ],
    "scrapedAt": "2026-09-23T13:37:18.642Z"
}
```

The dataset has two views, **Keywords** (a summary table) and **Trending now**. Export to JSON, CSV, Excel, XML or HTML, or use the [Apify API](https://docs.apify.com/api/v2).

### Tips

- **Monitoring:** save your input as a Task and add a Schedule (for example, daily trending searches or weekly keyword checks). Then send the results to Google Sheets, Slack or a webhook with Apify integrations.
- **Large jobs:** hundreds of keywords work fine. For very large or frequent runs, turn on **Apify Proxy** in *Advanced* to keep them fast.
- **Values are relative:** Google Trends reports relative interest (0-100), not absolute search volume. 100 means peak popularity for the chosen terms, location and time.

### FAQ

**Why do some keywords show 0 or very low values?**
The keyword has little search volume compared with the peak in that period, or Google doesn't have enough data for it in that location. Try a larger location or a longer time range.

**Why are related topics empty?**
Google currently returns related topics only for some searches. That's why the option is off by default. Related queries work normally.

**Is scraping Google Trends legal?**
This Actor collects publicly available, aggregated and anonymized statistics, and no personal data. Make sure your use complies with the laws that apply to you. See [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

**Need a feature, or found a bug?**
Open an issue in the **Issues** tab. We answer quickly.

# Actor input Schema

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

Search terms to analyze, one per line.

## `compareKeywords` (type: `boolean`):

Put all keywords on the same 0-100 scale so their popularity is directly comparable, like Google Trends' compare view. Google allows only 5 terms per comparison; this Actor chains comparisons through a shared reference keyword, so you can compare 10, 50 or more. Off: each keyword is scaled on its own (its own peak = 100).

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

Country or region code. Leave empty for worldwide. Examples: US, GB, DE, IN, US-CA (California), GB-ENG (England).

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

Period to analyze. Shorter ranges give finer data (minutes or hours); longer ranges give weekly or monthly data.

## `dateFrom` (type: `string`):

Start date when Time range is "Custom dates" (2004-01-01 or later).

## `dateTo` (type: `string`):

End date when Time range is "Custom dates". Empty = today.

## `searchType` (type: `string`):

Which Google search property to measure.

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

Google Trends category to narrow the results (0 = all categories). Examples: 7 = Finance, 5 = Computers & Electronics, 71 = Food & Drink, 45 = Health.

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

Timeline of search interest (0-100), plus summary stats: average, peak, latest value, % change and trend direction.

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

Where the keyword is most popular (countries, states or cities, depending on the location).

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

Level of detail for interest by region.

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

Top and rising related searches, including Breakout queries (+5000% growth).

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

Top and rising related topics. Note: Google currently returns this only for some searches.

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

Also get today's trending searches (with traffic estimates and related news articles) for these country codes, e.g. US, GB, IN. Works without any keywords.

## `maxTrendingPerGeo` (type: `integer`):

How many trending searches to return per country.

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

Google rate-limits heavy use. The Actor retries automatically; for large jobs (hundreds of keywords), Apify Proxy keeps runs fast and reliable.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "gemini",
    "claude"
  ],
  "compareKeywords": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "searchType": "",
  "category": 0,
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "AUTO",
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "maxTrendingPerGeo": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per keyword (interest over time, summary stats, interest by region, related queries) and one item per trending search.

# 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"
    ],
    "geo": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kvali/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 = {
    "keywords": [
        "chatgpt",
        "gemini",
        "claude",
    ],
    "geo": "US",
}

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

```

## MCP server setup

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