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

Google Trends for up to 500 keywords per run: interest over time with peak dates, top and rising related queries, interest by region. Pay only for keywords with data.

- **URL**: https://apify.com/cycha/google-trends-scraper.md
- **Developed by:** [Ken Digital](https://apify.com/cycha) (community)
- **Categories:** SEO tools
- **Stats:** 92 total users, 9 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.00 / 1,000 keywords

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?

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

Scrape **Google Trends** data at scale — interest over time, peak dates, top and rising related queries, and interest by region, for up to 500 keywords per run. Built for SEO professionals, content strategists, and market researchers.

> **New name:** this actor is now `cycha/google-trends-scraper` (it was `joyouscam35875/google-trends-scraper` until 21 October 2026). If an API call or integration stopped working, update the name, or use the actor ID `MEza3W5LSA3hVwvib`, which never changes.

### 💰 Pricing

**$0.005 per keyword**, charged only when Google returns data for it. Keywords with no data (too little search volume) are listed in the results with a note and cost nothing.

### 🎯 What You Get

For each keyword, the actor returns:

- **Interest Over Time** — Daily/weekly/monthly search interest (0–100 scale)
- **Summary columns** — average, peak value, peak date and latest value of interest, top related query, number of rising queries
- **Related Queries** — Top and rising related search terms
- **Interest by Region** — Geographic breakdown by country or sub-region

Related *topics* are not included: Google does not show them to automated visitors (it returns an empty list), so this actor does not pretend to have them.

### 🚀 Use Cases

#### SEO & Content Strategy

- Find trending keywords before your competitors
- Identify seasonal search patterns for content planning
- Discover related queries to expand your keyword clusters

#### Market Research

- Compare brand awareness across regions
- Track industry trend shifts over time
- Identify emerging markets for product launches

#### Competitive Intelligence

- Monitor competitor brand search trends
- Compare multiple products or technologies
- Track market share shifts via search interest

#### Academic & Data Journalism

- Study public interest in events, policies, or phenomena
- Build datasets for research papers
- Visualize trend data for articles and reports

### 📥 Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `keywords` | `string[]` | *required* | Keywords to scrape (up to 500 per run; each one charged only if Google returns data) |
| `timeRange` | `string` | `"today 12-m"` | Time range for data |
| `geo` | `string` | `""` (worldwide) | Country code (US, FR, GB, etc.) |
| `category` | `integer` | `0` | Google Trends category ID |

#### Time Range Options

| Value | Description |
|-------|-------------|
| `now 1-H` | Past hour |
| `now 4-H` | Past 4 hours |
| `now 1-d` | Past day |
| `now 7-d` | Past 7 days |
| `today 1-m` | Past month |
| `today 3-m` | Past 3 months |
| `today 12-m` | Past 12 months |
| `today 5-y` | Past 5 years |
| `all` | All time (2004–present) |

#### Example Input

```json
{
    "keywords": ["artificial intelligence", "machine learning", "deep learning"],
    "timeRange": "today 12-m",
    "geo": "US",
    "category": 0
}
```

### 📤 Output

Each keyword produces one dataset item:

```json
{
    "keyword": "artificial intelligence",
    "timeRange": "today 12-m",
    "geo": "US",
    "scrapedAt": "2026-03-28T21:00:00.000Z",
    "interestOverTime": [
        { "date": "Mar 31 – Apr 6, 2025", "value": 71 },
        { "date": "Apr 7 – Apr 13, 2025", "value": 68 },
        { "date": "Apr 14 – Apr 20, 2025", "value": 75 },
        "..."
    ],
    "relatedQueries": {
        "top": [
            { "query": "ai artificial intelligence", "value": "100" },
            { "query": "chatgpt", "value": "85" },
            { "query": "openai", "value": "62" }
        ],
        "rising": [
            { "query": "claude ai", "value": "+4,500%" },
            { "query": "gemini ai", "value": "+2,800%" }
        ]
    },
    "interestByRegion": [
        { "geoName": "District of Columbia", "value": 100 },
        { "geoName": "Washington", "value": 89 },
        { "geoName": "California", "value": 85 },
        { "geoName": "Massachusetts", "value": 82 }
    ]
}
```

### ⚙️ How It Works

1. Fetches widget tokens from Google Trends explore API
2. Uses tokens to request each data type (time series, geo, related searches)
3. Parses and normalizes the response data
4. Random delays (1–3s) between requests to respect rate limits
5. Exponential backoff on rate limiting (HTTP 429)

### 🔧 Technical Details

- **HTTP/2** for faster, more efficient connections
- **Session cookies** for proper authentication
- **Exponential backoff** with jitter on rate limits
- **Graceful error handling** — partial results are still saved

### 💡 Tips

- **Up to 500 keywords per run**, each fetched on its own. Keywords Google has no data for are listed in the results but not charged
- **Use country codes** (ISO 3166-1 alpha-2) for regional filtering
- **Longer time ranges** return weekly/monthly aggregates; shorter ranges give hourly/daily data
- **Category filtering** narrows results — find category IDs on Google Trends
- **Schedule runs** to track trends over time and build historical datasets

### 📊 Integrations

Export your data to:

- Google Sheets / Excel for visualization
- BigQuery / Snowflake for analytics pipelines
- Slack / Email via Apify webhooks for alerts on trending topics
- Custom dashboards via the Apify API

### 🏷️ Tags

`google-trends` `seo` `keyword-research` `market-research` `trending` `search-trends` `content-strategy` `competitive-intelligence`

### 🔗 Quick Integration

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("cycha/google-trends-scraper").call(run_input={...})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('cycha/google-trends-scraper').call({...});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### No-code: Make / Zapier / n8n

Search for this actor in the Apify connector. No code needed.

***

### Related actors by the same developer

| Actor | What it does |
|---|---|
| [Google News & RSS Scraper](https://apify.com/cycha/rss-news-aggregator) | Articles by keyword, language and country, or from any feed |
| [Website Content Crawler](https://apify.com/cycha/website-content-crawler) | Any website as clean Markdown for AI and RAG |
| [Amazon Scraper](https://apify.com/cycha/amazon-scraper) | Search results and product details in 17 countries |
| [Google Maps Scraper](https://apify.com/cycha/google-maps-scraper) | Local businesses with phone, website and emails, no API key |
| [YouTube Channel Scraper](https://apify.com/cycha/youtube-channel-scraper) | All videos and Shorts of a channel with stats |

# Actor input Schema

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

Keywords to get Google Trends data for. Each keyword is fetched separately (interest over time, related queries, interest by region). Up to 500 per run.

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

Time range for the trend data.

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

ISO 3166-1 alpha-2 country code (e.g. US, FR, GB). Leave empty for worldwide.

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

Google Trends category ID. 0 = All categories. See Google Trends for category IDs.

## Actor input object example

```json
{
  "keywords": [
    "python",
    "javascript"
  ],
  "timeRange": "today 12-m",
  "geo": "",
  "category": 0
}
```

# Actor output Schema

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

One row per keyword: interest over time, regions, related queries and topics.

# 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": [
        "python",
        "javascript"
    ]
};

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

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

```

## MCP server setup

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