# Google Trends Scraper – Interest, Regions & Related Queries (`kunnu_data/google-trends-scraper`) Actor

Reliable Google Trends data: interest over time, interest by region, related queries and topics (top + rising), keyword comparisons, plus today's trending searches by country. Built to avoid the 429 errors that break other Trends scrapers. No proxies needed.

- **URL**: https://apify.com/kunnu_data/google-trends-scraper.md
- **Developed by:** [Kunal Data](https://apify.com/kunnu_data) (community)
- **Categories:** SEO tools, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 & Related Queries

Get **Google Trends data that actually arrives**: interest over time, interest by country / state / city, **related queries and topics (top and rising, including breakouts)**, side-by-side keyword comparisons, and **today's trending searches** by country — as clean JSON, CSV or Excel, or through the API.

Google Trends rejects most automated requests with HTTP 429 ("Too many requests"), which is why many Trends scrapers fail a large share of their runs. This actor opens a proper Trends session first, paces its requests and retries with a fresh session when Google pushes back, so runs finish reliably — **without proxies**.

### What you get

- **Interest over time** — the 0–100 index Google shows, for any period from the past hour to 2004–today, or a custom date range.
- **Trend summary per term** — average, latest and peak interest, peak date, rising / stable / falling direction and % change between the first and second half of the period.
- **Interest by region** — countries, states/regions, cities or US metro areas (DMA).
- **Related queries and related topics** — top and rising lists with values such as "Breakout" or "+350%".
- **Comparisons** — up to 5 terms compared on the same scale, exactly like typing them side by side on Google Trends.
- **Web, Image, News, YouTube or Shopping search** interest, with optional category filter.
- **Trending now** — today's trending searches for any country with approximate search volume and the news articles behind them.
- **Two output formats** — one row per term (nested data + summary) or flat rows ready for Google Sheets / Excel.

### Use cases

- **SEO and content planning** — find rising queries and seasonal peaks before writing.
- **Product and market research** — compare brands, products or technologies across countries.
- **E-commerce** — spot rising product searches (use the Shopping property) and plan stock around seasonality.
- **Newsrooms and social media teams** — daily trending searches per country, with the news behind them.
- **Data science and AI agents** — schedule daily or weekly pulls into your warehouse, or call the actor from an AI agent via the Apify MCP server.

### How to use

1. Enter one or more **search terms**. Turn on **Compare terms** to put them on one scale (groups of up to 5).
2. Pick the **country** (empty = worldwide), **time range** and Google property.
3. Choose which data to include, then click **Start**. Export to JSON, CSV, Excel or HTML, or connect the dataset to Google Sheets, Make, Zapier or n8n.

Example input:

```json
{
  "searchTerms": [
    "electric bike",
    "e-scooter"
  ],
  "compareTerms": true,
  "geo": "US",
  "timeRange": "past-5-years",
  "searchProperty": "web",
  "trendingNowCountries": [
    "US",
    "GB"
  ]
}
```

### Input options

| Field | What it does |
|---|---|
| `searchTerms` | Keywords or phrases. |
| `compareTerms` | Compare terms against each other in groups of up to 5. |
| `geo` | Country code ("US", "IN", "DE") or region ("US-CA"). Empty = worldwide. |
| `timeRange` / `customTimeRange` | Past hour … since 2004, or "YYYY-MM-DD YYYY-MM-DD". |
| `searchProperty` | Web, images, news, YouTube or shopping search. |
| `category` | Google Trends category ID (0 = all). |
| `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics` | Choose the data you need (fewer = faster). |
| `regionResolution` | Countries, states/regions, cities or US metro areas. |
| `outputFormat` | One row per term (with summary) or flat rows. |
| `trendingNowCountries` | Also fetch today's trending searches for these countries. |

### Output

One row per search term (real example, trimmed):

```json
{
  "searchTerm": "ai agents",
  "geo": "US",
  "timeRange": "past-12-months",
  "property": "web",
  "category": 0,
  "comparedWith": null,
  "averageInterest": 44.8,
  "latestInterest": 24,
  "peakInterest": 100,
  "peakDate": "2026-06-07T00:00:00.000Z",
  "trendDirection": "rising",
  "changePercent": 23.2,
  "topRegions": [
    {
      "geoName": "Wyoming",
      "geoCode": "US-WY",
      "value": 100
    },
    {
      "geoName": "California",
      "geoCode": "US-CA",
      "value": 22
    },
    {
      "geoName": "Kansas",
      "geoCode": "US-KS",
      "value": 22
    }
  ],
  "interestOverTime": [
    {
      "date": "2026-10-04T00:00:00.000Z",
      "formattedTime": "Oct 4 – 10, 2026",
      "value": 23,
      "isPartial": false
    },
    {
      "date": "2026-10-11T00:00:00.000Z",
      "formattedTime": "Oct 11 – 17, 2026",
      "value": 24,
      "isPartial": false
    },
    {
      "date": "2026-10-18T00:00:00.000Z",
      "formattedTime": "Oct 18 – 24, 2026",
      "value": 32,
      "isPartial": true
    }
  ],
  "interestByRegion": [
    {
      "geoCode": "US-WY",
      "geoName": "Wyoming",
      "value": 100
    },
    {
      "geoCode": "US-CA",
      "geoName": "California",
      "value": 22
    },
    {
      "geoCode": "US-KS",
      "geoName": "Kansas",
      "value": 22
    }
  ],
  "relatedQueriesTop": [
    {
      "query": "best ai agents",
      "topicType": null,
      "topicId": null,
      "value": 100,
      "formattedValue": "100",
      "link": "https://trends.google.com/trends/explore?q=best+ai+agents&date=today+12-m&geo=US"
    },
    {
      "query": "ai news",
      "topicType": null,
      "topicId": null,
      "value": 50,
      "formattedValue": "50",
      "link": "https://trends.google.com/trends/explore?q=ai+news&date=today+12-m&geo=US"
    }
  ],
  "relatedQueriesRising": [
    {
      "query": "openclaw",
      "topicType": null,
      "topicId": null,
      "value": 167800,
      "formattedValue": "Breakout",
      "link": "https://trends.google.com/trends/explore?q=openclaw&date=today+12-m&geo=US"
    },
    {
      "query": "ai agents moltbook",
      "topicType": null,
      "topicId": null,
      "value": 52450,
      "formattedValue": "Breakout",
      "link": "https://trends.google.com/trends/explore?q=ai+agents+moltbook&date=today+12-m&geo=US"
    }
  ],
  "relatedTopicsTop": [],
  "relatedTopicsRising": [],
  "scrapedAt": "2026-10-21T04:37:20.440Z"
}
```

Trending now row (real example):

```json
{
  "recordType": "trendingNow",
  "country": "US",
  "rank": 1,
  "title": "lilli tagger",
  "approxTraffic": "200+",
  "publishedAt": "2026-10-21T04:20:00.000Z",
  "picture": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSB02ebjc9PMw7uryrOamYE2TC0dBy0Ee7E17hni7hYVJMES9qvTzcUNSH6tkI",
  "news": [
    {
      "title": "2025 finalist Valentova overcomes Zhang in three-set Osaka opener",
      "url": "https://www.wtatennis.com/videos/4594971/2025-finalist-valentova-overcomes-zhang-in-three-set-osaka-opener",
      "source": "WTA Tennis"
    }
  ],
  "scrapedAt": "2026-10-21T04:37:20.440Z"
}
```

Values are Google's relative index: 100 = the highest interest in the selected period and place; in comparisons all terms share one scale. "Breakout" in rising lists means growth above 5,000%.

### Pricing

**Free during launch.** You pay only Apify's own platform usage, which is small: no browser and no proxies are used.

Pay-per-result pricing will be introduced later; Apify notifies existing users in advance of any pricing change.

### Use it from code

Run the actor and fetch results with the Apify API (replace `<YOUR_TOKEN>` with your Apify API token):

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

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_TOKEN>")
run = client.actor("kunnu_data/google-trends-scraper").call(run_input={"searchTerms": ["ai agents"], "geo": "US"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["searchTerm"], item["trendDirection"], item["latestInterest"])
```

### FAQ

**Why do other Google Trends scrapers fail?** Google answers requests without a valid Trends session with HTTP 429. This actor establishes the session first, paces requests and retries with a new session when needed.

**Are the numbers search volumes?** No — Google Trends gives a relative 0–100 index, not absolute counts. "Trending now" includes Google's approximate traffic buckets (e.g. "200K+").

**Is this legal?** The actor reads publicly available, aggregated Google Trends data — no login and no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

**Something broke or you need a field?** Open an issue on the Issues tab — every report is reviewed and fixes are prioritised.

### Related actors

- [Hiring Signals – Jobs & Company Intelligence (8 ATS)](https://apify.com/kunnu_data/hiring-signals)
- [Workable Jobs Scraper – Search All Workable Jobs](https://apify.com/kunnu_data/workable-jobs-scraper)
- [SmartRecruiters Jobs Scraper](https://apify.com/kunnu_data/smartrecruiters-jobs-scraper)
- [Recruitee Jobs Scraper](https://apify.com/kunnu_data/recruitee-jobs-scraper)
- [Personio Jobs Scraper](https://apify.com/kunnu_data/personio-jobs-scraper)
- [Teamtailor Jobs Scraper](https://apify.com/kunnu_data/teamtailor-jobs-scraper)
- [SEEK Jobs Scraper – Australia & New Zealand](https://apify.com/kunnu_data/seek-jobs-scraper)
- [Dice Jobs Scraper – US Tech Jobs](https://apify.com/kunnu_data/dice-jobs-scraper)

# Actor input Schema

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

Keywords or phrases to look up on Google Trends. Each term gets its own report unless "Compare terms" is on.

## `compareTerms` (type: `boolean`):

Compare terms in groups of up to 5 (like typing them side by side on Google Trends), so values are relative to each other.

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

Two-letter country code (e.g. "US", "IN", "GB") or region ("US-CA"). Empty = worldwide.

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

Period to analyse.

## `customTimeRange` (type: `string`):

Optional, overrides the time range: "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-06-30".

## `searchProperty` (type: `string`):

Which Google search to measure.

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

Google Trends category ID to narrow ambiguous terms (0 = all categories).

## `interestOverTime` (type: `boolean`):

Time series of search interest (0–100).

## `interestByRegion` (type: `boolean`):

Search interest by country, state or city.

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

Granularity for interest by region. Default = Google picks (countries for worldwide, states/regions for a country).

## `relatedQueries` (type: `boolean`):

Queries people also search for, including breakout queries.

## `relatedTopics` (type: `boolean`):

Related topics (available for single-term reports).

## `outputFormat` (type: `string`):

One row per term with nested data and summary metrics, or flat rows (one per data point) for spreadsheets.

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

Also fetch today's trending searches (with approximate traffic and news links) for these country codes, e.g. US, IN, GB.

## Actor input object example

```json
{
  "searchTerms": [
    "ai agents",
    "web scraping"
  ],
  "compareTerms": false,
  "timeRange": "past-12-months",
  "searchProperty": "web",
  "category": 0,
  "interestOverTime": true,
  "interestByRegion": true,
  "regionResolution": "",
  "relatedQueries": true,
  "relatedTopics": true,
  "outputFormat": "perTerm"
}
```

# Actor output Schema

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

No description

## `allResults` (type: `string`):

No description

## `runSummary` (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 = {
    "searchTerms": [
        "ai agents",
        "web scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kunnu_data/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": [
        "ai agents",
        "web scraping",
    ] }

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

```

## MCP server setup

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