# Google Trends Scraper & API: Unlimited Keywords, Regions (`varnmill/google-trends-api`) Actor

Google Trends interest over time for any number of keywords or Knowledge Graph topics on one 0-100 scale, interest by region, related and rising queries, a rising-queries watcher for schedules, and live trending searches. Retries with session rotation handle Google's rate limits; no login.

- **URL**: https://apify.com/varnmill/google-trends-api.md
- **Developed by:** [Jay Novello](https://apify.com/varnmill) (community)
- **Categories:** SEO tools, AI
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 keywords

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 Scraper & API: Unlimited Keywords, Regions

Google Trends interest over time, interest by region, top and rising related queries and live trending searches for any number of keywords or Knowledge Graph topics, as JSON, CSV or Excel, with no login or API key.

**Try it:** Click Start with the default input: 3 keyword rows in 15 s for about $0.005 (run on October 21, 2026). Each row carries 53 weekly data points, the top 25 related queries and up to 25 rising queries.

Default input: `chatgpt`, `claude`, `gemini`, United States, past 12 months. Real rows from that run:

| Keyword | Avg interest | Peak (week of) | Latest | 12-month change | Top rising query |
|---|---|---|---|---|---|
| chatgpt | 76.1 | 100 (Oct 19, 2025) | 83 | −8.4% | codex (+1,250%) |
| claude | 19.3 | 33 (May 24, 2026) | 25 | +205.8% | claude cowork (Breakout) |
| gemini | 28.0 | 35 (Apr 12, 2026) | 35 | +35.6% | antigravity (Breakout) |

All three share one 0-100 scale, so the numbers are directly comparable. Add more than 5 keywords and they are stitched onto the same scale (Google's own site stops at 5); turn on **Interest by region** for state or city rows; switch to the **rising queries watcher** on a schedule to get only what is new.

**Pricing:** $1.50 per 1,000 keyword reports (primary event; in watcher mode one report per new rising query) and $0.50 per 1,000 trending searches. Platform usage included; topic lookups are free; failed runs are not charged.

### More real examples (runs of October 12 and 13, 2026)

**Topics vs exact phrases.** One run, United States, past 12 months. `topic:` resolves a word to a Google Knowledge Graph topic, and `|type` picks the meaning:

| Input | Measured as | Avg interest | Peak | Latest | 12-month change | Top rising query |
|---|---|---|---|---|---|---|
| `topic:apple\|technology` | Apple, Technology company (`/m/0k8z`) | 76.6 | 100 | 68 | +0.8% | apple event 2026 |
| `topic:apple\|fruit` | Apple, Fruit (`/m/014j1m`) | 16.7 | 33 | 30 | -1.1% | mcdonald's fried apple pie return |
| `/m/05z1_` | Python, Programming language | 12.2 | 21 | 6 | -30.1% | walmart near me |
| `python` | the search phrase "python" | 12.2 | 20 | 6 | -24.6% | python programming tutorial |

A topic counts every search about the thing in any wording or language, so `topic:apple|fruit` stays separate from the iPhone maker. (Yes, Google lists "walmart near me" as rising for the Python topic. See the noise filter example below.)

**Noise filter for rising queries (run of October 13, 2026).** `python`, United States, past 12 months. Google returned 25 rising queries; 20 of them were generic searches such as `best restaurants near me`, `how to cook pasta` and `weather forecast today`. With **Drop unrelated rising queries** on, the row kept only the 5 that are about Python: `python programming tutorial`, `python web framework`, `python homework`, `python data analysis` and `python weather`, plus `unrelatedRisingDropped: 20`. For `/m/05z1_` (the Python topic) it kept 6 and dropped 19, including `walmart near me`.

**Rising queries watcher.** Scheduled on `claude code` and `topic:chatgpt` (US, past 7 days). The first run returned the 9 queries rising at the time, marked `isBaseline: true`, for example `reverse engineer anything github` (+4,750%), `haiku 5.5` (+1,000%) and `best claude code mods` (+110%). The next run returned **only 1 row**, the one query that had not been reported before; the other 9 were remembered and skipped.

**More than 5 keywords on one scale.** Seven AI assistants, United States, past 12 months. Google's website can only compare five of these at once; this Actor stitched all seven onto one scale.

| Keyword | Avg interest | Peak | Latest | 12-month change | Top rising query |
|---|---|---|---|---|---|
| chatgpt | 74.7 | 100 | 68 | -12% | chatgpt caricature |
| gemini | 27.1 | 34 | 28 | +32% | gemini 3.5 pro |
| claude | 18.6 | 33 | 20 | +216% | claude cowork |
| copilot | 6.2 | 8 | 4 | -6% | copilot cli |
| grok | 4.9 | 10 | 4 | -4% | grok 4.6 |
| perplexity | 2.6 | 5 | 1 | -65% | perplexity personal computer |
| deepseek | 2.0 | 3 | 2 | -16% | deepseek v4 flash |

Each keyword also came back with 53 weekly data points, all 51 US states, and 25 top plus 25 rising related queries.

### Three modes

| Mode | What it returns | Charged as |
|---|---|---|
| **Keyword or topic trends** (`keywords`) | One row per keyword or topic: series, summary, optional regions and related queries | Keyword report |
| **Rising queries watcher** (`risingWatcher`) | One row per rising query **not reported by an earlier run** | Keyword report, per new rising query |
| **Trending now** (`trendingNow`) | Google's live trending searches per country with traffic and news | Trending search |

### Explore by topic

Enter topics in the same **Keywords or topics** list as normal keywords, mixed freely:

- `/m/0k8z` or `/g/11g0jcybmg`: a Knowledge Graph topic ID, used as is (the code after `q=` in a Google Trends explore URL for a topic).
- `topic:python`: the Actor asks Google Trends' autocomplete for topics matching "python" and uses the top one.
- `topic:apple|fruit`: picks the suggestion whose type (or title) contains "fruit". If Google's suggestions have no such meaning, the top suggestion is used and the row carries a `warning`; enter the topic ID to choose exactly.

Topic rows carry `isTopic`, `topicId`, `topicTitle`, `topicType`, and for `topic:` lines `topicCandidates` (the other meanings Google suggested, with their IDs).

### Rising queries watcher

Built for schedules: run it daily or weekly on your niche keywords and get only the searches that just started rising, not the same list every time.

- State lives in a **named key-value store** in your Apify account (default `google-trends-rising-watcher`), one record per keyword + region (and search type and category). It survives between runs, schedules and tasks. Use a different **State store name** to keep separate watch lists apart.
- **First run**: by default every currently rising query is output once with `isBaseline: true`. Turn off *Output current rising queries on the first run* to remember them silently and only hear about new ones from the second run.
- **Forget after (days)**: a query that has not been rising for 30 days (default) counts as new again if it comes back. 0 never forgets.
- **Drop unrelated rising queries**: skips rising queries that share no word with the keyword or topic title. Skipped queries are not charged and not remembered, so they still show up if you turn the filter off later.
- Each row: `keyword`, `geo`, `risingQuery`, `growth` (for example `+350%` or `Breakout`), `growthValue`, `isBreakout`, `matchesKeyword`, `isBaseline`, `firstSeenAt`, `trendsUrl`. The **New rising queries** dataset view and the `newRisingCsv` output link are ready for Sheets, Slack or email integrations.
- A run with nothing new finishes successfully with an empty dataset and costs only the start fee.

### What you get per keyword

| Field | Meaning |
|---|---|
| `averageInterest`, `peakInterest`, `peakDate`, `latestInterest` | Summary of the series |
| `changePercent` | Last quarter of the window vs the first quarter, a quick trend signal |
| `timeline[]` | `{ date, value, isPartial }` for every point Google returns |
| `interestByRegion[]` | `{ geoCode, geoName, value }` sorted high to low |
| `relatedQueriesTop[]`, `relatedQueriesRising[]` | Related searches; rising ones carry growth such as `+350%` or `Breakout` and `matchesKeyword` (shares a word with your keyword or topic title) |
| `unrelatedRisingDropped` | How many rising queries the noise filter removed (only when it is on) |
| `relatedTopicsTop[]`, `relatedTopicsRising[]` | Related Knowledge Graph topics with type, when Google returns them (see limits) |
| `sharedScale`, `anchorKeyword` | Present when more than 5 keywords were stitched together |
| `keyword`, `searchTerm`, `isTopic`, `topicId`, `topicTitle`, `topicType` | Your input line and what was measured |

**Trending now** mode returns `rank`, `query`, `approxTraffic` (for example `20,000+`), `startedAt`, a picture and the related news articles for any country.

Five dataset views are built in: **Keyword summary**, **Timeline** (one row per keyword per date, ready for charts), **Rising queries**, **New rising queries (watcher)** and **Trending now**.

### How more than 5 keywords stay comparable

Google scales every comparison so its own top term is 100, which makes separate comparisons incompatible. This Actor puts one **anchor keyword** in every batch, rescales each batch by the anchor's level, and renormalises so the single highest point across all keywords is 100. Pick a steadily popular anchor (the first keyword by default; a topic line works too). If the anchor has zero interest in some batch, those keywords are flagged rather than silently mis-scaled.

### Options

- **Time range**: past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, since 2004, or custom dates.
- **Search type**: web, news, images, YouTube or Google Shopping.
- **Country or sub-region** (`US`, `GB`, `US-CA`) and **category** filters.
- **Region level**: country, state, US metro (DMA) or city.

### Pricing

Pay per result, platform usage included:

| Event | Price |
|---|---|
| Keyword report (series + summary, plus regions and related data when enabled), or one new rising query in watcher mode | $1.50 per 1,000 ($0.0015 each) |
| Trending search | $0.50 per 1,000 |

Topic lookups are free. You are charged only for rows actually delivered; a watcher run with nothing new costs only the start fee. If Google blocks a run completely it fails cleanly and nothing is charged.

### Reliability

Google rate-limits Trends aggressively. Every request is retried with exponential back-off and a fresh proxy session and cookie, up to seven times. Datacenter proxy (the default) handles normal jobs; for hundreds of keywords at once, switch the proxy to Residential. If you schedule several runs, stagger their start times by a few minutes: runs that start at the same moment on the datacenter proxy can rate-limit each other.

### Use it with schedules and AI agents

- Schedule a weekly run on your product or brand keywords and push the summary view to Google Sheets or Slack.
- Schedule the **rising queries watcher** every morning on your niche keywords and send the new rows to Slack or email: content ideas before they peak, with no repeats.
- The compact JSON output works well as an AI-agent tool through the Apify MCP server.

### FAQ

**Are values search volumes?** No. Google Trends reports relative interest from 0 to 100, not absolute searches. Use it for comparisons and timing.

**Why do values differ slightly from the website?** Google samples its data; repeated queries can differ by a point or two.

**Why are related topics empty?** As of October 2026 Google Trends returns an empty related-topics list to API clients for every keyword we tested, so `relatedTopicsTop` and `relatedTopicsRising` are usually empty. Related queries are unaffected.

**Why do rising queries include unrelated searches?** Google's rising lists often contain generic queries (for example "walmart near me" under the Python topic), probably from automated traffic. By default the Actor returns exactly what Google shows and marks each rising query with `matchesKeyword`. Turn on **Drop unrelated rising queries** to remove the ones that share no word with your keyword or topic title. The check is word-based: it handles plurals, "airfryer" for "air fryer" and Chinese, Japanese or Korean keywords, but it also drops genuinely related queries that use other words (for example `sabrina carpenter` under `taylor swift`, or `haiku 5.5` under `claude code`). That is why it is off by default.

**Why did the watcher report a query that looks old?** Google samples its data, so a query near the bottom of the rising list can appear in one run and not the previous one. Each query is still reported only once until it has been absent for *Forget after* days.

**Can I find a topic ID?** Run `topic:yourword` once and look at `topicCandidates`, or open the topic in Google Trends and copy the `/m/...` code from the URL.

**Something wrong?** Open an issue on this page. Problems are usually answered the same day.

### Changelog

- **0.2.4 (October 13, 2026)**: optional noise filter for rising queries (**Drop unrelated rising queries**), and a `matchesKeyword` flag on every rising query in both modes. In watcher mode, dropped queries are not charged. Prices unchanged.

- **0.2 (October 12, 2026)**: explore by Knowledge Graph topic (topic IDs or `topic:` lines resolved through Trends autocomplete, with `|type` to pick a meaning); new rising queries watcher mode that outputs only queries not seen in earlier runs, with state in a named key-value store per keyword and region. Existing modes and prices unchanged.

- **0.1 (October 2026)**: first release. Unlimited keywords on one scale, regions, related queries and topics, trending now.

# Actor input Schema

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

keywords: interest over time (plus optional regions and related queries) for your keywords or topics. risingWatcher: only the rising related queries that earlier runs have not reported yet, for schedules. trendingNow: Google's live trending searches with traffic and news.

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

Any number of search terms. More than 5 are automatically put on one shared 0-100 scale using an anchor keyword, so they stay comparable. To measure a Knowledge Graph topic instead of an exact phrase, enter its ID (/m/05z1\_) or prefix the word with 'topic:' (topic:python). Add '|type' to pick a meaning, e.g. topic:jaguar|animal.

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

Two-letter country code (US, GB, DE) or a sub-region code (US-CA, US-NY). Leave empty for worldwide.

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

Same ranges as the Google Trends website.

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

YYYY-MM-DD

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

YYYY-MM-DD

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

Which Google property to measure: web search, news, images, YouTube or Shopping.

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

Google Trends category number, 0 for all categories (e.g. 3 = Arts & Entertainment, 7 = Finance, 18 = Shopping).

## `includeRelated` (type: `boolean`):

Top and rising related searches and topics for each keyword.

## `dropUnrelatedRising` (type: `boolean`):

Google's rising lists often include generic searches unrelated to your keyword (for example 'best restaurants near me' under python). Turn on to keep only rising queries that share a word with the keyword or topic title. Applies to related queries in keyword mode and to the rising queries watcher, where dropped queries are not charged. Off by default because it also drops related queries that use other words (such as 'sabrina carpenter' under taylor swift); every rising query carries matchesKeyword either way.

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

Interest per country, or per state when a country is selected.

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

Leave empty for the natural level of the selected geo.

## `anchorKeyword` (type: `string`):

Used to stitch more than 5 keywords onto one scale. Defaults to the first keyword; pick a steadily popular term.

## `watchTimeframe` (type: `string`):

Rising-watcher mode: the window Google measures rising queries over. Past 7 days suits daily schedules, past 30 days weekly ones.

## `outputBaselineOnFirstRun` (type: `boolean`):

Rising-watcher mode: on the first run for a keyword and region, output everything rising now (marked isBaseline). Turn off to only remember them silently and report from the second run on.

## `forgetAfterDays` (type: `integer`):

Rising-watcher mode: a query that has not been rising for this many days counts as new again if it comes back. 0 never forgets.

## `stateStoreName` (type: `string`):

Rising-watcher mode: named key-value store in your account that remembers what was already reported, one record per keyword and region. Use a different name to keep separate watch lists apart.

## `trendingGeos` (type: `array`):

Trending-now mode: country codes, e.g. US, GB, IN.

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

Max trending searches per country

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

Google rate-limits Trends. Apify datacenter proxy with automatic session rotation works for most runs; switch to Residential for very large jobs.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "chatgpt",
    "claude",
    "gemini"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "searchType": "web",
  "category": 0,
  "includeRelated": true,
  "dropUnrelatedRising": false,
  "includeRegions": false,
  "watchTimeframe": "now 7-d",
  "outputBaselineOnFirstRun": true,
  "forgetAfterDays": 30,
  "stateStoreName": "google-trends-rising-watcher",
  "trendingGeos": [
    "US"
  ],
  "maxTrendingPerGeo": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `timelineCsv` (type: `string`):

No description

## `newRisingCsv` (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 = {
    "keywords": [
        "chatgpt",
        "claude",
        "gemini"
    ],
    "geo": "US",
    "trendingGeos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("varnmill/google-trends-api").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",
        "claude",
        "gemini",
    ],
    "geo": "US",
    "trendingGeos": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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

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/Wj0wjyAg9UUmfsk6m/builds/jtBrrn6oYJfouwgeO/openapi.json
