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

Get Google Trends data for any keywords: interest over time, interest by region and related queries. Compare keywords on one scale, batch many keywords, countries and time ranges. Fast HTTP, no browser.

- **URL**: https://apify.com/tidyscrape/google-trends-scraper.md
- **Developed by:** [Alexander Burch](https://apify.com/tidyscrape) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 keyword reports

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: Interest, Regions & Related Queries

Get Google Trends data for any keywords: **interest over time, interest by region, and top and
rising related queries**. Compare up to 5 keywords on one 0-100 scale, and batch many keywords,
countries and time ranges in one run. Fast plain-HTTP scraper, no browser, so runs finish in
seconds instead of looping until they time out. Export to JSON, CSV or Excel, or call it from your
code, Make, Zapier, n8n, or an AI agent via MCP.

### What data can you get?

One result per keyword × country × time range:

| Field | Example |
|---|---|
| `keyword` | sourdough starter |
| `geo` / `timeframe` | US / today 12-m |
| `averageInterest`, `peakInterest`, `peakDate`, `latestInterest` | 59.7, 100, 2026-01-18, 46 |
| `trendPct` (last quarter vs first quarter of the period) | -13.8 |
| `interestOverTime` | 53 weekly points `{date, value, isPartial}` |
| `interestByRegion` | 51 US states `{geoCode, geoName, value}` |
| `relatedQueriesTop` | make sourdough starter (100), sourdough bread starter (78)… |
| `relatedQueriesRising` | costco sourdough starter kit (+1,900%)… |
| `comparedWith` | other keywords on the same scale |
| `exploreUrl` | the same view on trends.google.com |

<details><summary>Sample output (1 item, series shortened)</summary>

```json
{
    "keyword": "sourdough starter",
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "property": "web",
    "comparedWith": [],
    "hasData": true,
    "averageInterest": 59.7,
    "peakInterest": 100,
    "peakDate": "2026-01-18",
    "latestInterest": 46,
    "trendPct": -13.8,
    "interestOverTime": [
        {
            "date": "2025-09-28",
            "value": 41,
            "isPartial": false
        },
        {
            "date": "2026-09-27",
            "value": 51,
            "isPartial": true
        }
    ],
    "interestByRegion": [
        {
            "geoCode": "US-WY",
            "geoName": "Wyoming",
            "value": 100
        }
    ],
    "relatedQueriesTop": [
        {
            "query": "make sourdough starter",
            "value": 100,
            "formattedValue": "100"
        }
    ],
    "relatedQueriesRising": [
        {
            "query": "oregon trail sourdough starter free",
            "value": 300,
            "formattedValue": "+300%"
        }
    ],
    "exploreUrl": "https://trends.google.com/trends/explore?q=sourdough+starter&date=today+12-m&geo=US",
    "scrapedAt": "2026-09-28T21:47:09.325Z"
}
```

</details>

### How much does it cost?

**$5 per 1,000 keyword reports** (timeline + regions + related queries in one result) plus $0.005
per run. No hidden compute charges. Example: 100 keywords in one country for the last 12 months
≈ **$0.51**. Apify's free plan credits cover a first test.

Other Trends scrapers charge per timeline point or per row, so one keyword can cost 25x more
there. Here one keyword is one result.

### How to use it

1. Enter **Keywords**.
2. Pick **Countries / regions** (`US`, `GB`, `US-CA`; empty = worldwide) and **Time ranges**
   (`today 12-m`, `now 7-d`, `today 5-y`, `all`, or `2024-01-01 2024-12-31`).
3. Turn on **Compare keywords on one scale** to see them side by side like Google Trends' Compare.
4. Run, then download the dataset.

**API:** `POST https://api.apify.com/v2/acts/tidyscrape~google-trends-scraper/run-sync-get-dataset-items`

```json
{ "keywords": ["coffee", "tea", "matcha"], "compare": true, "geos": ["US", ""], "timeframes": ["today 12-m"] }
```

**AI agents:** available through the Apify MCP server with fully described inputs and outputs.

### Use cases

- **SEO and content planning:** find rising queries and seasonal peaks before you write.
- **Market research:** compare brands, products or categories across countries.
- **Demand forecasting:** feed weekly interest series into models and dashboards.
- **Trend monitoring:** schedule daily runs and alert on `trendPct` or new "Breakout" queries.

### FAQ

**What is "interest"?** Google Trends does not give search volumes. Values are relative, 0-100,
where 100 is the peak for that keyword (or for the compared group) in that geo and time range.

**Why not related topics?** Google returns an empty related-topics list to every automated client,
so no scraper can get it reliably without logging in. We do not log in, so we leave it out rather
than return empty or hang.

**Why do results differ slightly from run to run?** Google Trends computes interest from a sample
of searches, so repeated requests (in the browser too) can show slightly different values and lower
related-query entries. The top entries and the overall shape are stable.

**Why do some keywords have `hasData: false`?** Google has too little search volume for them in that
geo and period. Try a broader geo or longer time range.

**Is it legal?** Google Trends data is public, aggregated and anonymized; this Actor collects it
without logging in. You are responsible for how you use it. Not affiliated with Google.

**Something broke or a field is missing?** Open an Issue. We usually respond within a day.

### Changelog

- 2026-09-28: first release.

# Actor input Schema

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

Search terms to get Trends data for, e.g. "sourdough starter". Each keyword is one result per geo and timeframe.

## `geos` (type: `array`):

Where to measure search interest: 2-letter country codes (US, GB, DE), sub-regions (US-CA, GB-ENG), or an empty entry for worldwide. Each geo is scraped separately.

## `timeframes` (type: `array`):

One or more of: "now 1-H", "now 4-H", "now 1-d", "now 7-d", "today 1-m", "today 3-m", "today 12-m", "today 5-y", "all" (since 2004), or a custom range "2024-01-01 2024-12-31".

## `compare` (type: `boolean`):

Put keywords side by side on the same 0-100 scale, like Google Trends' Compare (up to 5 per comparison; more are split into groups of 5). Off = each keyword on its own scale.

## `includeRegions` (type: `boolean`):

Include search interest by sub-region (states, countries...) for each keyword.

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

Include the top 25 and rising 25 related search queries for each keyword.

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

Google Trends category id to narrow the meaning of a keyword (0 = all categories). Examples: 71 = Food & Drink, 5 = Computers & Electronics, 7 = Finance.

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

Which Google search to measure: web search, image search, news search, Google Shopping or YouTube search.

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

How many keywords to fetch at once, each through its own session. Higher is faster but more likely to be rate-limited by Google.

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

Proxy servers used for requests. Google rate-limits by IP; residential proxies are the most reliable.

## Actor input object example

```json
{
  "keywords": [
    "sourdough starter"
  ],
  "geos": [
    "US"
  ],
  "timeframes": [
    "today 12-m"
  ],
  "compare": false,
  "includeRegions": true,
  "includeRelatedQueries": true,
  "category": 0,
  "property": "web",
  "maxConcurrency": 3,
  "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 = {
    "keywords": [
        "sourdough starter"
    ],
    "geos": [
        "US"
    ],
    "timeframes": [
        "today 12-m"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidyscrape/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": ["sourdough starter"],
    "geos": ["US"],
    "timeframes": ["today 12-m"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tidyscrape/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": [
    "sourdough starter"
  ],
  "geos": [
    "US"
  ],
  "timeframes": [
    "today 12-m"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tidyscrape/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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