# Google Trends Scraper (Reliable, Bulk) (`najiva/google-trends-reliable`) Actor

Interest over time, interest by region, related queries and topics for many keywords and countries. Built for reliability: automatic session rotation on rate limits, pay only for successful results.

- **URL**: https://apify.com/najiva/google-trends-reliable.md
- **Developed by:** [Juraj Skvarla](https://apify.com/najiva) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 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, Bulk)

Get Google Trends data for **many keywords × many countries in one run**: interest over time, interest by region, and top + rising related queries. Clean JSON, CSV or Excel output that is ready for charts, spreadsheets, dashboards or AI agents.

**Built to finish the job.** Google limits Trends traffic hard. This Actor gives every query its own session and proxy exit. When Google answers "too many requests", it waits a little and retries on a fresh session. In our test runs (450 queries across 9 countries), 449 succeeded.

**Answers "is it rising or dying?" at a glance.** Every result has summary columns: `trend` (rising / falling / flat), `percentOfPeak`, `peakDate` and `topRisingQueries`. Paste in 200 product names and sort by `trend`; you don't need to open a single chart.

| keyword | trend | percentOfPeak | peakDate | topRisingQueries |
|---|---|---|---|---|
| labubu | falling | 3 | 2025-07-13 | real labubu, macaron labubu, … |
| dubai chocolate | falling | 10 | 2025-03-23 | kataifi, knafeh, pistachio chocolate bar, … |
| ozempic | falling | 48 | 2024-05-26 | mounjaro, ozempic vs mounjaro, zepbound, … |
| matcha | flat | 64 | 2026-08-02 | ryze matcha, matcha suri, … |

*(Worldwide, `today 5-y`, run on 6 Nov 2026.)*

**You only pay for real data.**

- Queries that fail are never charged.
- Keywords with too little search volume are not charged either. They are listed in the run's `NO_DATA` record, so you can see which ones were skipped.

### What you can do with it

- **SEO & content planning**: see which topics are growing, and spot seasonality before you publish.
- **E-commerce & product research**: compare demand for products across countries and find rising queries.
- **Market & investment research**: track interest in brands, tickers and technologies over time.
- **Ad campaign timing**: put budget into the regions and weeks with peak interest.
- **AI agents & automations**: one call returns structured data. Use it with Make, Zapier, n8n, the Apify API or Apify MCP.

### Input

| Field | What it does | Example |
|---|---|---|
| `keywords` | Search terms. Each one is fetched separately, with its own 0–100 scale. | `["air fryer", "slow cooker"]` |
| `geos` | Country or region codes. Leave empty for worldwide. Every keyword is fetched for every geo. | `["US", "GB", "DE", "US-CA"]` |
| `timeframe` | `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`, or a custom range `YYYY-MM-DD YYYY-MM-DD` | `today 12-m` |
| `category` | Google Trends category ID (0 = all categories) | `7` (Finance) |
| `property` | Which Google search to measure: web, image, news, Google Shopping or YouTube | web |
| `sections` | Which data to fetch. Leave empty to get everything. | `["interestOverTime"]` |
| `maxConcurrency` | Number of queries run in parallel (1–10) | `10` |

Example:

```json
{
  "keywords": ["bitcoin", "ethereum"],
  "geos": ["US", "GB"],
  "timeframe": "today 12-m"
}
```

That is 2 keywords × 2 geos = **4 results**.

### Output

You get one dataset item per keyword × geo (the values below are illustrative):

```json
{
  "keyword": "bitcoin",
  "geo": "US-CA",
  "timeframe": "2024-01-01 2024-03-31",
  "category": 7,
  "property": "web",
  "hasData": true,
  "peakDate": "2024-03-04",
  "latestDate": "2024-03-31",
  "latestValue": 61,
  "percentOfPeak": 61,
  "trend": "falling",
  "trendChangePercent": -18,
  "topRisingQueries": ["ibit stock"],
  "interestOverTime": [
    { "date": "2024-01-01", "datetime": "2024-01-01T00:00:00.000Z", "timestamp": 1704067200, "value": 11, "isPartial": false },
    { "date": "2024-01-02", "datetime": "2024-01-02T00:00:00.000Z", "timestamp": 1704153600, "value": 25, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "855", "geoName": "Santa Barbara-Santa Maria-San Luis Obispo CA", "value": 100 },
    { "geoCode": "807", "geoName": "San Francisco-Oakland-San Jose CA", "value": 97 }
  ],
  "relatedQueries": {
    "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100" }],
    "rising": [{ "query": "ibit stock", "value": 42600, "formattedValue": "Breakout" }]
  },
  "scrapedAt": "2026-11-03T21:33:12.201Z"
}
```

What the fields mean:

- **Summary columns** (only when `interestOverTime` is fetched). They use complete periods only; the current, unfinished one is skipped.
  - `peakDate`, `latestDate`, `latestValue`: when interest peaked, and the latest complete value.
  - `percentOfPeak`: latest value as a % of the peak. 3 means interest is at 3% of its high.
  - `trend` / `trendChangePercent`: average of the last 12 points vs the 12 before them (weeks for `today 5-y`, hours for `now 7-d`). More than +10% = `rising`, less than −10% = `falling`, otherwise `flat`. Needs at least 24 points, otherwise `null`.
  - `topRisingQueries`: up to 5 fastest-growing related searches.
- **`interestOverTime`**:
  - Each value is relative search interest, from 0 to 100.
  - 100 is the peak for that keyword in that geo and timeframe.
  - The time step depends on the timeframe: minutes, hours, days, weeks or months.
  - Use `datetime` (UTC) for hourly and minute data.
  - `isPartial: true` marks the current, incomplete period.
- **`interestByRegion`**: subregions (states, metro areas) ranked 0–100 by share of searches.
- **`relatedQueries.top`**: the most popular related searches.
- **`relatedQueries.rising`**: the fastest-growing related searches. "Breakout" means growth of more than 5000%.

### Pricing

Pay per event:

- **Per result** (one keyword × geo with data): **$0.0015**, which is $1.50 per 1,000 results.
- **Per run start**: a small fixed fee.
- **No charge** for failed queries or for keywords Google has no data for.

You can cap spending with the **Max cost per run** option in Apify. The Actor stops cleanly when the cap is reached.

### FAQ

**Why are values 0–100 and not search volumes?**
Google Trends publishes only relative interest, never absolute volumes. Each keyword is fetched on its own, so each has its own 0–100 scale. To compare keywords on one shared scale, compare them in Google Trends directly.

**Which geo codes can I use?**

- ISO country codes such as `US`, `DE` or `JP`.
- Subregion codes such as `US-CA`, `GB-ENG` or `SK-KI`.
- An empty list means worldwide.
- An invalid code fails right away, is not charged, and the log tells you which one it was.

**Why is one of my keywords missing from the results?**
The term has too little search volume in that geo and timeframe, so Google returns only noise: fewer than 3 non-zero points, with no regional data and no related queries. It is left out of the dataset, is not charged, and appears in the run's **No-data keywords** output (`NO_DATA` record) together with whatever Google did return.

**Are related topics supported?**
No. Google currently returns empty related-topics lists to automated clients. Related **queries** work normally.

**Is the data identical to what I see on trends.google.com?**
It comes from the same backend endpoints the website uses. Google samples Trends data, though, so the website itself shows slightly different numbers when the same query is repeated.

### Disclaimer

This Actor is not affiliated with or endorsed by Google. It collects aggregated, anonymous search-interest statistics and no personal data. You are responsible for using the data in line with the laws and terms that apply to you.

# Actor input Schema

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

Search terms. Each keyword is fetched separately (its own 0-100 scale).

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

Geo codes like US, GB, DE, US-CA. Leave empty for worldwide. Each keyword is fetched for every geo.

## `timeframe` (type: `string`):

Examples: 'now 1-H', 'now 7-d', 'today 1-m', 'today 3-m', 'today 12-m', 'today 5-y', 'all', or 'YYYY-MM-DD YYYY-MM-DD'.

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

Google Trends category (0 = all categories).

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

Which Google search vertical to measure.

## `sections` (type: `array`):

Leave empty to fetch everything.

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

Parallel queries. Each uses its own proxy session.

## `maxAttempts` (type: `integer`):

Retries with a fresh proxy session on rate limits.

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

Residential proxies recommended.

## Actor input object example

```json
{
  "keywords": [
    "coffee",
    "tea"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m",
  "category": 0,
  "property": "",
  "sections": [],
  "maxConcurrency": 10,
  "maxAttempts": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with one item per keyword × geo.

## `runStats` (type: `string`):

Queries attempted, succeeded, failed, without data, and request counts.

## `noData` (type: `string`):

Keyword × geo combinations Google had no data for. Not charged.

# 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": [
        "coffee",
        "tea"
    ],
    "geos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("najiva/google-trends-reliable").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": [
        "coffee",
        "tea",
    ],
    "geos": ["US"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("najiva/google-trends-reliable").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": [
    "coffee",
    "tea"
  ],
  "geos": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call najiva/google-trends-reliable --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,najiva/google-trends-reliable"
        }
    }
}
```

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/OyZV89v9WczWrwDTv/builds/S8fUcF4Avqs2gF3wg/openapi.json
