# Google Trends Scraper: Rising & Breakout Keywords (`simpleapi/google-trends-scraper`) Actor

Gather real-time and historical Google Trends data at scale. Extract search interest, rising topics, comparisons, and regional stats. Excellent for researchers, strategists, and analysts building trend dashboards or predictive models.

- **URL**: https://apify.com/simpleapi/google-trends-scraper.md
- **Developed by:** [SimpleAPI](https://apify.com/simpleapi) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 7 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 — Rising Keywords, Spikes and Momentum

Google Trends Scraper: Rising & Breakout Keywords fetches Google Trends interest-over-time for any keyword list and layers on statistical spike detection, momentum, and velocity — computed directly from the fetched series, at no extra request cost. Each result row carries the keyword's full timeline, its detected anomaly points (`spikes`), a rising/falling `momentum` direction, and an `isSpiking` flag. It's built for SEO and content strategists, marketing agencies tracking client keyword sets, and market researchers who need to know not just what's trending, but exactly when a keyword broke out of its normal range.

### What is Google Trends Scraper: Rising & Breakout Keywords?

Google Trends Scraper: Rising & Breakout Keywords is an Apify Actor that pulls Google Trends' public interest-over-time index for one or more keywords and derives spike, momentum, and velocity metrics from that series in the same run. No Google account or API key is required — Google Trends is a free, public tool. Key capabilities:

- Monitor keywords by typing them directly, pasting full Google Trends URLs, or loading a list from a public Google Sheet
- Compare up to 5 keywords together as one group when group comparison mode is on
- Flag anomaly points using a rolling-baseline z-score and percent-change test, tunable via three sensitivity presets
- Compute momentum (rising/falling/flat direction and slope) and velocity (change per time step) over a configurable recent window
- Filter by region, viewed-from country, history window or an exact date range, and Trends topic category
- Turn the run into an alert feed with `alertOnlySpikes`, so only keywords that actually spiked are returned and charged

### What data can I extract with Google Trends Scraper: Rising & Breakout Keywords?

Each row covers one keyword group's full interest timeline plus the derived anomaly analysis:

| Field | Example Value | Use Case |
| --- | --- | --- |
| `searchTerm` | `"chatgpt"` | Identify which keyword or comparison group the row covers |
| `timeRange` | `"today 12-m"` | Confirm the analyzed history window |
| `geo` | `"US"` | Confirm the region the interest data reflects |
| `category` | `"5"` | Confirm the Trends topic category applied, if any |
| `interestOverTime_timelineData` | `[{"date": "2026-06-01", "chatgpt": 62}, ...]` | The full raw interest-index series behind every derived metric |
| `spikes` | `[{"date": "2026-07-02", "keyword": "chatgpt", "value": 94, "baseline": 58.1, "zScore": 3.8, "pctChange": 61.8, "severity": "major"}]` | List every detected anomaly point with its statistical evidence |
| `isSpiking` | `true` | Check whether the *latest* data point is itself a spike |
| `spikeCount` | `4` | Gauge how volatile a keyword has been over the window |
| `momentum` | `{"direction": "rising", "slope": 1.42, "changePercent": 18.6}` | See the recent trend direction and its strength |
| `velocity` | `1.42` | Get the average interest-point change per time step |
| `peakValue` / `peakDate` | `94` / `"2026-07-02"` | Find the single highest point in the analyzed window |
| `latestValue` | `81` | Read the most recent interest-index value |
| `baselineMean` | `58.1` | See the "normal" level the latest value is compared against |
| `perKeywordMetrics` | `[{...}]` | Get spike/momentum/velocity broken out per keyword when comparing a group |
| `spikeSensitivity` / `appliedZThreshold` / `appliedPctThreshold` | `"medium"` / `2.5` / `50.0` | Confirm exactly which thresholds produced this row's spike flags |
| `resultType` | `"spike"` | Identify the row type for downstream filtering |
| `scrapedAt` | `"2026-07-26T14:02:11Z"` | Record when the run fetched this data |

#### Spike and momentum analytics

The `spikes` array is the decision-driving data: each entry names the anomalous date, the raw value, the rolling baseline mean it was compared against, its z-score, its percent change, and a severity bucket (`minor`/`major`/`extreme` based on the z-score). This is a statistical anomaly test the Actor computes itself from the fetched interest-over-time series — a rolling mean/standard-deviation baseline over the preceding `baselineWindow` points, flagged when the z-score or percent-change crosses the threshold set by `spikeSensitivity`. It is **not** Google's own "Breakout" label from the Related Queries panel (Google's proprietary >5000%-growth designation) — this Actor never fetches that panel at all. `momentum` and `velocity` give the recent slope and per-step change, useful for telling a keyword that spiked once from one that is steadily climbing.

