# Google Trends Scraper - Keyword Research + Trending now (`igeniaiservices/google-trends-scraper`) Actor

Reliable Google Trends data as JSON/CSV: interest over time, by region, related queries & topics — PLUS the live Trending Now feed for 40+ countries. Built for stability: session rotation and backoff instead of failed runs.

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

## Pricing

from $3.00 / 1,000 trends results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Google Trends Scraper

Get **Google Trends data as clean JSON**: interest over time, interest by region, related queries, and related topics — for up to 100 search terms per run, any country, any time range, web/YouTube/news/images/shopping.

Built for one thing above all: **runs that finish**. Google rate-limits Trends aggressively, and most Trends scrapers fail a large share of their runs because of it. This actor treats reliability as the product:

- 🔄 **Automatic session rotation** — every retry gets a fresh browser fingerprint, fresh cookies, and (on the platform) a fresh proxy IP.
- ⏳ **Exponential backoff with jitter** instead of hammering until blocked.
- 🧩 **Per-term isolation** — one blocked keyword never kills the other 99. You get every result that could be fetched, plus an honest `RUN_SUMMARY` listing anything that couldn't.
- 🚫 **No fake successes** — a run that produced zero data exits as FAILED, so your monitoring and schedules can trust the run status.

### What you get

| Data type | Description |
|---|---|
| **Interest over time** | The Trends curve (0–100) at the finest resolution Google offers for your range: hourly, daily, or weekly points |
| **Interest by region** | Scores per country, region, or city |
| **Related queries** | Top + rising queries, with "Breakout" markers and links |
| **Related topics** | Top + rising topics with topic types |
| **Trending Now** | Today's live trending searches per country (40+ geos) with approximate traffic and related news articles |

**One actor for both jobs.** Most Google Trends actors do *either* keyword research *or* the trending feed — this does both in a single run: analyze specific keywords **and** pull the live Trending Now list, together.

### Input example

```json
{
    "searchTerms": ["bitcoin", "ethereum", "solana"],
    "geo": "US",
    "timeRange": "today 12-m",
    "dataTypes": ["TIMESERIES", "RELATED_QUERIES"],
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

- `trendingNowGeos` — country codes for the live Trending Now feed, e.g. `["US","GB","DE"]` (works with or without `searchTerms`)
- `geo` — country (`US`, `DE`, `NL`…), region (`US-NY`), or empty for Worldwide
- `timeRange` — `now 1-H` … `today 5-y`, `all`, or a custom `"2024-01-01 2024-12-31"` via `customTimeRange`
- `category` — any Google Trends category id (0 = all)
- `property` — web (default), `youtube`, `news`, `images`, or `froogle` (Shopping)
- `languageCode` — localizes related queries/topics (`en-US`, `de-DE`, `pt-PT`, …)

### Output example (one dataset item per term per data type)

```json
{
    "searchTerm": "bitcoin",
    "geo": "US",
    "timeRange": "today 12-m",
    "dataType": "TIMESERIES",
    "timeline": [
        { "date": "Aug 24 – 30, 2025", "timestamp": 1724457600, "value": 29, "isPartial": false }
    ]
}
```

Related queries items carry `top` and `rising` arrays with values, formatted values (`+250%`, `Breakout`), and deep links back to Google Trends.

### Use cases

- **SEO & content research** — spot rising queries before they peak; feed keyword pipelines.
- **Market & brand monitoring** — track demand for brands, products, or tickers per country on a schedule.
- **Data science & forecasting** — clean numeric time series for models, dashboards (Looker, Power BI), or spreadsheets.
- **E-commerce** — seasonality curves per product category and region.

### Reliability tips

- Use **residential proxies** (the default proxy setting) — datacenter IPs get rate-limited by Google far more often.
- Keep runs under a few hundred term×datatype combinations; schedule bigger jobs as multiple runs.
- Check the `RUN_SUMMARY` key-value record: it lists per-term failures explicitly instead of hiding them.

### FAQ

**Why do values max at 100?** Google Trends reports relative interest, scaled so the range's peak = 100. That's the same data the Trends UI shows.

**Can it compare terms on one scale?** Each term is currently fetched independently (own 0–100 scale). Cross-term comparison on a shared scale is on the roadmap — until then, comparisons can be approximated by normalizing on overlapping periods.

**Is scraping Google Trends legal?** This actor only accesses publicly available data, the same data anyone sees at trends.google.com. You're responsible for using the data in line with applicable laws and Google's terms.

# Actor input Schema

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

Keywords to get Google Trends data for (max 100 per run). Each term is fetched independently, so one blocked term never fails the whole run.

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

Two-letter country code (e.g. US, GB, DE), a region code (e.g. US-NY), or empty for Worldwide.

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

Standard Google Trends range, or a custom range like "2024-01-01 2024-12-31".

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

Optional. Overrides Time range. Format: "YYYY-MM-DD YYYY-MM-DD".

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

Google Trends category id (0 = all categories).

## `property` (type: `string`):

Which Google property to get trends for.

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

Which datasets to fetch per term.

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

Also fetch the live 'Trending Now' feed for these country codes (e.g. US, GB, DE, BR). Returns today's trending searches with approximate traffic and related news. Works with or without search terms.

## `languageCode` (type: `string`):

hl parameter, e.g. en-US, de-DE, pt-PT.

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

Minutes west of UTC (Google's tz parameter). 0 = UTC.

## `maxRetriesPerTerm` (type: `integer`):

How often to retry a rate-limited request with a fresh session before giving up on a term.

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

Proxies to use. Residential proxies are strongly recommended for reliability.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "dataTypes": [
    "TIMESERIES"
  ],
  "trendingNowGeos": [],
  "languageCode": "en-US",
  "timezoneOffsetMinutes": 0,
  "maxRetriesPerTerm": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped Google Trends items — interest over time, by region, related queries/topics and Trending Now feeds.

## `runSummary` (type: `string`):

Per-run counts and any failed terms.

# 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"
    ]
};

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

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

```

## MCP server setup

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