# Search Trend Monitor — Google Trends, Interest & Related (`eszetael_lab/search-trend-monitor`) Actor

Google Trends without the empty run. Interest over time, interest by region and related queries for your keywords. If Google returns nothing, the run says so and you are not charged — you pay per delivered row, never for the run. Flat JSON/CSV, no login, no quota.

- **URL**: https://apify.com/eszetael\_lab/search-trend-monitor.md
- **Developed by:** [Radosław Szal](https://apify.com/eszetael_lab) (community)
- **Categories:** SEO tools, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 92.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 delivered trends results

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/platform/actors/running/actors-in-store#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 — Interest, Regions & Related Queries

> 🔗 Part of the **[Apify actors collection](https://github.com/Eszetael/apify-actors)** — actors that chain: scrape → clean → use.

Export **Google Trends** data as clean, flat JSON / CSV / Excel — three capabilities over
public, aggregated, anonymous data (mostly 0–100 interest indices; see *Reading the values*), no login:

- **interest\_over\_time** — how popular keyword(s) are over a time range
- **interest\_by\_region** — how popular keyword(s) are by geography
- **related\_queries** — top & rising related searches for a keyword

Every record carries its **query context** (geo, timeframe, category) and a real **ISO-8601
timestamp**, so the output drops straight into a dashboard, a database or an AI agent — no
post-processing.

### Quick start

Set `keywords`, pick a `mode`, run:

```json
{ "mode": "interest_over_time", "keywords": ["bitcoin", "ethereum"], "timeframe": "today 12-m", "geo": "US" }
```

### Input reference

| Field | What it does |
|-------|--------------|
| **mode** | `interest_over_time` · `interest_by_region` · `related_queries` |
| **keywords** | Terms to analyze (**max 200**; extras ignored). For `interest_over_time` / `interest_by_region`, up to 5 share one 0–100 scale per request; more are split into **groups** — values are only comparable *within the same `chunkGroup`* (see Output). `related_queries` queries each keyword on its own. |
| **timeframe** | `today 12-m`, `today 5-y`, `now 7-d`, or `YYYY-MM-DD YYYY-MM-DD`. |
| **geo** | Two-letter country code (`US`, `PL`) — empty = worldwide. |
| **category** | Google Trends category id (`0` = all categories). |
| **maxItems** | Cap on delivered records (`0` = up to the safety limit of 50 000). **Enforced** — a run stops at this many records. |
| **onlyNew** | Emit only records not seen in previous runs with the same input — turns any scrape into a change monitor / alert. |
| **stateKey** | Optional explicit key for the `onlyNew` memory store (else derived from the input). |
| **proxyConfiguration** | Proxy for the requests. **A RESIDENTIAL proxy is strongly recommended** — Google blocks datacenter IPs (HTTP 429), so without one most runs will be rate-limited. |

### Output

Flat records, one per data point. Examples:

```json
{ "mode": "interest_over_time", "keyword": "bitcoin", "timestamp": 1700000000,
  "date": "2023-11-14T22:13:20+00:00", "formattedDate": "Nov 14, 2023", "value": 78,
  "isPartial": false, "chunkGroup": 0, "geo": "US", "timeframe": "today 12-m", "category": 0 }

{ "mode": "interest_by_region", "keyword": "bitcoin", "geoName": "Poland", "geoCode": "PL",
  "value": 64, "chunkGroup": 0, "geo": "US", "timeframe": "today 12-m", "category": 0 }

{ "mode": "related_queries", "keyword": "bitcoin", "related_query": "bitcoin etf",
  "value": 250, "formattedValue": "+150%", "rank_type": "rising",
  "chunkGroup": 0, "geo": "US", "timeframe": "today 12-m", "category": 0 }
```

**Reading the values:**

- **`value`** for `interest_over_time` / `interest_by_region` and for `rank_type: "top"` is a **0–100** index, comparable **only within the same `chunkGroup`** (Google rescales each group of ≤5 keywords independently).
- For **`rank_type: "rising"`** `value` is a **growth figure that can exceed 100**; `formattedValue` may read `"Breakout"` for very large spikes.
- **`isPartial: true`** marks a point whose time window has **not finished yet** — typically the most recent row. Its `value` is low because the period is still filling up, **not** because interest dropped. Charting the series without filtering these produces a phantom decline at the right-hand edge. Drop them (`isPartial == false`) whenever you compare the latest point to earlier ones.

Download from the run's **Dataset** tab as JSON, CSV, Excel, or pull via the Apify API.

### Monitoring (onlyNew)

Set `onlyNew: true` and schedule the run — each run returns only data points unseen since the
previous run with the same input. Wire it to `related_queries` for **rising-trend alerts** on a timer.

### What it costs

**$0.0025 per delivered record** on the free plan, down to **$0.0004** on the highest plan —
about 20% below the Actor most people land on first. You are billed for records that actually
reach your dataset: a run that returns nothing costs you nothing, and records dropped by
`onlyNew` are not charged.

### When Google throttles a comparison

Google rate-limits **multi-keyword comparison** requests far more aggressively than single
keywords — measured on 2026-08-12: `bitcoin` alone succeeded in 2 s, `ethereum` alone in 3 s,
the two together were refused five times in a row.

When that happens this Actor does not fail. It fetches the keywords **one at a time** and says so
in the run status. There is a catch you need to know, because it changes what the numbers mean:

> Google scales the 0–100 index **relative to the keywords in one request**. Keywords fetched
> separately each get their own scale, so a value of 100 for one keyword and 100 for another does
> **not** mean they are equally popular.

Every record carries `chunkGroup`. **Compare values only within the same `chunkGroup`.** Records
from different groups can be charted side by side only after you normalise them yourself.

### Notes & fair use

- Data is **public, aggregated and anonymous** (interest indices, not personal data). This actor
  uses Google Trends' public endpoints and does **not** log in or bypass access controls.
- Google blocks datacenter IPs — **use a RESIDENTIAL proxy** for reliable runs (see
  `proxyConfiguration`). The actor backs off on HTTP 429 automatically.
- You are responsible for using exported data in line with Google's terms and applicable law.

# Actor input Schema

## `mode` (type: `string`):

What to scrape.

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

Terms to analyze (max 200; extra are ignored). In interest\_over\_time / interest\_by\_region up to 5 keywords share one 0–100 scale per request; more are split into separate groups — see `chunkGroup` in the output, values are only comparable WITHIN the same group. In related\_queries each keyword is queried on its own.

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

Google Trends time range, e.g. 'today 12-m', 'today 5-y', 'now 7-d', or 'YYYY-MM-DD YYYY-MM-DD'.

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

Two-letter country code (e.g. US, PL) or empty for worldwide.

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

Google Trends category id (0 = all categories).

## `maxItems` (type: `integer`):

Cap on delivered records (0 = up to the safety limit of 50000). This is your cost ceiling as well as your time ceiling: you pay per delivered record, and every extra batch is another request to Google, which throttles hard once you ask too fast. The default of 10000 is high — set it to what you actually need.

## `onlyNew` (type: `boolean`):

Emit only records not seen in previous runs with the same input (monitoring/alerts).

## `stateKey` (type: `string`):

Optional explicit key for the onlyNew memory store. Leave empty to derive from the input.

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

Google Trends blocks datacenter IPs (HTTP 429). A RESIDENTIAL Apify proxy is strongly recommended — without it most runs will be rate-limited.

## Actor input object example

```json
{
  "mode": "interest_over_time",
  "keywords": [
    "bitcoin",
    "ethereum"
  ],
  "timeframe": "today 12-m",
  "geo": "",
  "category": 0,
  "maxItems": 10000,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `allRecords` (type: `string`):

Every record from the run: interest over time, interest by region and related queries, each row tagged with its mode, keyword, geo and timeframe.

## `interestOverTime` (type: `string`):

Just the time series — keyword, date, value and isPartial (true means the period is still running, so the value reads low and is not a drop).

## `relatedQueries` (type: `string`):

Rising and top related searches. For rising rows value is a percentage increase and formattedValue may read Breakout, which has no number — that is why value is empty there.

# 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": [
        "bitcoin",
        "ethereum"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("eszetael_lab/search-trend-monitor").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": [
        "bitcoin",
        "ethereum",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("eszetael_lab/search-trend-monitor").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": [
    "bitcoin",
    "ethereum"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call eszetael_lab/search-trend-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eszetael_lab/search-trend-monitor"
        }
    }
}

```

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/g9HF5BZObsCVghLJ4/builds/oo07vnwddjrbWfwil/openapi.json