#### Region, timeframe and category targeting

`geo`/`regionCode` scope results to a single country (or worldwide if left empty), `historyWindow` picks a preset lookback (from the last hour to 5 years or all-time), and `exactDateWindow` overrides that with a precise `YYYY-MM-DD YYYY-MM-DD` range. `topicCategory` narrows to one of Google Trends' own categories (e.g. Business, Health) instead of all categories. Combine region and category to isolate, for example, US-only "Health" search interest rather than global all-category volume.

### Why not build this yourself?

Google Trends has no official, scriptable bulk API — it is a free public dashboard, not a REST product with documented endpoints or a Terms-of-Service rate card. Any programmatic access relies on Google's undocumented internal widget endpoints, which aggressively rate-limit and CAPTCHA-block requests from datacenter IPs and share no published quota. This Actor's source code carries a three-tier proxy escalation ladder (`none` → `datacenter` → `residential`) that automatically retries a blocked or rate-limited request on a different connection method, plus a configurable retry count for transient failures — logic a self-built script would need to write and maintain from scratch, with no official documentation to build against. On top of that, the spike/momentum math (rolling baseline, z-score, severity buckets) is derived entirely from the fetched series in the same request, so building an equivalent tool yourself means writing and testing that statistics layer too. Use Google Trends' own website directly for a one-off, single-keyword check; use this Actor when you need the same data for many keywords, on a schedule, with anomaly detection already computed.

### How to use data extracted from Google Trends?

#### SEO and content strategists

Feed a content calendar's target keyword list into `monitorKeywords`, run on a schedule, and use `isSpiking` plus `momentum.direction` to decide which topics deserve a new article or a refresh right now rather than next quarter. The `spikes` array's `date` and `severity` fields let you correlate a traffic spike in your own analytics with a real, dated search-interest surge — useful evidence when prioritizing a backlog of draft topics against genuinely rising demand instead of guessing from gut feel.

#### Marketing agencies benchmarking client keyword sets

Agencies running keyword monitoring for multiple clients can pass each client's tracked terms as a separate `monitorKeywords` list (or `groupComparisonMode` to compare a client's brand term against competitors in one row), then use `alertOnlySpikes` so the run only returns — and only charges for — keywords that actually moved, turning a recurring scheduled run into a lightweight client alert feed rather than a full report to manually re-scan every time.

#### Market and consumer research

Track `momentum.direction` and `velocity` across a category's keyword set (using `topicCategory`) to see which sub-topics are accelerating versus flattening within a region, using `regionCode` to compare interest patterns market to market. The full `interestOverTime_timelineData` array supports building a longer-horizon chart rather than relying on the derived summary fields alone.

#### AI agents and automated pipelines

An agent can call this Actor on a schedule with `alertOnlySpikes` enabled to get a clean, pre-filtered signal — only keyword groups with a genuine anomaly are pushed — for feeding into an automated content-brief generator, a trading-signal pipeline, or a RAG knowledge base that needs to know when public interest in a topic has structurally shifted.

### 🔼 Input sample

