# Google Trends Scraper — Fast, No Browser (`datafabrik/google-trends-scraper`) Actor

Scrape Google Trends in seconds: interest over time, interest by country/region/city, related queries (top & rising) and Trending Now. Compare up to 5 terms. HTTP-only, residential proxies, auto-retries. Pay only for results with data.

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

## Pricing

Pay per event

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 — fast, no browser, pay only for data

Get Google Trends data as clean JSON, CSV or Excel in seconds: **interest over time**, **interest by country, region, metro or city**, **related queries (top & rising)** and **Trending Now** (the daily trending searches of any country). Compare up to 5 terms on the same scale, filter by category and by Google property (Web, YouTube, News, Images, Shopping).

Google Trends has no public API. This Actor talks to the same endpoints as the Google Trends website, over plain HTTP — no headless browser — so a report takes a few seconds instead of minutes.

### Why this scraper

- **Fast**: HTTP only, several searches in parallel, each through its own residential IP.
- **Reliable**: when Google rate-limits (HTTP 429), the Actor switches IP, refreshes its session and backs off automatically. Partial results are kept.
- **Fair billing**: you pay per report that contains data. Searches that return nothing (too little search volume) or fail are saved in the dataset for transparency and **not charged**.
- **Everything in one run**: explore reports and Trending Now for several countries, in the same dataset.
- **Two output layouts**: one nested report per search (for APIs and code), or flat rows (one row per date, region or query) ready for Excel, CSV and Google Sheets.
- **Works with Google Trends URLs**: paste any `trends.google.com/trends/explore` or `/trending` link.
- **AI-agent ready**: usable from Claude, ChatGPT, Cursor and other MCP clients through the Apify MCP server.

### What you can use it for

- Keyword research and SEO content planning (rising queries show what people start searching for).
- Product and market research: seasonality, regional demand, brand comparisons.
- News and social monitoring with Trending Now, every hour if you schedule it.
- Data science: long time series (2004 → today) for forecasting models.

### Input

| Field | What it does |
|---|---|
| `searchTerms` | One report per line. Compare terms by putting up to 5 on one line, separated by commas: `bitcoin, ethereum`. Topic IDs such as `/m/05p0rrx` work too. |
| `startUrls` | Google Trends URLs. Terms, location, dates, category and search type are read from the URL. `/trending` URLs are also accepted. |
| `geo` | ISO country or region code (`US`, `FR`, `US-CA`). Empty = worldwide. |
| `timeRange` | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or since 2004. |
| `customTimeRange` | Exact period, `2025-01-01 2025-06-30` (or hourly `2026-09-01T00 2026-09-03T00`). Overrides `timeRange`. |
| `category` | Google Trends category ID (0 = all), as in the `cat=` parameter of a Trends URL. |
| `searchType` | `web`, `images`, `news`, `shopping` or `youtube`. |
| `dataTypes` | Any of `interestOverTime`, `interestByRegion`, `relatedQueries`. |
| `regionResolution` | `auto`, `COUNTRY`, `REGION`, `DMA` (US metro areas) or `CITY`. |
| `includeLowVolumeRegions` | Also list regions with too little data (value `null`). |
| `outputLayout` | `report` (one item per search) or `rows` (flat, spreadsheet-friendly). Same price. |
| `language` | Google interface language (`en-US`, `fr`, `de`…) for labels and formatted dates. |
| `timezoneOffsetMinutes` | Google's `tz` parameter (UTC+2 → `-120`). Default 0 = UTC. |
| `trendingGeos` | Countries for Trending Now (`US`, `GB`, `IN`…). Empty = skip. |
| `trendingHours` | Trends started in the past 4, 24, 48 or 168 hours. |
| `trendingCategory` | Keep one category only (Sports, Technology, Politics…). |
| `trendingActiveOnly` | Skip trends that have already ended. |
| `trendingMaxItems` | Max trending searches per country, sorted by search volume (0 = all). |
| `proxy` | Residential proxies by default (included in the price). |
| `maxConcurrency` | Searches run in parallel (default 3). |
| `maxRetries` | Retries per request on rate limits (default 6). |

#### Example

```json
{
  "searchTerms": ["bitcoin, ethereum", "solar panels"],
  "geo": "US",
  "timeRange": "today 12-m",
  "dataTypes": ["interestOverTime", "interestByRegion", "relatedQueries"],
  "trendingGeos": ["US", "GB"]
}
```

### Output

#### Report (one per search)

```json
{
  "type": "explore",
  "status": "ok",
  "searchTerm": "bitcoin, ethereum",
  "searchTerms": ["bitcoin", "ethereum"],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "averages": { "bitcoin": 35, "ethereum": 5 },
  "interestOverTime": [
    { "date": "2025-09-21T00:00:00.000Z", "timestamp": 1758412800, "formattedTime": "Sep 21 – 27, 2025",
      "values": { "bitcoin": 27, "ethereum": 6 }, "isPartial": false }
  ],
  "regionResolution": "REGION",
  "interestByRegion": [
    { "geoCode": "US-WY", "geoName": "Wyoming", "values": { "bitcoin": 81, "ethereum": 19 }, "leader": "bitcoin" }
  ],
  "relatedQueries": {
    "bitcoin": {
      "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/trends/explore?q=..." }],
      "rising": [{ "query": "…", "value": 14650, "formattedValue": "Breakout", "isBreakout": true, "link": "…" }]
    }
  },
  "googleTrendsUrl": "https://trends.google.com/trends/explore?q=bitcoin%2Cethereum&date=today+12-m&hl=en-US&geo=US",
  "scrapedAt": "2026-09-24T08:00:00.000Z"
}
```

