# Google Trends Scraper - Interest, Regions, Rising Queries (`om_kh/google-trends-scraper`) Actor

Google Trends API for any keyword: interest over time, average, peak and % change, rising and breakout queries, top regions, compare up to 5 keywords, plus daily Trending now searches by country. $2 per 1,000 keywords, no start fee. JSON, CSV, API, MCP.

- **URL**: https://apify.com/om\_kh/google-trends-scraper.md
- **Developed by:** [Khandji Omar](https://apify.com/om_kh) (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 $1.40 / 1,000 keyword trends

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 — Interest, Regions, Rising Queries

> Google Trends API for any keyword: interest over time, average, peak and % change,
> rising and breakout queries, top regions, compare up to 5 keywords, plus the daily
> **Trending now** searches of any country. **$2 per 1,000 keywords, no start fee.**

### What does this Google Trends scraper do?

Give it keywords. For each one you get **one clean row** with everything the Google
Trends page shows — and the numbers you would otherwise compute by hand:

- the full **interest-over-time timeline** (0-100) for the period you choose,
- **average, peak, peak date and latest** interest,
- the **trend direction** (`rising`, `falling`, `stable`) and the **% change** between the
  start and the end of the period,
- the **top 15 regions** where the keyword is searched most,
- **top and rising related queries** — including Google's **"Breakout"** queries, the
  earliest signal of a new trend,
- related topics when Google has them,
- a direct link to open the same view on trends.google.com.

Optionally, it also returns today's **Trending now** searches for any list of countries,
with approximate search volume and the news articles behind each trend.

It reads Google Trends directly — no third-party scraper in the middle — and retries
with a fresh session when Google rate-limits, so a busy day does not fail your run.

### Why use it

1. **Answers, not just charts.** Direction and % change are computed for you, so you can
   sort 200 keywords by momentum in a spreadsheet in seconds.
2. **Breakout queries.** The rising related queries are where new products, trends and
   content ideas show up first.
3. **Compare on one scale.** Turn on `compare` and keywords are grouped by 5, exactly like
   typing them together on Google Trends, so their values are directly comparable.
4. **Cheap and predictable.** $0.002 per keyword row, $0.001 per trending search, no
   start fee. The first 3 results of every run are free.
5. **Built for automation and AI.** JSON, CSV or Excel; API, n8n, Make, Zapier; and an
   MCP tool for AI agents.

### How to use Google Trends Scraper in 3 steps

1. Click **Try for free** — two keywords are prefilled.
2. Optional: choose a country (`geo`), a time range, turn on `compare`, or add countries
   to **Trending now**.
3. Click **Start**, then download the results as JSON, CSV or Excel, or read them from the API.

### Input

| Field | What it does |
|---|---|
| `searchTerms` | Keywords or topics, one per line (up to 200 per run). |
| `geo` | Two-letter country code (`US`, `FR`, `GB`, `DE`, `IN`...). Empty = worldwide. |
| `timeRange` | `past_hour`, `past_4_hours`, `past_day`, `past_7_days`, `past_30_days`, `past_90_days`, `past_12_months` (default), `past_5_years`, `since_2004`. |
| `compare` | Group keywords by 5 on the same 0-100 scale. Default off. |
| `includeRelated` | Top and rising related queries (and topics). Default on. |
| `includeRegions` | Top 15 regions. Default on. |
| `category` | Optional Google Trends category ID. `0` = all. |
| `trendingNowCountries` | Optional country codes for today's trending searches. |
| `maxTotalChargeUsd` | Optional hard cost cap for the run. |

```json
{
  "searchTerms": ["chatgpt", "claude ai", "gemini"],
  "geo": "US",
  "timeRange": "past_12_months",
  "compare": true,
  "trendingNowCountries": ["US", "FR"]
}
```

### Output

One row per keyword. Real example (US, past 12 months, trimmed):

```json
{
  "type": "keyword",
  "keyword": "claude ai",
  "geo": "US",
  "timeRange": "today 12-m",
  "averageInterest": 48.4,
  "peakInterest": 100,
  "peakDate": "2026-03-01T00:00:00Z",
  "latestInterest": 36,
  "trendDirection": "rising",
  "changePct": 185.3,
  "timeline": [{"date": "2025-09-28T00:00:00Z", "label": "Sep 28 – Oct 4, 2025", "value": 20, "partial": false}],
  "topRegions": [{"region": "District of Columbia", "code": "US-DC", "value": 100}, {"region": "Wyoming", "code": "US-WY", "value": 95}],
  "relatedQueriesRising": [{"query": "claude cowork", "value": 92950, "formattedValue": "Breakout"}, {"query": "openclaw", "value": 75100, "formattedValue": "Breakout"}],
  "relatedQueriesTop": [],
  "trendsUrl": "https://trends.google.com/trends/explore?date=today%2012-m&q=claude%20ai&geo=US",
  "status": "ok"
}
```

A **Trending now** row looks like this:

```json
{
  "type": "trending",
  "geo": "FR",
  "rank": 1,
  "title": "france football",
  "approxTraffic": "100+",
  "startedAt": "Tue, 30 Sep 2026 06:40:00 -0700",
  "news": [{"title": "...", "url": "https://...", "source": "..."}],
  "status": "ok"
}
```

Values are Google's relative interest scale: 100 is the peak popularity for the period
and place, 50 is half as popular. They are not absolute search volumes.

### How much does it cost?

| Result | Price |
|---|---|
| Keyword trend row | **$0.002** ($2 per 1,000) |
| Trending now search | **$0.001** ($1 per 1,000) |
| Start fee | none |

The first 3 results of every run are free. A keyword Google could not return is never
charged. Paid Apify plans get lower tier prices — see the Pricing tab.

### Use cases

- **SEO and content planning** — find rising queries before your competitors write about them.
- **Product and market research** — compare demand for products, brands or features across countries.
- **Trend spotting and newsjacking** — daily Trending now searches with their news sources.
- **Investing and e-commerce signals** — track momentum of brands, tickers or product categories.
- **AI agents** — let an assistant check whether a topic is growing before it recommends it.

### Use it from code (API)

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("om_kh/google-trends-scraper").call(run_input={
    "searchTerms": ["chatgpt", "claude ai"],
    "geo": "US",
    "timeRange": "past_90_days",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["keyword"], item["trendDirection"], item["changePct"])
```

**JavaScript**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('om_kh/google-trends-scraper').call({
    searchTerms: ['chatgpt', 'claude ai'],
    geo: 'US',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**One HTTP call (cURL)**

```bash
curl -X POST "https://api.apify.com/v2/acts/om_kh~google-trends-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["chatgpt", "claude ai"], "geo": "US"}'
```

### Integrations: n8n, Make, Zapier, Google Sheets

- **n8n / Make / Zapier** — use the Apify app, pick this Actor, map the fields.
- **Google Sheets** — add the Google Sheets integration from the Integrations tab.
- **Schedules** — run it every morning to track your keywords and today's trending searches.

### Use it from an AI agent (MCP)

Connect an MCP client (Claude, Cursor, VS Code...) to `https://mcp.apify.com` and add
`om_kh/google-trends-scraper` as a tool. The agent passes the same JSON as the input
above and gets the rows back.

### Tips and limits

- Google Trends values are relative (0-100), not search volumes.
- Very rare keywords may return no data; they are reported and not charged.
- For keyword lists over 50, leave `includeRelated` on only if you need it — it adds requests.
- `compare` groups keywords in the order you list them, 5 per group.

### FAQ

**Is it legal to scrape Google Trends?**
It reads the same public, aggregated and anonymous data the Google Trends website shows
to any visitor. No personal data is collected. Check the terms of use that apply to you.

**Do I need a Google account or API key?**
No.

**What are "Breakout" queries?**
Related queries whose searches grew by more than 5,000% over the period — the earliest
sign of something new taking off.

**Can I compare keywords like on the Google Trends website?**
Yes: set `compare` to `true`. Keywords are grouped by 5 on the same scale.

**Can I get trending searches for my country every day?**
Yes: add your country code to `trendingNowCountries` and schedule the Actor daily.

**How is this different from other Google Trends scrapers?**
One row per keyword with direction, % change, peak, regions and breakout queries already
computed; automatic retries when Google rate-limits; no start fee; first 3 results free.

### Related Actors

- [Google News API - Headlines, Source, Date, No Login](https://apify.com/om_kh/google-news-scraper) — the articles behind a trend, in any country edition.
- [YouTube Search Scraper API - Videos, Views, $0.50/1K](https://apify.com/om_kh/vigia-youtube-search-monitor) — the videos being published on a rising topic.
- [YouTube Transcript Scraper - Full Text, Timestamps, Language](https://apify.com/om_kh/youtube-transcript-api) — turn those videos into text for analysis.

### Support

Found a problem or need a field? Open an issue on this Actor's page.

# Actor input Schema

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

Keywords or topics to analyse on Google Trends, one per line (up to 200 per run).

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

Two-letter country code (US, FR, GB, DE, IN...). Empty = worldwide.

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

Period to analyse.

## `compare` (type: `boolean`):

Group keywords by 5 so their 0-100 values are directly comparable (like typing them together on Google Trends). Off = each keyword on its own scale.

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

Top and rising (breakout) related queries, plus related topics when Google has them.

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

The 15 regions/countries where the keyword is most searched.

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

Optional Google Trends category ID (0 = all categories).

## `trendingNowCountries` (type: `array`):

Optional: two-letter country codes to also get today's trending searches (with approximate traffic and news links) for each.

## `maxTotalChargeUsd` (type: `number`):

Optional hard cap on what this run can cost you.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude ai"
  ],
  "geo": "",
  "timeRange": "past_12_months",
  "compare": false,
  "includeRelated": true,
  "includeRegions": true,
  "category": 0,
  "trendingNowCountries": []
}
```

# Actor output Schema

## `report` (type: `string`):

A visual summary of delivery, charges, and source issues.

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

Companies in a sortable table. No JSON knowledge required.

## `csv` (type: `string`):

Results ready for spreadsheets, CRMs, and analytics tools.

## `excel` (type: `string`):

Results as an Excel workbook for non-technical teams.

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

Machine-readable delivery, billing, and source diagnostics.

# 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 = {
    "searchTerms": [
        "chatgpt",
        "claude ai"
    ]
};

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

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

```

## MCP server setup

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