| Parameter | Required | Type | Description | Example Value |
| --- | --- | --- | --- | --- |
| `monitorKeywords` | No | array | Keywords/topics to watch for rising interest and spikes. Required unless `trendsUrls` or `sheetId` is supplied. | `["chatgpt", "ozempic"]` |
| `spikeSensitivity` | No | string (enum) | How aggressively to flag spikes: `low` (z≥3.0 or +75%), `medium` (z≥2.5 or +50%, default), `high` (z≥2.0 or +35%) | `"medium"` |
| `alertOnlySpikes` | No | boolean | When true, only keyword groups with at least one detected spike are returned and charged | `false` |
| `groupComparisonMode` | No | boolean | When true, commas inside one keyword string split it into a compared group (up to 5 keywords) | `false` |
| `historyWindow` | No | string (enum) | Preset lookback: `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` | `"today 12-m"` |
| `regionCode` | No | string (enum) | Country/region ISO code to localize trend data; empty for Worldwide | `"US"` |
| `baselineWindow` | No | integer (min 2) | Preceding points used to compute the rolling spike baseline | `7` |
| `momentumWindow` | No | integer (min 2) | Most-recent points used to compute momentum and velocity | `7` |
| `viewerCountry` | No | string (enum) | Country context used when viewing Trends pages | `"us"` |
| `disableSnapshots` | No | boolean | Kept for compatibility with the base actor; has no effect (this variant uses an HTTP engine, no browser) | `false` |
| `trendsUrls` | No | array | Full Google Trends URLs to reuse their keyword/geo/date/category parameters | `[]` |
| `sheetId` | No | string | Public Google Sheet ID to load keywords from (single column, row 1 = header) | `""` |
| `topicCategory` | No | string (enum) | Google Trends category ID to narrow results to | `""` |
| `maxKeywordRows` | No | integer (min 0) | Maximum output rows (keyword groups); `0` = unlimited | `0` |
| `exactDateWindow` | No | string | Exact `YYYY-MM-DD YYYY-MM-DD` range, overrides `historyWindow` | `""` |
| `fetchConcurrency` | No | integer (min 1) | Kept for compatibility with the base actor; has no effect (fetching is sequential) | `10` |
| `requestRetryLimit` | No | integer (min 1) | Retry attempts per request before escalating the proxy tier | `7` |
| `requestTimeoutSecs` | No | integer (min 30) | Timeout for auxiliary fetches (e.g. loading a Google Sheet) | `180` |
| `proxyConfiguration` | No | object | Apify proxy configuration; residential proxies help when Google rate-limits datacenter IPs | `{"useApifyProxy": true}` |

```json
{
  "monitorKeywords": ["chatgpt", "ozempic"],
  "spikeSensitivity": "medium",
  "historyWindow": "today 12-m",
  "regionCode": "US",
  "alertOnlySpikes": true
}
```

**Common pitfall:** `fetchConcurrency` and `disableSnapshots` are accepted for compatibility with the base Google Trends scraper's input shape but have no effect in this variant — fetching always runs sequentially through `trendspy`, and there is no browser/screenshot layer to disable. Setting them does not change run behavior or speed.

### 🔽 Output sample

Output is typed, normalized JSON — one row per keyword group, delivered to the Actor's dataset (exportable as JSON, CSV, Excel, or via API).

```json
{
  "inputUrlOrTerm": "chatgpt",
  "searchTerm": "chatgpt",
  "timeRange": "today 12-m",
  "geo": "US",
  "category": "0",
  "interestOverTime_timelineData": [
    {"date": "2026-06-01", "chatgpt": 58},
    {"date": "2026-06-08", "chatgpt": 61},
    {"date": "2026-07-02", "chatgpt": 94}
  ],
  "spikes": [
    {
      "date": "2026-07-02",
      "keyword": "chatgpt",
      "value": 94,
      "baseline": 58.1,
      "zScore": 3.8,
      "pctChange": 61.8,
      "severity": "major"
    }
  ],
  "isSpiking": false,
  "spikeCount": 1,
  "momentum": {"direction": "rising", "slope": 1.42, "changePercent": 18.6},
  "velocity": 1.42,
  "peakValue": 94,
  "peakDate": "2026-07-02",
  "latestValue": 81,
  "baselineMean": 58.1,
  "perKeywordMetrics": [
    {
      "keyword": "chatgpt",
      "spikeCount": 1,
      "isSpiking": false,
      "momentum": {"direction": "rising", "slope": 1.42, "changePercent": 18.6},
      "velocity": 1.42,
      "peakValue": 94,
      "peakDate": "2026-07-02",
      "latestValue": 81,
      "baselineMean": 58.1
    }
  ],
  "spikeSensitivity": "medium",
  "appliedZThreshold": 2.5,
  "appliedPctThreshold": 50.0,
  "resultType": "spike",
  "scrapedAt": "2026-07-26T14:02:11Z"
}
```

