# Google Trends API & Scraper - No 429 Errors (`signalmine/google-trends-scraper`) Actor

Google Trends API: interest over time, interest by region (country/state/city/DMA) and top + rising related queries for any keyword. Compare up to 5 terms. Reliable pytrends alternative with automatic retries on 429. $0.003 per term, pay only for results. Works via API and MCP.

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

## Pricing

$3.00 / 1,000 search term 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 — reliable, no 429 errors

Extract **Google Trends** data for any keyword: **interest over time**, **interest by region** (country, state, city, metro), and **related queries** (top and rising, including *Breakout* terms). Compare up to 5 terms side by side, exactly like the comparison view on trends.google.com.

Built for reliability first. Most Google Trends scrapers fail on Google's `429 Too Many Requests` limit. This one runs every search term inside a warmed-up browser-like session and, if Google pushes back, automatically restarts that term on a fresh session and IP. **You only pay for terms that return data** — failed terms are never charged.

### What you can use it for

- **SEO & content planning** – find rising queries before they peak and time content by seasonality.
- **E-commerce & product research** – validate demand for a product or niche by country or state.
- **Market & investment research** – track brand, ticker or category interest over years.
- **Marketing** – compare competitors' brand interest and pick regions for campaigns.
- **Data pipelines & AI agents** – schedule it daily, call it via API, or use it as an MCP tool from Claude, Cursor and other AI clients.

### Features

- ✅ Interest over time for any range: past hour → 2004-present, or custom dates
- ✅ Interest by region with selectable resolution (country / region / city / DMA)
- ✅ Related queries — top **and** rising, with Breakout flag
- ✅ Regions sorted by interest, low-volume regions filtered out (optional)
- ✅ Compare up to 5 terms in one request (relative values), or look up terms independently
- ✅ Web, Image, News, Google Shopping and YouTube search types
- ✅ Any category ID and interface language
- ✅ Parallel sessions and automatic session rotation on rate limits
- ✅ Pay only for successful results

### Input

| Field | Description |
|---|---|
| `searchTerms` | List of keywords, e.g. `["chatgpt", "claude ai"]` |
| `compareTerms` | `true` groups terms in batches of 5 so values are relative to each other |
| `geo` | Location code: `US`, `GB`, `DE`, `US-CA`, `AU-NSW`… Empty = worldwide |
| `timeRange` | `past_hour`, `past_day`, `past_7_days`, `past_30_days`, `past_90_days`, `past_12_months`, `past_5_years`, `all_time` |
| `customStartDate` / `customEndDate` | Optional `YYYY-MM-DD` range, overrides `timeRange` |
| `category` | Google Trends category ID (0 = all) |
| `searchProperty` | `""` web, `images`, `news`, `froogle` (Shopping), `youtube` |
| `include*` | Toggle interest over time, interest by region and related queries |
| `regionResolution` | `COUNTRY`, `REGION`, `CITY`, `DMA` |

Example:

```json
{
  "searchTerms": ["bitcoin", "ethereum", "solana"],
  "compareTerms": true,
  "geo": "US",
  "timeRange": "past_90_days"
}
```

### Output

One dataset item per search term (or per comparison group):

```json
{
  "searchTerm": "bitcoin vs ethereum vs solana",
  "searchTerms": ["bitcoin", "ethereum", "solana"],
  "geo": "US",
  "timeRange": "today 3-m",
  "averages": { "bitcoin": 53, "ethereum": 8, "solana": 8 },
  "interestOverTime": [
    { "time": 1782172800, "date": "Jun 23", "formattedTime": "Jun 23, 2026", "isPartial": false,
      "bitcoin": 86, "ethereum": 15, "solana": 15 }
  ],
  "interestByRegion": [
    { "geoCode": "US-SD", "geoName": "South Dakota", "bitcoin": 87, "ethereum": 6, "solana": 7 }
  ],
  "relatedQueries": {
    "bitcoin": {
      "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100",
                "link": "https://trends.google.com/trends/explore?q=bitcoin+price&date=today+3-m&geo=US" }],
      "rising": [{ "query": "british man recovers lost bitcoin", "value": 10150, "formattedValue": "Breakout", "breakout": true }]
    }
  },
  "scrapedAt": "2026-09-23T10:00:00+00:00"
}
```

Download as JSON, CSV, Excel or HTML, or read it through the Apify API.

### Pricing

Pay per event: **$0.003 per search term** that returns data (all sections included). 1,000 terms ≈ $3. Failed terms are free.

### Tips

- Values are relative (0–100) *within one request*. To compare terms against each other, turn on **Compare terms**.
- Very niche terms may return few or no related queries — that is how Google Trends behaves, not an error.
- Keep the default residential proxy for the best success rate.
- **Related topics** are not included: Google only serves them to sessions that pass an interactive reCAPTCHA check, which this Actor deliberately does not bypass.

### FAQ

**Is scraping Google Trends legal?** This Actor collects only publicly available, aggregated and anonymous data from Google Trends. It does not collect personal data. You are responsible for using the data in compliance with applicable laws and Google's terms.

**Something not working or a feature missing?** Open an issue on the Issues tab and it will be looked at quickly.

# Actor input Schema

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

Keywords or topics to look up. Each term becomes one result (or groups of up to 5 when 'Compare terms' is on).

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

Group terms in batches of up to 5 so values are relative to each other (like the comparison view on trends.google.com).

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

Country or region code, e.g. US, GB, ES, US-CA, AU-NSW. Leave empty for worldwide.

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

Period to analyse. Ignored when a custom start date is set.

## `customStartDate` (type: `string`):

Optional YYYY-MM-DD. Overrides 'Time range'.

## `customEndDate` (type: `string`):

Optional YYYY-MM-DD. Defaults to today.

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

Google Trends category ID (0 = all categories).

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

Which Google search product the interest refers to.

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

Timeline of search interest (0-100).

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

Search interest per country, region, city or metro.

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

Granularity for interest by region. Leave empty for Google's default.

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

Keep regions where Google reports not enough data (value null).

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

Top and rising related search queries, including Breakout terms.

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

Language for topic names and dates, e.g. en-US, es-ES, de-DE.

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

How many independent sessions run in parallel.

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

How many fresh sessions to try per term before giving up (failed terms are not charged).

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

Residential proxies give the highest success rate against Google's rate limits.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt",
    "claude ai"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "past_12_months",
  "category": 0,
  "searchProperty": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeLowVolumeRegions": false,
  "includeRelatedQueries": true,
  "language": "en-US",
  "maxConcurrency": 3,
  "maxRetries": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per search term (or comparison group) with interest over time, interest by region and related queries.

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

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

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

```

## MCP server setup

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