# Google Trends Scraper: Interest, Related, Trending Now (`cn-data-lab/google-trends-scraper`) Actor

Get Google Trends data without an API key: interest over time with trend summary, interest by region, related queries, multi-keyword comparison and daily Trending Now searches. $2 per 1,000 keywords, no start fee.

- **URL**: https://apify.com/cn-data-lab/google-trends-scraper.md
- **Developed by:** [CN Data Lab](https://apify.com/cn-data-lab) (community)
- **Categories:** SEO tools, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 keyword 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

### What does Google Trends Scraper do?

**Google Trends Scraper** extracts data from [Google Trends](https://trends.google.com) without an API key, login or browser: **interest over time**, an automatic **trend summary** (average, peak, latest value, % change, rising/falling), **interest by region**, **related queries** (top and rising, including "Breakout" terms), **multi-keyword comparison** and daily **Trending Now** searches with approximate traffic and news links.

It is a lightweight HTTP-only scraper: fast (a keyword takes ~1–2 seconds), runs on 256 MB memory, and has **no expensive start fee** – you pay a small fixed price per keyword.

### Why use this Google Trends API alternative?

- 📈 **Keyword research & SEO** – find rising queries and seasonality before your competitors.
- 🛒 **E-commerce & product research** – validate demand for products, brands and niches by country.
- 💹 **Market & investment research** – track brand interest, compare competitors over 5 years.
- 📰 **Content & news** – daily Trending Now feed per country, with related news articles.
- 🤖 **AI agents & automations** – compact JSON with a ready-made `summary` (trendDirection, changePercent) that LLMs and workflows can use directly; works via the Apify API, MCP server, Make, Zapier and n8n.

### How to scrape Google Trends

1. Enter one or more **search terms** (e.g. `chatgpt`, `gemini`).
2. Pick a **location** (`US`, `GB`, `DE`, `US-CA`… or empty for Worldwide) and **time range** (past hour → 2004–present, or a custom date range).
3. Optionally enable **compare terms**, choose a category or search type (Web, Images, News, Shopping, YouTube) and add **Trending Now** countries.
4. Click **Start** and download results as JSON, CSV, Excel or via API.

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

This Actor uses pay-per-event pricing – you only pay for results:

| Event | Price |
|---|---|
| Keyword result (timeline + summary + regions + related queries) | **$0.002** ($2 per 1,000 keywords) |
| Comparison result (up to 5 terms on one scale) | **$0.002** |
| Trending Now search | **$0.0005** ($0.50 per 1,000) |
| Actor start | $0.00005 |

Example: analyzing 100 keywords costs about **$0.20**. Failed keywords are returned as `type: "error"` items and are **not charged**. You can cap spending with the "Maximum cost per run" setting.

### Input example

```json
{
  "searchTerms": ["chatgpt", "gemini", "claude"],
  "geo": "US",
  "timeRange": "today 3-m",
  "compareTerms": true,
  "trendingNowGeos": ["US", "GB"],
  "maxTrendingPerGeo": 10
}
```

Supported time ranges: `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 custom `2024-01-01 2024-12-31`.

### Output example

Keyword result (shortened):

```json
{
  "type": "keyword",
  "searchTerm": "gemini",
  "geo": "US",
  "timeRange": "today 3-m",
  "exploreUrl": "https://trends.google.com/trends/explore?q=gemini&date=today+3-m&geo=US",
  "summary": {"average": 71.81, "peakValue": 100, "peakDate": "2026-10-14", "latestValue": 57, "changePercent": 36.1, "trendDirection": "rising"},
  "interestOverTime": [{"date": "2026-07-18", "timestamp": 1784332800, "value": 45, "isPartial": false}],
  "interestByRegion": [{"geoCode": "US-CA", "geoName": "California", "value": 100}],
  "relatedQueries": {
    "top": [{"query": "gemini ai", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/trends/explore?q=gemini+ai&date=today+3-m"}],
    "rising": [{"query": "gemini 3", "value": 4500, "formattedValue": "Breakout"}]
  }
}
```

Comparison result: `averages` per term, `leader`, and a timeline with `values` for every term. Trending Now result: `rank`, `title`, `approxTraffic` ("1000+"), `approxTrafficNumber`, `pubDate`, `picture` and up to 3 `news` articles.

### Tips

- Values are **relative** (0–100) within each request, exactly as on the Google Trends website. Use **compare terms** to put several terms on one scale.
- Keep **max concurrency** at 1–3. The scraper automatically retries and rotates sessions when Google rate-limits; for very large batches you can enable Apify Proxy.
- Related topics are often returned empty by Google at the moment; related queries are reliable.

### Other China & trend data Actors

- [Weibo Scraper](https://apify.com/cn-data-lab/weibo-scraper) – Weibo Hot Search (微博热搜), posts and comments.
- [Bilibili Scraper](https://apify.com/cn-data-lab/bilibili-scraper) – Bilibili videos, rankings and danmaku.

### Is it legal to scrape Google Trends?

This Actor only collects publicly available, aggregated and anonymized search-interest statistics – no personal data. You are responsible for using the data in accordance with Google's terms and applicable laws. This Actor is not affiliated with or endorsed by Google.

### Support

Found a bug or need a feature? Open an issue on the Issues tab – we usually respond within a day.

# Actor input Schema

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

Keywords or phrases to analyze. Each term returns one result with interest over time, a trend summary, interest by region and related queries/topics.

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

Country or region code, e.g. US, GB, DE, US-CA, JP. Leave empty for Worldwide.

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

Period to analyze.

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2024-01-01 2024-12-31.

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

Google Trends category ID (0 = all categories). Examples: 7 Finance, 18 Shopping, 71 Food & Drink, 174 Sports, 958 Jobs.

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

Which Google search property to use.

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

Countries (Worldwide) or sub-regions (when a country is selected) ranked by interest.

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

Top and rising related search queries.

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

Top and rising related topics (entities). Note: Google currently returns this list empty for many terms; related queries are more reliable.

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

Adds comparison results (groups of up to 5 terms on one relative 0-100 scale), like comparing terms on the Google Trends website.

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

Country codes for daily Trending Now searches with approximate traffic and related news, e.g. US, GB, IN. Can be used without search terms.

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

Maximum Trending Now items per country.

## `maxRegions` (type: `integer`):

Maximum regions returned in interest by region.

## `maxRelatedItems` (type: `integer`):

Maximum items in each related queries/topics list (top and rising).

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

Interface language for topic names and dates, e.g. en-US, de, ja, zh-CN.

## `maxConcurrency` (type: `integer`):

Parallel terms. Keep low (1-3) to avoid Google rate limits.

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

Optional. Usually not needed; enable Apify Proxy if you run very large batches and hit rate limits.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "gemini"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "compareTerms": false,
  "maxTrendingPerGeo": 25,
  "maxRegions": 50,
  "maxRelatedItems": 25,
  "language": "en-US",
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `keywords` (type: `string`):

No description

## `trending` (type: `string`):

No description

## `all` (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": [
        "chatgpt",
        "gemini"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cn-data-lab/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",
        "gemini",
    ],
    "geo": "US",
    "proxyConfiguration": { "useApifyProxy": False },
}

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

```

## MCP server setup

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