The dataset's default table view surfaces 11 of these fields (`searchTerm`, `isSpiking`, `spikeCount`, `momentum`, `velocity`, `spikeSensitivity`, `peakValue`, `peakDate`, `spikes`, `interestOverTime_timelineData`, `scrapedAt`); the remaining fields shown above (`inputUrlOrTerm`, `timeRange`, `geo`, `category`, `latestValue`, `baselineMean`, `perKeywordMetrics`, `appliedZThreshold`, `appliedPctThreshold`, `resultType`) are still written to every row and available via the API or a custom dataset view.

### How do you filter and target specific keywords?

There are three ways to supply what to monitor, and each fits a different workflow: type keywords directly into `monitorKeywords` for ad hoc tracking; paste one or more `trendsUrls` to reuse an existing Google Trends URL's exact keyword, region, date, and category configuration; or point `sheetId` at a public Google Sheet to drive a recurring run off a maintained list without editing the Actor's input each time. For scope precision, combine `regionCode` (or leave it empty for worldwide) with `topicCategory` to isolate, say, US-only "Health" interest rather than all-category global volume, and use `historyWindow` for a preset lookback or `exactDateWindow` for a precise custom range. The closest thing to a quality threshold here is `spikeSensitivity`: `low` only flags strong surges (z≥3.0 or +75% over baseline), while `high` catches smaller, earlier moves (z≥2.0 or +35%) at the cost of more false positives on noisy series. Combine that with `alertOnlySpikes` as the volume control — turned on, quiet keywords with zero detected spikes are dropped from the output (and not charged) entirely, so a large watchlist returns only the subset that's actually moving.

```json
{ "monitorKeywords": ["ozempic", "wegovy", "mounjaro"], "spikeSensitivity": "high", "alertOnlySpikes": true }
```

```json
{ "monitorKeywords": ["bitcoin, ethereum"], "groupComparisonMode": true, "regionCode": "US", "historyWindow": "today 3-m" }
```

```json
{ "trendsUrls": ["https://trends.google.com/trends/explore?q=chatgpt&geo=US&date=today%2012-m"], "spikeSensitivity": "low" }
```

### ▶️ Want to try other research scrapers?

No other Google Trends actor currently exists in this catalogue. If you're tracking trend momentum on other platforms, these cover a comparable rising/momentum-analytics angle:

| Scraper Name | What it extracts |
| --- | --- |
| TikTok Trending Hashtags With Momentum Analytics Scraper | Trending TikTok hashtags with momentum/velocity analytics |
| TikTok Trending Videos Insights With Hashtag Trend Ad Matcher | Trending TikTok video and ad-creative insights matched to hashtag trends |
| Google Patents Scraper With Legal Status & Ownership Details | Patent records with legal-status and ownership research data |
| Google Hotels — Location Details Scraper | Hotel listings with rates and location details |

### How to extract Google Trends data programmatically

Every run is a standard Apify Actor call — one API request with your token, JSON input, JSON results back. No Google account or API key needed.

#### Python example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_API_TOKEN>")

run_input = {
    "monitorKeywords": ["chatgpt", "ozempic"],
    "spikeSensitivity": "medium",
    "regionCode": "US",
    "alertOnlySpikes": True,
}

