# Google Trends Scraper (time, regions, related, trending) (`ceo.sss/google-trends-scraper`) Actor

Google Trends for any keyword: interest over time, interest by region, top and rising related queries and topics, plus daily Trending Now for any country. Any timeframe, geo, category. Clean JSON/CSV, pay per keyword.

- **URL**: https://apify.com/ceo.sss/google-trends-scraper.md
- **Developed by:** [Swaraj Samant Singh](https://apify.com/ceo.sss) (community)
- **Categories:** SEO tools, Marketing, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 keyword scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Trends Scraper

Google Trends data for any keyword as clean JSON or CSV: interest over time, interest by region, top and rising related queries and topics. Optionally today's **Trending Now** searches for any country. Any timeframe from the past hour to 2004-present, any location, category and search type (web, image, news, YouTube, Shopping).

No browser, no API key. Each keyword is one request chain against Google Trends' own data endpoints, so runs finish in seconds.

### What you get per keyword

```json
{
  "keyword": "chatgpt",
  "geo": "US",
  "timeframe": "today 3-m",
  "category": 0,
  "property": "web",
  "averageInterest": 62.3,
  "interestOverTime": [
    { "date": "2026-06-08", "dateFormatted": "Jun 8, 2026", "value": 71, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "US-CA", "geoName": "California", "value": 100 }
  ],
  "relatedQueries": {
    "top": [ { "query": "chatgpt login", "value": 100, "formattedValue": "100" } ],
    "rising": [ { "query": "chatgpt 5", "value": 4300, "formattedValue": "Breakout" } ]
  },
  "relatedTopics": {
    "top": [ { "title": "ChatGPT", "type": "Chatbot", "mid": "/g/11khcfz0y2", "value": 100, "formattedValue": "100" } ],
    "rising": []
  },
  "scrapedAt": "2026-09-08T00:00:00.000Z"
}
```

| Field | Meaning |
|---|---|
| `interestOverTime` | Google's 0-100 index per point. Resolution follows the timeframe: minutes for "past hour", hours for "past day", days for 90 days, weeks for 12 months and 5 years, months for 2004-present. `isPartial` marks the current, still-changing bucket. |
| `averageInterest` | Mean of the timeline, handy for ranking many keywords in one run. |
| `interestByRegion` | 0-100 per country when `geo` is empty, per state/region when `geo` is a country. Regions with no data are omitted. |
| `relatedQueries` / `relatedTopics` | `top` is the 0-100 ranked list, `rising` is percent growth; `formattedValue` is "Breakout" for more than 5000 percent. |

Each keyword is fetched on its own, so values are relative to that keyword's own peak (the same as typing one term into Google Trends). Fields Google does not return are omitted, never invented.

### Trending Now rows

Add country codes to `trendingNowGeos` and you also get one row per trending search:

```json
{ "type": "trendingNow", "geo": "US", "title": "class action", "approxTraffic": "500+", "pubDate": "Mon, 7 Sep 2026 15:00:00 -0700", "exploreUrl": "https://trends.google.com/trends/explore?q=class%20action", "picture": "https://...", "pictureSource": "GlobeNewswire", "news": [ { "title": "...", "url": "...", "source": "..." } ] }
```

### Input

```json
{
  "keywords": ["chatgpt", "claude ai"],
  "geo": "US",
  "timeframe": "today 12-m",
  "trendingNowGeos": ["US", "IN"]
}
```

| Field | Default | Notes |
|---|---|---|
| `keywords` | required unless `trendingNowGeos` is set | One row each. |
| `geo` | `""` (worldwide) | ISO country code (`US`, `GB`, `IN`) or sub-region (`US-CA`, `GB-ENG`). |
| `timeframe` | `today 12-m` | `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 `2024-01-01 2024-12-31`. |
| `category` | `0` | Google Trends category id. 5 Computers & Electronics, 7 Finance, 12 Business & Industrial, 18 Shopping, 45 Health. |
| `property` | `""` (web) | `images`, `news`, `youtube`, `froogle` (Shopping). |
| `includeInterestOverTime` and the other `include*` flags | `true` | Turn off what you do not need. |
| `trendingNowGeos` | `[]` | Country codes for Trending Now rows. |
| `language` | `en-US` | Locale for labels and region names. |
| `minDelayMs` | `2000` | Pause between requests. Google rate limits Trends hard; keep this unless you use residential proxies. |
| `proxyConfiguration` | Apify Proxy | Residential proxies are the most reliable for Google. |

### Pricing

Pay per event. You pay only for what lands in the dataset.

| Event | Price |
|---|---|
| Actor start | $0.005 |
| Keyword scraped (one full row) | $0.02 |
| Trending Now item | $0.001 |

Set **Max total charge** on the run to cap spend; the Actor stops cleanly when it is reached. 1,000 keywords is about $20.

### Use cases

- Rank product ideas, niches or content topics by search interest before you build.
- Track brand or competitor interest weekly with a scheduled run and a Google Sheets integration.
- Find breakout queries (`formattedValue: "Breakout"`) for SEO and ad campaigns.
- Feed today's Trending Now searches into a newsroom or social media workflow.

### Limits and notes

- Google shows a keyword as 0 when its volume is below Google's threshold; that is Google's answer, not an error.
- Very high request rates trigger HTTP 429. The Actor rotates proxy sessions and refreshes its Google cookie, then retries once per keyword. Failed keywords are logged and skipped, the run continues.
- Interest values are relative and rounded by Google. For comparisons across keywords use `averageInterest` from the same run and timeframe.

### Integrations and API

Works with every Apify integration (Google Sheets, Slack, Make, Zapier, webhooks) and the Apify API and clients (Python, JavaScript). Example with the Python client:

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("ceo.sss/google-trends-scraper").call(run_input={"keywords": ["chatgpt"], "geo": "US"})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["keyword"], row["averageInterest"])
```

# Actor input Schema

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

Search terms or topics, one row of results each. Each keyword is fetched on its own, so values are 0-100 relative to that keyword's own peak.

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

Empty for worldwide, or an ISO country code (US, GB, IN, DE ...). Sub-regions work too, e.g. US-CA or GB-ENG.

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

Google's timeframe. Via API you can also pass a custom range like "2024-01-01 2024-12-31".

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

Google Trends category id, 0 = all categories. Examples: 5 Computers & Electronics, 12 Business & Industrial, 7 Finance, 45 Health, 18 Shopping.

## `property` (type: `string`):

Which Google property the interest is measured on.

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

Timeline of 0-100 values (interestOverTime, averageInterest).

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

0-100 per country (worldwide) or per state/region (when geo is a country).

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

Top and rising related search queries with values.

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

Top and rising related topics (Knowledge Graph entities).

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

Optional. Country codes (US, IN, GB ...) to also pull today's Trending Now searches with approximate traffic and linked news. One row per trend.

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

Locale for labels and region names, e.g. en-US, de-DE, pt-BR.

## `minDelayMs` (type: `integer`):

Google rate limits Trends aggressively. Lower this only with residential proxies.

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

Apify Proxy is recommended. Residential proxies are the most reliable for Google.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "claude ai"
  ],
  "geo": "",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "language": "en-US",
  "minDelayMs": 2000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per keyword (interest over time, by region, related queries and topics) and one row per Trending Now item.

# 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 ai"
    ]
};

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

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

```

## MCP server setup

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