# Google Trends Scraper (`rsiddiq95/google-trends-scraper`) Actor

Get Google Trends data: interest over time, interest by region, related queries, and Trending Now searches. Polite automatic retries, and failed lookups are never charged.

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

## Pricing

from $2.50 / 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

## Google Trends Scraper

Get Google Trends data for any list of keywords: **interest over time**, **interest by region** (countries, states, cities or US metro areas), **top and rising related searches**, and today's **Trending Now** searches with traffic estimates and news links.

You pay only for keywords that return data. Failed lookups, and keywords Google has no data for, are free.

### What can this Google Trends Scraper do?

- 📈 **Interest over time.** The 0–100 search interest timeline for any period, from the past hour to 2004 onward, or exact dates you choose.
- 🗺️ **Interest by region.** See where a keyword is most popular, by country, state/region, city, or US metro area (DMA).
- 🔎 **Related searches.** Top and rising queries, with "Breakout" flags for searches that grew more than 5,000%.
- ⚖️ **Comparisons.** Compare up to 5 keywords on the same scale, just like typing them together on Google Trends.
- 🔥 **Trending Now.** The searches trending right now in any country, with approximate traffic and the news stories behind them.
- 🎯 **Filters.** Location, category, and search type (web, images, news, Google Shopping, YouTube).
- 💸 **Fair billing.** Errors and empty results are never charged.

### What data can I get from Google Trends?

| Field | Example |
|---|---|
| Search term | `air fryer` |
| Average interest | `65` |
| Interest over time | weekly or daily points with date, label and 0–100 value |
| Interest by region | `Wyoming: 100`, `Nebraska: 36`, … |
| Related searches (top) | `air fryer chicken: 100`, `air fryer oven: 70` |
| Related searches (rising) | `best air fryer 2026: Breakout` |
| Trending search | `sndk stock`, `2000+` searches, 3 news links |
| Google Trends URL | link to the same query on trends.google.com |

### How to scrape Google Trends

1. Click **Try for free**.
2. Enter your **search terms**, one per line.
3. Optionally pick a **location** (for example `US` or `US-CA`), a **time range**, and a **category**.
4. Turn on **Compare terms against each other** if you want keywords on the same scale.
5. Click **Start**, then download your data as JSON, CSV, Excel, or HTML, or pull it through the API.

### Input example

```json
{
    "searchTerms": ["air fryer", "standing desk"],
    "geo": "US",
    "timeRange": "today 12-m",
    "regionResolution": "REGION",
    "trendingNowGeos": ["US", "GB"]
}
```

### Output example

```json
{
    "resultType": "keyword",
    "hasData": true,
    "searchTerm": "air fryer",
    "comparedWith": [],
    "geo": "US",
    "timeRange": "today 12-m",
    "category": 0,
    "searchProperty": "web",
    "averageInterest": 65,
    "interestOverTime": [
        { "date": "2025-10-26T00:00:00.000Z", "label": "Oct 26 – Nov 1, 2025", "value": 52, "hasData": true, "isPartial": false }
    ],
    "interestByRegion": [{ "geoCode": "US-WY", "geoName": "Wyoming", "value": 100, "hasData": true }],
    "relatedQueries": {
        "top": [{ "query": "air fryer chicken", "value": 100, "formattedValue": "100", "isBreakout": false }],
        "rising": [{ "query": "best air fryer 2026", "value": 6050, "formattedValue": "Breakout", "isBreakout": true }]
    },
    "trendsUrl": "https://trends.google.com/trends/explore?q=air+fryer&date=today+12-m&hl=en-US&geo=US",
    "scrapedAt": "2026-10-29T20:29:12.206Z"
}
```

Trending Now rows have `resultType: "trending"` with `rank`, `title`, `approxTraffic`, `startedAt`, `pictureUrl` and `newsItems`.

### Use it from AI agents (Claude, ChatGPT, Cursor)

AI assistants can run this Actor as a tool through [Apify's MCP server](https://docs.apify.com/platform/integrations/mcp). Add this server URL to any MCP client:

```
https://mcp.apify.com?tools=rsiddiq95/google-trends-scraper
```

Then just ask, for example: *"Compare Google Trends interest in "air fryer" vs "slow cooker" in the US over the last 12 months."* Agent runs cost the same per result as runs from the console.

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

This Actor uses pay-per-result pricing, so you only pay for keywords and trending searches that return data. See the **Pricing** tab for current prices. Apify's free plan includes monthly credit, enough to try the Actor on hundreds of keywords.

### Tips

- **Values are relative.** Google scales every result from 0 to 100 within the query, where 100 is the peak. Compare keywords on the same scale by turning on **Compare terms against each other**.
- **Use exact dates for repeatable reports.** A custom range such as `2025-01-01 2025-12-31` returns the same window every time.
- **Large lists.** The Actor paces itself and retries automatically when Google rate-limits it. For thousands of keywords, schedule several smaller runs.

### Limitations

- Google Trends has no official public API yet, so this Actor reads the public Google Trends website. Google can change it at any time; we monitor the Actor and update it when that happens.
- Related topics are not included, because Google does not provide them to automated tools.
- The Trending Now feed lists the top trending searches Google publishes for each country, usually about 10–20.

### Works well with

- **[Google Sheets Sync](https://apify.com/rsiddiq95/google-sheets-sync):** send each run's keywords to a Google Sheet automatically and keep a growing trends log without duplicates.
- **[Google Ads Transparency Scraper](https://apify.com/rsiddiq95/google-ads-transparency-scraper):** see which competitors are advertising on the keywords that are trending.

### FAQ

**Is it legal to scrape Google Trends?**
This Actor collects aggregated, anonymous search statistics that Google publishes openly, with no personal data. Make sure your use complies with Google's terms and the laws that apply to you.

**Can I use it through the API or with other tools?**
Yes. Run it through the Apify API, on a schedule, or connect it to Make, Zapier, n8n, Google Sheets, and more through Apify integrations.

**Something isn't working.**
Open an issue on the **Issues** tab with your input, and we'll respond quickly.

# Actor input Schema

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

Keywords or phrases to look up on Google Trends. Each term becomes one result row.

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

When on, terms are compared in groups of up to 5 (like typing them together on Google Trends), so values are relative across the group. When off, each term is scaled on its own.

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

Country or region code such as US, GB, DE or US-CA. Leave empty for worldwide.

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

Period to analyze. Ignored when a custom time range is set.

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

Optional exact dates in the format YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-12-31.

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

Google Trends category ID to narrow results, for example 71 for Food & Drink. 0 means all categories.

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

Which Google property to measure.

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

Include the timeline of search interest (0-100).

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

Include search interest broken down by country, state, or city.

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

Include top and rising related searches.

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

Granularity for interest by region. Auto uses Google's default for the chosen location.

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

Also return regions where search volume is low.

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

Country codes (for example US, GB) to fetch the current Trending Now searches for, with traffic estimates and news links.

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

Interface language for labels and topic names, for example en-US or de-DE.

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

How many terms to fetch in parallel. Higher is faster but more likely to be rate-limited.

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

Proxy servers used to reach Google Trends.

## Actor input object example

```json
{
  "searchTerms": [
    "air fryer",
    "standing desk"
  ],
  "compareTerms": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "customTimeRange": "",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "regionResolution": "",
  "includeLowVolumeRegions": false,
  "trendingNowGeos": [],
  "language": "en-US",
  "maxConcurrency": 2,
  "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 = {
    "searchTerms": [
        "air fryer",
        "standing desk"
    ],
    "geo": "US",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rsiddiq95/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": [
        "air fryer",
        "standing desk",
    ],
    "geo": "US",
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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