run = client.actor("<YOUR_USERNAME>/google-trends-scraper-rising-breakout-keywords").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["searchTerm"], item["isSpiking"], item["momentum"]["direction"])
```

#### Export to spreadsheets or CRM

Export the dataset directly as CSV or Excel from the Actor run, then map `searchTerm` to a keyword column, `isSpiking`/`spikeCount` to an alert-status column, and `momentum.direction`/`velocity` to trend-direction columns in a content calendar or CRM import template.

### Is it legal to scrape Google Trends?

Yes. Google Trends is itself a free, public tool that publishes aggregated, anonymized search-interest data with no login wall and no personal data attached to any keyword or timeline point — there are no reviewer names, contact details, or individual users in the output. The applicable framework here is Google's own Terms of Service on automated querying rather than GDPR/CCPA, since nothing in the output identifies an individual. Consult legal counsel for commercial applications involving high-volume or bulk automated querying of Google's services.

### ❓ FAQ

#### Does "Breakout" in the title mean this returns Google's own Breakout label?

No. Google Trends' Related Queries panel has its own proprietary "Breakout" designation (roughly >5000% growth), but this Actor never fetches that panel. It computes its own statistical anomaly detection — a rolling z-score and percent-change test — directly from the interest-over-time series, which is a different (and fully documented, in-source) mechanism.

#### How accurate is the spike detection?

It's a transparent statistical test, not a black box: each spike shows its baseline mean, z-score, and percent change, so you can verify why a point was flagged. Accuracy for your use case depends on `spikeSensitivity` — `low` misses smaller genuine moves to avoid false positives, `high` catches more moves but flags more noise.

#### Can I get the full raw interest-over-time series, not just the spikes?

Yes — every row includes `interestOverTime_timelineData`, the complete date/value series behind the derived spike, momentum, and velocity fields, so you can build your own charts or run different analysis alongside the Actor's.

#### How many keyword groups can I get per run?

Set `maxKeywordRows` to cap the number of output rows; `0` (the default) means unlimited, and the run processes every keyword group you supply via `monitorKeywords`, `trendsUrls`, or `sheetId`.

#### What does `alertOnlySpikes` actually change?

When enabled, keyword groups with zero detected spikes are skipped entirely — no row is pushed and no charge occurs for them — so a large watchlist returns (and bills for) only the keywords that are actually moving.

#### Does Google Trends Scraper: Rising & Breakout Keywords work with Claude, ChatGPT, and AI agent frameworks?

It has no dedicated MCP server registration in this Actor's current setup, but it is callable as a standard Apify API endpoint by any agent framework that can make an authenticated HTTP request and parse JSON.

#### How does this compare to other Google Trends scrapers?

No independently verifiable competitor listing could be confirmed at the time of writing, so no specific comparison is made here. In general, this Actor's distinguishing feature relative to a raw interest-over-time fetch is the built-in spike/momentum/velocity layer computed at no extra request cost.

#### Can I use this without a Google account or API key?

Yes. Google Trends is a public tool with no login requirement, so no Google credentials, API key, or developer account are needed — only your Apify account to run the Actor.

#### Can I compare multiple keywords against each other in one row?

Yes — set `groupComparisonMode` to true and separate keywords with commas in one `monitorKeywords` entry (up to 5 per group); the row's `perKeywordMetrics` array then breaks out spike, momentum, and velocity per keyword within that comparison.

#### What happens if a keyword has too little search volume?

Google Trends returns no data for very low-volume terms, and the Actor logs a warning and skips that keyword group rather than pushing an empty or fabricated row — it will not appear in the output dataset.

### Conclusion

Google Trends Scraper: Rising & Breakout Keywords turns Google's free public interest-over-time data into a structured, anomaly-flagged feed — spike detection, momentum, and velocity computed in the same run, with no extra Google requests. It's built for SEO strategists, marketing agencies, and researchers who need to know exactly when and how much a keyword's interest shifted, not just its current trend line. Start a run with your keyword list, a sensitivity level, and `alertOnlySpikes` if you only want the signal, not the noise.

# Actor input Schema

## `monitorKeywords` (type: `array`):

Keywords/topics to watch for rising interest and spikes. Example: \["chatgpt", "ozempic"]. Required unless you provide Google Trends URLs or a Google Sheet ID.

## `spikeSensitivity` (type: `string`):

How aggressively to flag spikes. low = only strong surges (z-score ≥ 3.0 or +75% vs baseline); medium = balanced (z ≥ 2.5 or +50%); high = catch early/small spikes (z ≥ 2.0 or +35%). Default is medium.

## `alertOnlySpikes` (type: `boolean`):

When ON, only keywords with at least one detected spike are returned (and charged) — turning the run into an alert feed. When OFF (default), every keyword is returned with its spike/momentum analysis.

## `groupComparisonMode` (type: `boolean`):

Enable so commas in a keyword line split into a comparison group (up to 5 keywords). Example: "bitcoin, ethereum" becomes one compared group. Off by default.

## `historyWindow` (type: `string`):

How far back to analyze the interest series (default: past 12 months). Longer windows give a more stable spike baseline.

## `regionCode` (type: `string`):

Country/region to localize trend data. Leave empty for Worldwide. If Google Trends URLs are supplied, their location is used first.

## `baselineWindow` (type: `integer`):

Number of preceding points used to compute the rolling mean/std baseline for each spike test. Example: 7 means each point is compared against the previous 7. Default is 7.

## `momentumWindow` (type: `integer`):

Number of most-recent points used to compute momentum (slope/direction) and velocity (change per step). Example: 7 uses the last 7 points. Default is 7.

## `viewerCountry` (type: `string`):

Country context used when viewing Trends pages, to help match local results.

## `disableSnapshots` (type: `boolean`):

Kept for compatibility with the base Google Trends scraper input. This actor uses an HTTP engine (no browser), so this toggle has no effect.

## `trendsUrls` (type: `array`):

Paste full Google Trends URLs to reuse their keyword/geo/date/category parameters instead of the fields above.

## `sheetId` (type: `string`):

Optional: load keywords from a public Google Sheet (single column, row 1 treated as a header).

## `topicCategory` (type: `string`):

Narrow results to a specific Trends category, or leave empty for all categories.

## `maxKeywordRows` (type: `integer`):

Maximum number of output records (keyword-group rows). Use 0 for no limit.

## `exactDateWindow` (type: `string`):

Exact date range in the format YYYY-MM-DD YYYY-MM-DD. Overrides the preset history window.

## `fetchConcurrency` (type: `integer`):

Kept for compatibility with the base input. Fetching is sequential (trendspy has its own request delay), so this value does not change behavior.

## `requestRetryLimit` (type: `integer`):

Retry attempts for a failed Google Trends request before escalating the proxy tier.

## `requestTimeoutSecs` (type: `integer`):

Timeout (seconds) for auxiliary outbound fetches such as loading keywords from a Google Sheet. The Google Trends engine is HTTP-based via trendspy and does not load browser pages.

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

Configure proxy usage for stable access. Residential proxies help when Google Trends rate-limits datacenter IPs.

## Actor input object example

```json
{
  "monitorKeywords": [
    "webscraping"
  ],
  "spikeSensitivity": "medium",
  "alertOnlySpikes": false,
  "historyWindow": "today 12-m",
  "baselineWindow": 7,
  "momentumWindow": 7,
  "trendsUrls": [],
  "fetchConcurrency": 10,
  "requestRetryLimit": 7,
  "requestTimeoutSecs": 180,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's default dataset.

# 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 = {
    "monitorKeywords": [
        "webscraping"
    ],
    "spikeSensitivity": "medium",
    "groupComparisonMode": false,
    "historyWindow": "today 12-m",
    "regionCode": "",
    "viewerCountry": "",
    "disableSnapshots": false,
    "trendsUrls": [],
    "sheetId": "",
    "topicCategory": "",
    "maxKeywordRows": 0,
    "exactDateWindow": "",
    "fetchConcurrency": 10,
    "requestRetryLimit": 7,
    "requestTimeoutSecs": 180,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("simpleapi/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 = {
    "monitorKeywords": ["webscraping"],
    "spikeSensitivity": "medium",
    "groupComparisonMode": False,
    "historyWindow": "today 12-m",
    "regionCode": "",
    "viewerCountry": "",
    "disableSnapshots": False,
    "trendsUrls": [],
    "sheetId": "",
    "topicCategory": "",
    "maxKeywordRows": 0,
    "exactDateWindow": "",
    "fetchConcurrency": 10,
    "requestRetryLimit": 7,
    "requestTimeoutSecs": 180,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("simpleapi/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 '{
  "monitorKeywords": [
    "webscraping"
  ],
  "spikeSensitivity": "medium",
  "groupComparisonMode": false,
  "historyWindow": "today 12-m",
  "regionCode": "",
  "viewerCountry": "",
  "disableSnapshots": false,
  "trendsUrls": [],
  "sheetId": "",
  "topicCategory": "",
  "maxKeywordRows": 0,
  "exactDateWindow": "",
  "fetchConcurrency": 10,
  "requestRetryLimit": 7,
  "requestTimeoutSecs": 180,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call simpleapi/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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