# Google Trends Keyword Interest Scraper (`bareezh_codes/google-trends-keyword-interest-scraper`) Actor

Google Trends interest over time for any keywords: weekly/hourly series, average and peak interest, interest by region and related queries. Uses only Google endpoints verified live, with cookie warm-up and proxy rotation so runs don't silently fail.

- **URL**: https://apify.com/bareezh\_codes/google-trends-keyword-interest-scraper.md
- **Developed by:** [Salman Bareesh](https://apify.com/bareezh_codes) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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 Keyword Interest Scraper

Pull Google Trends **interest over time** for any list of keywords, plus **interest by region** and **related queries** - as clean, flat data you can sort, filter and export.

One result row per keyword. No Google account, no API key, no browser.

### Why another Google Trends Actor

Google quietly retired the endpoints most Trends scrapers were built on. Checked live on 2026-09-18 from a datacenter IP:

| Endpoint | Status |
|---|---|
| `/trends/api/dailytrends` | **HTTP 404** (gone) |
| `/trends/api/realtimetrends` | **HTTP 404** (gone) |
| `/trends/api/explore` + `/trends/api/widgetdata/*` | **HTTP 200** - but only with a warmed-up `NID` cookie |

This Actor fetches the Trends homepage first to obtain that cookie, uses only the endpoints verified working, and rotates Apify Proxy sessions when Google throttles one. If Google gives us nothing, the run **fails loudly with zero items charged** rather than quietly returning an empty dataset.

### Who uses it

- **SEO and content teams** sizing demand for a keyword set before committing to a content calendar
- **Brand and market analysts** tracking a brand against its competitors over 12 months or 5 years
- **Ecommerce sellers** checking seasonality before buying stock
- **Investors and researchers** turning search interest into a time series for a model

### Input

```json
{
  "keywords": ["apify", "web scraping"],
  "timeRange": "today 3-m",
  "geo": "US",
  "includeRegions": true,
  "includeRelatedQueries": true,
  "maxRegions": 5,
  "maxRelatedQueries": 5
}
```

| Field | What it does |
|---|---|
| `keywords` | The search terms. One result row each. |
| `timeRange` | `now 1-H` … `today 12-m`, `today 5-y`, `all`. Google picks the bucket size: hourly for short ranges, weekly for 12 months, monthly for 5 years. |
| `geo` | `US`, `GB`, `IN`, a sub-region like `US-CA`, or empty for worldwide. |
| `compareKeywords` | Off: each keyword gets its own 0-100 scale. On: keywords are scored against each other in groups of 5. See **Scales** below - this changes what the numbers mean. |
| `searchType` | Web, Images, News, YouTube or Shopping. |
| `category` | Google category id to narrow the topic, `0` for all. |
| `includeRegions` / `includeRelatedQueries` | Optional extras, no extra charge. |
| `maxKeywords` | Safety cap so an oversized list can't run up a bill. |

### Output

One item per keyword:

```json
{
  "keyword": "apify",
  "geo": "US",
  "timeRange": "today 3-m",
  "category": 0,
  "searchType": "web",
  "comparedWith": [],
  "averageInterest": 61.4,
  "peakInterest": 100,
  "peakDate": "Aug 14",
  "latestInterest": 58,
  "dataPoints": 93,
  "interestOverTime": [
    { "date": "Jun 18", "timestamp": 1781740800, "value": 69, "isPartial": false }
  ],
  "topRegions": [
    { "regionCode": "US-CA", "regionName": "California", "value": 100 }
  ],
  "relatedQueriesTop": [
    { "query": "apify pricing", "value": 100, "formattedValue": "100" }
  ],
  "relatedQueriesRising": [
    { "query": "apify mcp", "value": 5000, "formattedValue": "Breakout" }
  ],
  "scrapedAt": "2026-09-18T07:19:10+00:00"
}
```

`averageInterest`, `peakInterest`, `peakDate` and `latestInterest` are computed from the series so you can sort the table without opening the nested array. Every item has the same keys; anything Google didn't publish is `null`.

### Scales: the one thing to get right

Google Trends numbers are **relative, never absolute search volume**. 100 is the peak of whatever is being compared.

- **`compareKeywords: false` (default)** - each keyword is scraped alone and scaled 0-100 against *its own* peak. Use this when the keywords are unrelated. You can compare each keyword's *shape* over time, but not its size against another keyword.
- **`compareKeywords: true`** - up to 5 keywords share one scale, so you can see which is genuinely bigger. The catch is Google's, not ours: a niche term next to a huge one reads as near-zero.

### Pricing

Pay per result - one result = one keyword's complete report (time series + regions + related queries).

| Plan | Price per keyword |
|---|---|
| Free | $0.005 |
| Bronze | $0.0045 |
| Silver | $0.004 |
| Gold | $0.0035 |
| Platinum | $0.003 |
| Diamond | $0.003 |

A 25-keyword run on the Free tier costs $0.125. Failed keywords are never charged.

### FAQ

**Can I get real search volume?** No - Google Trends does not publish it, and no scraper can produce it honestly. You get relative interest, 0-100.

**Why do two runs of the same keyword differ slightly?** Google samples its search logs; small run-to-run variation is normal and comes from Google, not from this Actor.

**What is `isPartial`?** The final bucket is often still being collected. Google flags it; we pass the flag through so you can drop it.

**A keyword returned no related queries.** Google publishes related queries only when a term has enough volume. The lists come back empty, the interest data is unaffected.

**Can it scrape trending/daily searches?** Not yet - this Actor covers keyword interest. Google's old daily/realtime trends endpoints are 404 and the replacement has a different shape.

### Limits

- **Relative data only** (see Scales). No absolute search volume exists in this source.
- **5 keywords per comparison** is Google's own limit; larger lists are split into groups of 5 in compare mode, or run one-by-one otherwise.
- **Hourly ranges cover short windows only** - `now 1-H` through `now 7-d`. Long ranges get weekly or monthly buckets from Google.
- **Rate limits are real, so big runs are slow.** Google throttles bursts; the Actor pauses between keyword groups and rotates proxy sessions rather than hammering. Budget roughly **25 keywords in 3 minutes** and **100 keywords in 20 minutes** on their own scales (`compareKeywords: false`); compare mode is ~5x faster because it batches 5 keywords per request. Raise the run's timeout before raising `maxKeywords`, or split the list across runs.
- Public Google Trends data only - no login-walled data, no personal data.

Our Actors are ethical and do not extract any private user data. They only extract what the target site has chosen to publish publicly. You should be aware that your results could contain personal data if a search term itself contains one. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

Found an issue or have a feature request? Use the **Issues** tab. Need programmatic access? See the **API** tab for this Actor's REST/client endpoints.

# Actor input Schema

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

Search terms to pull Google Trends interest for. Each keyword becomes one result row with its full interest-over-time series.

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

How far back to pull interest data. Longer ranges return coarser buckets: 'today 12-m' is weekly, 'today 5-y' is monthly, 'now 7-d' is hourly - exactly as Google itself aggregates them.

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

Two-letter country code (US, GB, IN), a sub-region (US-CA, GB-ENG), or leave empty for worldwide.

## `compareKeywords` (type: `boolean`):

Off (default): every keyword gets its own 0-100 scale, so unrelated keywords stay readable. On: keywords are scored relative to each other in groups of 5 (Google's limit), which is the only way to tell which term is genuinely bigger - but a small term next to a huge one will read as near-zero.

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

Which Google property the interest is measured on.

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

Google Trends category id to narrow the topic, or 0 for all categories. Ids come from Google's own category tree (for example 7 = Finance, 71 = Food & Drink, 13 = Computers & Electronics).

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

Add the regional breakdown (states/countries ranked by relative interest) to each result. Costs one extra request per keyword group, no extra charge.

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

Add Google's top and rising related queries to each result. Google publishes no related queries for low-volume keywords, in which case these come back as empty lists.

## `maxRegions` (type: `integer`):

Cap on the regional breakdown, highest interest first. Regions with zero interest are always dropped.

## `maxRelatedQueries` (type: `integer`):

Cap on each of the top and rising related-query lists.

## `maxKeywords` (type: `integer`):

Safety cap on how many keywords one run processes, so an oversized list cannot run up a bill. Extra keywords beyond this are ignored. Google throttles bursts, so large runs are slow: roughly 25 keywords in 3 minutes, 100 in 20 minutes when each keyword is scraped on its own scale. Raise the run's timeout before raising this.

## Actor input object example

```json
{
  "keywords": [
    "apify",
    "web scraping"
  ],
  "timeRange": "today 12-m",
  "geo": "US",
  "compareKeywords": false,
  "searchType": "",
  "category": 0,
  "includeRegions": true,
  "includeRelatedQueries": true,
  "maxRegions": 25,
  "maxRelatedQueries": 25,
  "maxKeywords": 25
}
```

# Actor output Schema

## `dataset` (type: `string`):

One item per keyword

# 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": [
        "apify",
        "web scraping"
    ],
    "timeRange": "today 12-m",
    "geo": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bareezh_codes/google-trends-keyword-interest-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": [
        "apify",
        "web scraping",
    ],
    "timeRange": "today 12-m",
    "geo": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("bareezh_codes/google-trends-keyword-interest-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": [
    "apify",
    "web scraping"
  ],
  "timeRange": "today 12-m",
  "geo": "US"
}' |
apify call bareezh_codes/google-trends-keyword-interest-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bareezh_codes/google-trends-keyword-interest-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/NfwaRPKVuvLVkw9x0/builds/tt8f0dCAAcuEBbXoW/openapi.json
