# Google Trends Scraper: Trending Now & Regions (`kyungminlee/google-trends-scraper`) Actor

Google Trends data without a browser or pytrends: a keyword with a year of history returns in about 15 s. Interest over time, interest by region, related queries and topics, autocomplete suggestions and the Trending Now feed for any country. JSON/CSV export, API or scheduled tracking.

- **URL**: https://apify.com/kyungminlee/google-trends-scraper.md
- **Developed by:** [Kyungmin Lee](https://apify.com/kyungminlee) (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 $0.07 / 1,000 rows

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?

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

### What does Google Trends Scraper do?

**Google Trends Scraper** replaces the broken `pytrends` workflow: it talks to Google Trends' own data endpoints, so a keyword with a year of history returns in about 15 seconds with no browser, Google account or CAPTCHA, and Apify Proxy rotation absorbs Google's rate limits. It also exposes the **Trending Now** feed for any country, which has no official API at all.

Output rows are typed by `type`: `interestOverTime` (date, value, isPartial), `interestByRegion` (geo code, name, value), `relatedQuery` / `relatedTopic` (query, value, rising vs top), `suggestion` and `trending` (title, traffic, started, related queries, news articles) — each tagged with `keyword`, `geo` and `timeframe`. Export JSON/CSV, call the REST API, or schedule hourly Trending Now runs and forward new entries to Slack or a dashboard.

### Why use Google Trends Scraper?

- **Market and product research**: track demand for products, brands or topics across countries and time.
- **SEO and content planning**: discover rising related queries before they peak; compare keyword demand in one run.
- **Trend monitoring and alerts**: schedule hourly runs of *Trending Now* for any country and push new trends to Slack or a dashboard.
- **Investment and brand tracking**: build long-term time series for tickers, companies or competitors.
- **Data science**: clean numeric rows (0–100 index, dates in ISO format) that drop straight into pandas or BI tools.

### How to scrape Google Trends

1. Enter one or more **keywords** (each is scored independently; switch on **Compare keywords** for the classic side-by-side comparison of up to 5).
2. Choose a **location** (`US`, `GB`, `KR`, `US-CA`, or empty for worldwide) and a **timeframe** (`today 12-m`, `now 7-d`, `today 5-y`, `all`, or a date range).
3. Tick which data you need: interest over time, interest by region (with resolution), related queries, related topics, suggestions, Trending Now.
4. Click **Start**. Results appear in the **Dataset** tab; download or fetch them via API.

### Input

| Field | Default | Description |
|---|---|---|
| `keywords` | `["chatgpt", "claude ai"]` | Search terms |
| `compareKeywords` | `false` | Compare keywords on one shared scale (groups of 5) |
| `geo` | `""` (worldwide) | Country/region code |
| `timeframe` | `today 12-m` | Any Google Trends timeframe or `YYYY-MM-DD YYYY-MM-DD` |
| `category` | `0` | Google Trends category ID |
| `searchType` | `web` | `web`, `images`, `news`, `youtube`, `froogle` |
| `includeInterestOverTime` | `true` | Row per date |
| `includeInterestByRegion` | `true` | Row per region; `regionResolution` = `COUNTRY` / `REGION` / `CITY` / `DMA` |
| `includeRelatedQueries` | `true` | Top + rising related searches |
| `includeRelatedTopics` | `false` | Often empty (Google serves topics only to signed-in sessions) |
| `includeSuggestions` | `false` | Autocomplete entities |
| `trendingNow` | `false` | Live Trending Now list for `trendingGeo` over `trendingHours` (4/24/48/168) |
| `proxyConfiguration` | Apify Proxy on | Keep on: Google Trends rate-limits single IPs quickly |

Example:

```json
{
  "keywords": ["electric bike", "e-scooter"],
  "compareKeywords": true,
  "geo": "GB",
  "timeframe": "today 5-y",
  "regionResolution": "CITY"
}
```

### Output

One row per data point. Examples:

```json
{ "type": "interestOverTime", "keyword": "electric bike", "date": "2026-06-07T00:00:00Z", "value": 87, "isPartial": false, "geo": "GB", "timeframe": "today 5-y" }
{ "type": "interestByRegion", "keyword": "electric bike", "geoCode": "GB-ENG", "geoName": "England", "value": 100, "resolution": "REGION" }
{ "type": "relatedQuery", "keyword": "electric bike", "kind": "rising", "rank": 1, "query": "electric bike conversion kit", "value": 250, "formattedValue": "+250%", "isBreakout": false }
{ "type": "trending", "geo": "US", "hours": 24, "rank": 3, "title": "nfl scores", "searchVolume": 500000, "increasePct": 1000, "startedAt": "2026-09-13T17:00:00Z", "isActive": true, "categories": ["Sports"] }
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data fields

| Type | Fields |
|---|---|
| `interestOverTime` | `keyword`, `date`, `formattedTime`, `value` (0–100), `hasData`, `isPartial` |
| `interestByRegion` | `keyword`, `geoCode`, `geoName`, `resolution`, `value`, `coordinates` (cities) |
| `relatedQuery` / `relatedTopic` | `keyword`, `kind` (`top`/`rising`), `rank`, `query` or `title`, `value`, `formattedValue`, `isBreakout`, `link` |
| `suggestion` | `keyword`, `title`, `topicType`, `mid` |
| `trending` | `title`, `searchVolume`, `increasePct`, `startedAt`, `endedAt`, `isActive`, `breakdownKeywords`, `categories` |

Every row also carries `geo`, `timeframe`, `category`, `searchType` and, in compare mode, `comparisonGroup`.

### How much does it cost to scrape Google Trends?

Pricing is **pay per event**: a small fee per keyword and per row. A typical keyword (12 months, regions, related queries) produces about 50 time points, 50 regions and 50 related queries and takes 10–15 seconds. Switch off the data types you do not need to keep runs cheap; the Actor stops when your run's maximum charge is reached.

### Tips

- Values are relative (0–100 within each request). Use **Compare keywords** when you need keywords on the same scale; leave it off to get each keyword's own curve.
- `now 7-d` and shorter timeframes return hourly points; `today 5-y` returns weekly; `all` returns monthly.
- For city-level data set `regionResolution` to `CITY` and a country as `geo`.
- Schedule the Actor with `trendingNow` on and `trendingHours` = 4 to get fresh breakout trends every few hours.
- Google Trends throttles aggressively. The Actor spaces requests, retries with backoff and rotates proxy IPs; very large keyword lists (hundreds) may still hit limits — split them across runs.

### FAQ and disclaimers

**Are these absolute search volumes?** No. Google Trends publishes a normalized 0–100 index; Trending Now provides bucketed search volumes (e.g. 500K+).

**Why are related topics empty?** Google only returns related topics to signed-in browser sessions; related queries are unaffected.

**Is it legal?** The Actor collects data Google publishes openly on trends.google.com. You are responsible for how you use it and for complying with applicable laws and Google's terms. This is an unofficial tool, not affiliated with Google.

**Something broke?** Google changes Trends internals occasionally. Open an issue in the **Issues** tab with your input and it will be fixed quickly. Custom features (alerts, keyword sets, historical backfills) are available on request.

# Actor input Schema

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

Search terms to analyze. Each keyword is queried on its own (absolute 0-100 scale per keyword) unless *Compare keywords* is on.

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

Compare keywords against each other like the Trends UI (groups of up to 5 share one 0-100 scale). Off = each keyword is scored independently.

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

Country code (`US`, `GB`, `DE`, `KR`...), region (`US-CA`) or empty for worldwide.

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

Google Trends time range: `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 date range `2025-01-01 2025-06-30`.

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

Google Trends category ID (0 = all categories). Find IDs in the URL of trends.google.com after choosing a category, e.g. 31 = Programming.

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

Which Google property to measure.

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

One row per date with the 0-100 interest value.

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

One row per region/city with its 0-100 value.

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

Granularity of *Interest by region*. COUNTRY only works when Location is empty (worldwide).

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with very little search volume.

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

Top and rising related searches (25 each).

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

Top and rising related topics. Note: Google returns these only for signed-in sessions, so this is often empty.

## `includeSuggestions` (type: `boolean`):

Google's entity suggestions for each keyword (mid, title, type).

## `trendingNow` (type: `boolean`):

Also scrape the live *Trending now* list (no keywords needed).

## `trendingGeo` (type: `string`):

Country code for Trending Now.

## `trendingHours` (type: `integer`):

Time window for Trending Now in hours: 4, 24, 48 or 168.

## `trendingActiveOnly` (type: `boolean`):

Skip trends that have already ended.

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

UI language for names and categories, e.g. `en-US`, `ko`, `de`.

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

Google Trends rate-limits IPs aggressively. Apify Proxy is enabled by default; keep it on.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "claude ai"
  ],
  "compareKeywords": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "category": 0,
  "searchType": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "REGION",
  "includeLowVolumeRegions": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "includeSuggestions": false,
  "trendingNow": false,
  "trendingGeo": "US",
  "trendingHours": 24,
  "trendingActiveOnly": false,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 ai"
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kyungminlee/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",
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("kyungminlee/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"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call kyungminlee/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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