Values are Google's relative interest (0–100, where 100 is the peak for the chosen terms, place and period). When several terms are compared, regional values are the share of each term in that region (they add up to 100 %). The last point of a series can be `isPartial: true` (period still in progress).

#### Trending now (one item per trending search)

```json
{
  "type": "trendingNow",
  "rank": 1,
  "title": "…",
  "geo": "US",
  "startedAt": "2026-09-24T02:40:00.000Z",
  "endedAt": null,
  "isActive": true,
  "searchVolume": 200000,
  "searchVolumeFormatted": "200K+",
  "increasePercentage": 1000,
  "relatedQueries": ["…"],
  "categories": ["Sports"],
  "exploreUrl": "https://trends.google.com/trends/explore?q=…",
  "timeWindowHours": 24
}
```

The dataset has three ready-made views: **Reports**, **Trending now** and **Flat rows**.

### Pricing

Pay per event, no subscription:

- **Report**: one per search line (single term or comparison of up to 5), with all the data types you selected — **$2.50 per 1,000 reports**.
- **Trending search**: one per trending search returned — **$0.30 per 1,000**.

Residential proxies and compute are included. Reports with no data and failed requests are free. Set a maximum cost per run in the Apify Console and the Actor stops cleanly when it is reached.

### Good to know

- **Related topics** are not offered: Google withholds them from automated clients, so we would rather not sell something that comes back empty.
- **Rate limits**: Google Trends limits requests per IP. Keep `maxConcurrency` at 3–5 for large batches; the Actor handles retries for you.
- **Values are relative**, not absolute search counts. Only Trending Now gives an approximate search volume.
- **Legal**: the Actor collects aggregated, public, non-personal statistics. You are responsible for using the data in line with Google's terms and the laws that apply to you.

### Support

Found a bug or need a field? Open an issue on the Actor's **Issues** tab — it is monitored daily and fixes ship fast.

# Actor input Schema

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

One report per line. To compare terms on the same chart, put up to 5 on one line separated by commas, e.g. "bitcoin, ethereum". Topic IDs such as "/m/05p0rrx" also work.

## `startUrls` (type: `array`):

Optional. Paste trends.google.com/trends/explore URLs (terms, location, dates, category and search type are read from the URL) or trends.google.com/trending URLs.

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

ISO country code ("US", "FR", "DE"…) or region code ("US-CA", "FR-J"). Leave empty for worldwide. Applies to search terms, not to URLs.

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

Period to analyse. Short ranges give finer detail (per minute / hour); long ranges give weekly or monthly points.

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

Format "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-06-30". Hourly ranges: "2026-09-01T00 2026-09-03T00".

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

Google Trends category (0 = all). Examples: 7 Finance, 71 Food & Drink, 174 Sports, 5 Computers & Electronics, 958 Jobs. Copy it from the "cat=" parameter of a Google Trends URL.

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

Which Google property the interest is measured on.

## `dataTypes` (type: `array`):

Sections included in each report.

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

Granularity of interest by region. "Auto" = countries for worldwide, subregions (states) for a country. Metro (DMA) exists only for the US.

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

Also return regions where Google has too little data (values are null).

## `outputLayout` (type: `string`):

"One report per search" keeps everything together (best for JSON/API). "Flat rows" writes one row per date, region or query (best for Excel, CSV, Google Sheets). Price is the same.

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

Interface language used by Google for labels and formatted dates (hl), e.g. en-US, fr, de, es.

## `timezoneOffsetMinutes` (type: `integer`):

Google's tz parameter: minutes behind UTC (UTC+2 → -120, UTC-5 → 300). 0 = UTC. Affects how hourly data is bucketed.

## `trendingGeos` (type: `array`):

Get what is trending right now on Google in these countries (ISO codes: US, GB, FR, IN…). Leave empty to skip.

## `trendingHours` (type: `string`):

Trends that started within this window.

## `trendingCategory` (type: `string`):

Keep only one category.

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

Skip trends that have already ended.

## `trendingMaxItems` (type: `integer`):

0 = all (240 for the US over 24 h when tested). Sorted by search volume.

## `proxy` (type: `object`):

Google blocks datacenter IPs quickly; residential proxies are recommended and included in the price.

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

Reports fetched in parallel, each through its own proxy IP.

## `maxRetries` (type: `integer`):

On rate limits (HTTP 429) the scraper switches IP and backs off exponentially.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin, ethereum",
    "solar panels"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "regionResolution": "auto",
  "includeLowVolumeRegions": false,
  "outputLayout": "report",
  "language": "en-US",
  "timezoneOffsetMinutes": 0,
  "trendingHours": "24",
  "trendingCategory": "0",
  "trendingActiveOnly": false,
  "trendingMaxItems": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 3,
  "maxRetries": 6
}
```

# Actor output Schema

## `reports` (type: `string`):

No description

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

No description

## `summary` (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": [
        "bitcoin, ethereum",
        "solar panels"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datafabrik/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": [
        "bitcoin, ethereum",
        "solar panels",
    ],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datafabrik/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": [
    "bitcoin, ethereum",
    "solar panels"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datafabrik/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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