# Google Trends Scraper – Interest, Regions & Related (`ryumoon-data/google-trends-scraper-all-in-one`) Actor

Scrape Google Trends for many keywords in one run: interest over time, by region, related queries, related topics and trending searches. Any country or timeframe. Retries on 429 with proxy rotation. $4 per 1,000 trend blocks.

- **URL**: https://apify.com/ryumoon-data/google-trends-scraper-all-in-one.md
- **Developed by:** [Ryu Moon](https://apify.com/ryumoon-data) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 trends results

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

## Google Trends Scraper: Interest, Regions, Related & Trending

Get Google Trends data for a list of keywords in **one run**, as clean JSON, CSV or Excel:

- **Interest over time**: the full 0–100 timeline for each keyword (hourly, daily, weekly or monthly points, depending on the timeframe).
- **Interest by region**: countries, states/sub-regions, cities or US metro areas (DMA).
- **Related queries**: top and rising searches, including "Breakout" terms.
- **Related topics**: top and rising topics (entities such as companies, people and products).
- **Trending searches ("Trending now")**: today's trending searches per country, with approximate traffic and the news stories behind them.

Any country or region, any timeframe (preset or custom date range), any category, and web, YouTube, News, Image or Shopping search.

### Use with AI agents (MCP, Claude, ChatGPT, Cursor)

**Purpose:** Get Google Trends data for keywords: interest over time (0–100), interest by region, related queries and topics, and today's trending searches, for any country and timeframe.

**When to use it**

- "Is X growing?", "when does X peak each year?", "which country searches X most?", "compare A vs B".
- Finding rising and Breakout related searches for content or product ideas.
- Daily trending searches per country (`trendingSearches: true`, works without keywords).

**When not to use it**

- Values are relative (0–100), not absolute search volumes.
- For long-tail keyword lists, use [Keyword Autocomplete](https://apify.com/ryumoon-data/keyword-autocomplete-expander).

**Example input**

```json
{
  "keywords": [
    "electric bike",
    "e-scooter"
  ],
  "geo": "GB",
  "timeframe": "today 5-y",
  "compareKeywords": true,
  "relatedQueries": true,
  "interestByRegion": false,
  "relatedTopics": false
}
```

**Output fields (one dataset item per row):** One row per keyword and data type. Common fields: `dataType` (interestOverTime / interestByRegion / relatedQueries / relatedTopics / trendingSearch), `keyword`, `geo`, `timeframe`, `average`, `comparedWith`, `timeline` (array of {date, formattedTime, value, isPartial}), `regions` (array of {geoCode, geoName, value}), `top` / `rising` (related lists), `approxTraffic`, `trendsUrl`, `scrapedAt`.

**Cost:** $0.01 per run + $0.004 per result row (one keyword × one data type) + $0.001 per trending search. Turn off data types you do not need to cut cost.

**Connect it to your agent:** add this remote MCP server (Apify's official MCP server, loaded with just this tool):

```json
{"mcpServers": {"google-trends-scraper-all-in-one": {"url": "https://mcp.apify.com?tools=ryumoon-data/google-trends-scraper-all-in-one"}}}
```

Or call it from any agent with the Apify API: `POST https://api.apify.com/v2/acts/ryumoon-data~google-trends-scraper-all-in-one/run-sync-get-dataset-items` with the input above as the JSON body. Agents without an Apify account can pay per run with [agentic payments](https://docs.apify.com/agents/payments) (x402, MPP or Skyfire).

### Why this scraper

- **All five Trends widgets in one run.** You don't need a separate actor for each.
- **Built for Google's rate limits.** Google Trends answers HTTP 429 ("Too many requests") very quickly. This actor keeps the Trends cookie, waits between requests, retries with exponential back-off and moves to a **new residential IP** whenever it gets blocked. If a request still fails after all retries, it is skipped and reported in the run's `SUMMARY`. **You're never charged for a skipped request.**
- **One row per keyword and data type.** You get a whole timeline in one row, not hundreds of rows, so it's cheap and easy to use. Flat "timeline" and "regions" dataset views are included for spreadsheets.

### Use cases

- Keyword and content research: find rising queries and Breakout topics before competitors do.
- Seasonality: plan stock, campaigns and posts from 5-year weekly timelines.
- Market sizing: compare brands or products (up to 5 at a time) across countries and regions.
- Newsjacking and social: pull today's trending searches every morning on a schedule.
- Feed dashboards, Google Sheets, Make/Zapier/n8n or an AI agent through the Apify API and MCP.

### Input

| Field | What it does |
|---|---|
| `keywords` | Up to 100 search terms. |
| `geo` | `GB`, `US`, `US-CA` … or empty for worldwide. |
| `timeframe` | `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 `2024-01-01 2024-12-31`. |
| `category` | Google Trends category ID (0 = all). |
| `searchProperty` | `web`, `youtube`, `news`, `images`, `shopping`. |
| `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics` | Turn each data type on or off. |
| `compareKeywords` | Compare keywords in groups of up to 5, so their values are relative to each other (like the Trends website). |
| `regionResolution` | Auto, countries, sub-regions, cities or DMA. |
| `trendingSearches`, `trendingGeos` | Also collect "Trending now" for one or more countries. |
| `proxyConfiguration` | Apify Proxy RESIDENTIAL (default, recommended) or your own proxy URLs. |
| `maxRetries`, `minDelayBetweenRequestsSecs` | Reliability tuning. |

Example:

```json
{
  "keywords": ["air fryer", "slow cooker"],
  "geo": "GB",
  "timeframe": "today 5-y",
  "compareKeywords": true,
  "trendingSearches": true,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Output

Interest over time (one row per keyword):

```json
{
  "dataType": "interestOverTime",
  "keyword": "air fryer",
  "comparedWith": ["slow cooker"],
  "average": 61,
  "timeline": [
    { "date": "2021-11-07T00:00:00.000Z", "formattedTime": "Nov 7 – 13, 2021", "value": 74, "hasData": true, "isPartial": false }
  ],
  "geo": "GB", "timeframe": "today 5-y", "category": 0, "searchProperty": "web",
  "trendsUrl": "https://trends.google.com/trends/explore?q=air+fryer&geo=GB&date=today+5-y",
  "scrapedAt": "2026-11-02T09:00:00.000Z"
}
```

Interest by region: `regions: [{ "geoCode": "GB-SCT", "geoName": "Scotland", "value": 100 }, …]`.
Related queries and topics: `top: [...]` and `rising: [...]`. Each entry has `query` (or `title`, `topicId`, `topicType`), `value`, `formattedValue` (e.g. `+250%` or `Breakout`), `isBreakout` and a `link`.
Trending search: `rank`, `title`, `approxTraffic` ("2K+"), `approxTrafficMin` (2000), `startedAt`, `picture` and `news: [{ title, url, source }]`.

### Pricing (pay per event)

| Event | Price |
|---|---|
| Run start | $0.01 per run |
| Trends result: one keyword × one data type (a full timeline, region list or related list) | $0.004 |
| Trending search (one row) | $0.001 |

Examples:

- 1 keyword with all 4 data types = $0.01 + 4 × $0.004 = **$0.026**.
- 10 keywords with all 4 data types = $0.01 + 40 × $0.004 = **$0.17**.
- Trending now for 3 countries (about 20 each) = $0.01 + 60 × $0.001 = **$0.07**.

Residential proxy traffic is included in these prices; you don't pay for it separately. Requests that fail after all retries are not charged, and neither are empty answers. When Google has no data (for example, no related topics for a niche keyword), the row is saved with `"noData": true` and costs nothing. You can cap the cost of any run with Apify's "Maximum cost per run" setting. The actor stops cleanly when it reaches the cap.

### Limits and honest notes

- This actor reads the same public endpoints the Google Trends website uses. Google doesn't publish an official free Trends API, and it can change these endpoints at any time. We fix breakages as quickly as we can.
- Google Trends values are **relative** (0–100), not absolute search volumes.
- Related topics are often empty for niche keywords or short timeframes, and Google doesn't offer them at all in compare mode (`compareKeywords`). That comes from Google, not from the scraper. Empty rows are free.
- "Trending now" comes from Google's public trending RSS feed, which usually lists 10–25 searches per country.
- Without a proxy, Google usually blocks cloud servers after the first request or two. Keep the RESIDENTIAL proxy on.
- Very large keyword lists are slower, because the actor paces requests to avoid blocks. Split huge lists into several runs.

### FAQ

**Is scraping Google Trends legal?** The actor collects only public, aggregated and anonymous trend data. No personal data is involved. Make sure your use complies with Google's terms and the laws that apply to you.

**Why do numbers differ slightly from the website?** Google samples Trends data, so repeated requests can differ by a few points. That happens on the website too.

**Can I run it on a schedule?** Yes. Use Apify Schedules, for example every morning for trending searches or weekly for keyword timelines.

# Actor input Schema

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

Search terms to look up, e.g. \["electric bike", "e-scooter"] (up to 100 per run). Each keyword gives one result row per data type you turn on below. Can be empty if only Trending searches is on.

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

ISO country code (e.g. GB, US, DE) or region code (e.g. US-CA). Leave empty for worldwide.

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

One of: 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 a custom range: YYYY-MM-DD YYYY-MM-DD.

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

Google Trends category ID (0 = all categories). Example: 71 = Food & Drink, 7 = Finance.

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

Which Google search to measure.

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

Timeline of search interest (0-100) for each keyword.

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

Search interest per country/region/city.

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

Top and rising related searches, including Breakout terms.

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

Top and rising related topics (entities). Google often returns this list empty for niche keywords.

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

If on, keywords are sent in groups of up to 5 so their interest values are relative to each other (like comparing terms on the Trends website). If off, each keyword is scaled 0-100 on its own.

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

Level of detail for interest by region. 'Auto' uses Google's default (countries for worldwide, sub-regions for a country).

## `includeLowSearchVolumeRegions` (type: `boolean`):

Include regions with low search volume in interest by region.

## `trendingSearches` (type: `boolean`):

Also collect today's trending searches with approximate traffic and news links. Works without keywords.

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

Countries for trending searches (ISO codes). Defaults to the country above, or US.

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

0 = all returned (usually 10-25 for the RSS feed).

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

Google Trends rate-limits cloud IPs (HTTP 429). Residential proxies are strongly recommended. You can also use your own proxy URLs.

## `maxRetries` (type: `integer`):

How many times to retry a rate-limited request, rotating to a new proxy IP each time.

## `minDelayBetweenRequestsSecs` (type: `number`):

Minimum pause between requests. Higher is gentler on Google and reduces 429s.

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

Language for names of regions and topics (hl), e.g. en-US, en-GB, de.

## Actor input object example

```json
{
  "keywords": [
    "coffee",
    "tea"
  ],
  "geo": "",
  "timeframe": "today 12-m",
  "category": 0,
  "searchProperty": "web",
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueries": true,
  "relatedTopics": true,
  "compareKeywords": false,
  "regionResolution": "auto",
  "includeLowSearchVolumeRegions": false,
  "trendingSearches": false,
  "maxTrendingPerGeo": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxRetries": 6,
  "minDelayBetweenRequestsSecs": 1.5,
  "language": "en-US"
}
```

# Actor output Schema

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

Every result row in the run's default dataset.

## `summary` (type: `string`):

Counts, skipped requests and HTTP/retry statistics.

# 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": [
        "coffee",
        "tea"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryumoon-data/google-trends-scraper-all-in-one").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": [
        "coffee",
        "tea",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ryumoon-data/google-trends-scraper-all-in-one").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": [
    "coffee",
    "tea"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call ryumoon-data/google-trends-scraper-all-in-one --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ryumoon-data/google-trends-scraper-all-in-one"
        }
    }
}
```

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/xisoc2aggBra8kmVE/builds/yD1RDtoa5JBSZUnNw/openapi.json
