# Google Trends Scraper - Interest, Regions & Trends (`scrapesage/google-trends-scraper`) Actor

Scrape Google Trends with no browser or API key: interest over time, interest by region, related & rising queries/topics, multi-keyword comparison, and real-time Trending Now searches with traffic & news. Web, YouTube, News, Image & Shopping trends. Monitoring mode.

- **URL**: https://apify.com/scrapesage/google-trends-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** SEO tools, News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 keyword analyses

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 & Trending Now

Extract **complete Google Trends data** without a browser or API key: **interest over time**, **interest by region** (country → state → city → metro), **related & rising queries and topics**, **multi-keyword comparison** on one relative 0–100 scale, and **real-time Trending Now** searches with traffic estimates and related news.

Pure JSON extraction from Google Trends' own endpoints — **fast, reliable, and cheap**. Covers **Web, YouTube, News, Image and Google Shopping** trends, any country, any time range from the **past hour to 2004**.

No login, no cookies you have to supply, no Puppeteer flakiness.

### Why this Google Trends scraper?

Most Trends scrapers are browser-based (slow, fragile, frequently failing) or only cover one slice — usually web-search interest over time. This actor hits Google Trends' internal data API directly and ships the **richest, most complete dataset in the category**, in one tool:

| Capability | Typical scrapers | This actor |
|---|---|---|
| Interest over time (full series + avg/peak/latest/direction) | partial | ✅ |
| Interest by region (country / state / city / metro) | ❌ often | ✅ |
| Related **queries** — top **and** rising | partial | ✅ |
| Related **topics** — top **and** rising | ❌ | ✅ when Google serves them |
| Multi-keyword **comparison** (2–5 on one scale + winner) | ❌ | ✅ |
| **YouTube / News / Image / Shopping** trends (not just web) | ❌ | ✅ |
| **Trending Now** with traffic estimate + related news | partial | ✅ |
| **Monitoring mode** — only new trending searches | ❌ | ✅ |
| No browser (fast & reliable) · no API key · no start fee | ❌ | ✅ |

### Use cases

- **SEO & content strategy** — find rising queries and topics before they peak, size demand by region, and prioritize content around what people are actually searching for.
- **Market & product research** — compare brands, products, or features (`compare` mode) and see who's winning, where, and which direction interest is moving.
- **Newsrooms & trend desks** — pull **Trending Now** every few minutes (with Monitoring mode) to catch breaking interest with the supporting news articles already attached.
- **Marketing & PPC** — discover seasonal demand, geo-target campaigns by the regions with the highest interest, and track branded vs. competitor search.
- **Finance & trading** — track search interest in tickers, coins, and themes as an alt-data demand signal across `today 5-y` or custom windows.
- **YouTube & e-commerce** — switch the property to **YouTube** or **Google Shopping** to research demand on the surface that matters to you.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **Google Trends Scraper**, pick a **mode**, enter your keywords (and a location/time range), and click **Start**.
3. Watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "keywords",
    "searchTerms": ["bitcoin", "ethereum"],
    "geo": "US",
    "timeRange": "today 12-m",
    "searchType": "web",
    "dataTypes": ["interestOverTime", "interestByRegion", "relatedQueries", "relatedTopics"]
}
````

- **mode** — `keywords` (full analysis per keyword), `compare` (2–5 keywords on one relative scale), or `trending` (real-time Trending Now searches).
- **searchTerms** — the keywords to analyze. In `compare` mode the first 2–5 are compared together.
- **startUrls** — *(optional)* paste Google Trends Explore URLs (e.g. `https://trends.google.com/trends/explore?q=bitcoin&geo=US&date=today%2012-m`); the keywords, geo, time range, category and property are read straight from the URL.
- **geo** — blank = Worldwide, or a Google geo code: `US`, `GB`, `IN`, `DE`, US states `US-CA`, metros `US-CA-807`. In `trending` mode this is the 2-letter country (default `US`).
- **timeRange** — `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 `custom`.
- **customTimeRange** — used when `timeRange = custom`, e.g. `2023-01-01 2024-06-30`.
- **searchType** — `web` (default), `images`, `news`, `youtube`, or `froogle` (Google Shopping).
- **category** — restrict to a Google Trends category id (0 = All; e.g. `7` Finance, `5` Computers & Electronics, `71` Food & Drink).
- **dataTypes** — which breakdowns to fetch per keyword: `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics`.
- **regionResolution** — `COUNTRY`, `REGION`, `CITY`, `DMA`, or blank (auto).
- **monitorMode** *(default false)* — output only items not seen in previous runs (ideal for `trending`).
- **language**, **maxItems**, **maxConcurrency**, **proxyConfiguration** — fine-tuning.

### Output

**Keyword analysis** (`type: "keywordTrend"`) — one rich record per keyword:

```json
{
    "type": "keywordTrend",
    "keyword": "bitcoin",
    "geo": "US",
    "geoLabel": "US",
    "timeRange": "today 12-m",
    "property": "web",
    "category": 0,
    "averageInterest": 42.3,
    "peakInterest": 100,
    "peakDate": "Nov 16 – 22, 2025",
    "latestInterest": 25,
    "latestIsPartial": true,
    "trendDirection": "falling",
    "dataPoints": 52,
    "interestOverTime": [
        { "date": "Jun 15 – 21, 2025", "timestamp": 1750000000, "value": 27 },
        { "date": "Jun 14 – 20, 2026", "timestamp": 1781000000, "value": 25, "isPartial": true }
    ],
    "interestByRegion": [
        { "geoName": "Wyoming", "geoCode": "US-WY", "value": 100 },
        { "geoName": "Nevada", "geoCode": "US-NV", "value": 47 }
    ],
    "topRegions": ["Wyoming", "Hawaii", "Nevada", "California", "New Jersey"],
    "relatedQueries": {
        "top": [{ "query": "bitcoin price", "value": 100, "link": "https://trends.google.com/trends/explore?q=bitcoin+price" }],
        "rising": [{ "query": "bitcoin hyper", "value": 4950, "formattedValue": "Breakout" }]
    },
    "relatedTopics": {
        "top": [{ "topic": "Bitcoin", "type": "Cryptocurrency", "mid": "/m/05p0rrx", "value": 100 }],
        "rising": [{ "topic": "Bitcoin ETF", "type": "Topic", "formattedValue": "+250%" }]
    },
    "risingQueries": ["bitcoin hyper", "how to buy bitcoin safely"],
    "trendsUrl": "https://trends.google.com/trends/explore?geo=US&q=bitcoin&hl=en-US",
    "scrapedAt": "2026-06-16T12:00:00.000Z"
}
```

**Comparison** (`type: "comparison"`) — keywords on one relative scale with `winner`, per-keyword `averageInterest`/`peakInterest`, a comparison `timeline`, and `regionComparison`.

**Trending Now** (`type: "trendingSearch"`) — one record per trending search:

```json
{
    "type": "trendingSearch",
    "title": "korea vs mexico",
    "geo": "US",
    "rank": 1,
    "approxTraffic": "500+",
    "approxTrafficNumber": 500,
    "pubDate": "2026-06-17T03:20:00.000Z",
    "picture": "https://encrypted-tbn2.gstatic.com/images?q=...",
    "pictureSource": "CBS Sports",
    "newsArticleCount": 3,
    "newsArticles": [
        { "title": "Mexico vs. South Korea: World Cup 2026 Match Preview", "url": "https://www.cbssports.com/...", "source": "CBS Sports" }
    ],
    "trendsUrl": "https://trends.google.com/trends/explore?date=now+7-d&geo=US&q=korea+vs+mexico&hl=en-US",
    "scrapedAt": "2026-06-16T12:00:00.000Z"
}
```

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it hourly/daily to track keyword interest, or every few minutes to capture Trending Now; combine with **Monitoring mode** to output only what's new.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (Slack alert, CMS draft, CRM update) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/google-trends-scraper').call({
    mode: 'compare',
    searchTerms: ['chatgpt', 'gemini', 'claude'],
    geo: 'US',
    timeRange: 'today 12-m',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].winner, items[0].averageInterest);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push trending topics or rising queries straight into your content workflow.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get pinged when a monitored country has new trending searches.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "compare interest in chatgpt vs gemini in the US over the last year" and let it run this scraper for you.

### More scrapers from scrapesage

Build a complete **search-demand & marketing-intelligence stack**:

- **[Keyword Research Scraper](https://apify.com/scrapesage/keyword-research-scraper)** — multi-platform autocomplete & search-volume keywords (Google, YouTube, Amazon, Bing & more).
- **[Google News Scraper](https://apify.com/scrapesage/google-news-scraper)** — articles, real publisher URLs, full text and related coverage.
- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** — channels, videos, and creator contacts.
- **[Google Ads Transparency Scraper](https://apify.com/scrapesage/google-ads-transparency-scraper)** — who's advertising what on Google.
- **[Facebook Ad Library Scraper](https://apify.com/scrapesage/facebook-ad-library-scraper)** — competitor ad intelligence across Meta & Instagram.
- **[LinkedIn Ad Library Scraper](https://apify.com/scrapesage/linkedin-ad-library-scraper)** — B2B ad creative and spend signals.
- **[Yahoo Finance Scraper](https://apify.com/scrapesage/yahoo-finance-scraper)** — quotes, fundamentals, and market data.
- **[CoinGecko Crypto Scraper](https://apify.com/scrapesage/coingecko-crypto-scraper)** — crypto prices, markets, and trending coins.

### Tips

- **Interest is relative, not absolute.** Google Trends values are 0–100 scaled within each request — `100` is the peak point in that query, not a search count. To compare keywords directly, use `compare` mode so they share one scale.
- **Hourly vs. daily vs. weekly buckets** are chosen by Google from your `timeRange`: `now 1-H`…`now 7-d` = hourly/minute data, `today 1-m`/`3-m` = daily, `today 12-m`+ = weekly.
- **The latest point is often partial** (`isPartial: true`) — the current period isn't finished, so it usually reads low. Use `trendDirection`/`averageInterest` rather than the last point alone.
- **Rate limits**: Google Trends limits per IP. Keep `maxConcurrency` at 2–4; the actor rotates proxy IPs and retries automatically. If a big run gets throttled, switch the proxy group to RESIDENTIAL.
- **Reproduce a chart**: build it in the Trends UI, copy the URL, and drop it into `startUrls`.

### FAQ

**Do I need a Google Trends API key?** No. Google Trends has no official public API — this actor reads the same internal endpoints the trends.google.com site uses, no key or login required.

**What do the numbers mean?** Interest is a 0–100 index relative to the highest point of the query (by time and place). It's a measure of *relative popularity*, not absolute search volume.

**Can I compare several keywords fairly?** Yes — use `compare` mode with 2–5 keywords. They're returned on one shared 0–100 scale with a computed `winner`, per-keyword averages, and a regional comparison.

**Can I get trends for YouTube or Shopping, not just web search?** Yes — set `searchType` to `youtube`, `news`, `images`, or `froogle` (Google Shopping).

**Why is `relatedTopics` sometimes empty?** Related *topics* are entity-based and Google has been serving them very sparsely through the Trends data endpoint for everyone — when Google returns no topics for a query, the field is simply absent. Related *queries* (top & rising) are unaffected and returned in full.

**How do I monitor trending searches automatically?** Run `trending` mode on a [Schedule](https://docs.apify.com/platform/schedules) with **Monitoring mode** on — each run outputs only the searches that newly started trending, perfect for alerts and newsletters.

**Does Monitoring mode conflict with Apify Schedules?** No — they're complementary. The schedule *starts* the run on your cron; Monitoring mode *filters* the output to what's new since the last run. Use them together.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**Is scraping Google Trends legal?** This actor collects publicly available, aggregated, non-personal trend data. You are responsible for using the data in compliance with applicable laws and Google's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

<b>Keyword analysis</b> = full Google Trends breakdown for each keyword (interest over time, by region, related & rising queries/topics). <b>Compare keywords</b> = put 2–5 keywords on one relative 0–100 scale (who's winning, where). <b>Trending Now</b> = real-time trending searches for a country with traffic estimates and related news (great with Monitoring mode).

## `searchTerms` (type: `array`):

Search terms to analyze, e.g. <code>bitcoin</code>, <code>chatgpt</code>, <code>iphone 16</code>. In <b>Keyword analysis</b> each term gets its own record; in <b>Compare</b> the first 2–5 terms are compared on one scale. Not needed for <b>Trending Now</b>.

## `startUrls` (type: `array`):

Paste Google Trends Explore URLs (e.g. <code>https://trends.google.com/trends/explore?q=bitcoin\&geo=US\&date=today%2012-m</code>). The keywords, geo, time range, category and property are read straight from the URL — handy for reproducing a chart you built in the Trends UI.

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

Where to measure interest. Leave blank for <b>Worldwide</b>, or use a Google geo code: country (<code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>), US state (<code>US-CA</code>, <code>US-NY</code>) or metro (<code>US-CA-807</code>). In <b>Trending Now</b> mode this is the 2-letter country (defaults to <code>US</code>).

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

How far back to measure interest. Pick <b>Custom</b> to supply your own range below.

## `customTimeRange` (type: `string`):

Used only when Time range = <b>Custom</b>. Format <code>YYYY-MM-DD YYYY-MM-DD</code> (e.g. <code>2023-01-01 2024-06-30</code>). For hourly data use <code>YYYY-MM-DDTHH YYYY-MM-DDTHH</code>.

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

Which Google surface to measure: <b>Web Search</b> (default), <b>Image</b>, <b>News</b>, <b>YouTube</b> or <b>Google Shopping</b> search. A standout differentiator — most scrapers only do web search.

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

Restrict interest to one Google Trends category id (0 = All categories). Examples: <code>7</code> Finance, <code>5</code> Computers & Electronics, <code>71</code> Food & Drink, <code>20</code> Sports, <code>45</code> Health. See the Trends category list for more ids.

## `dataTypes` (type: `array`):

Which breakdowns to fetch per keyword. Fewer types = faster & cheaper. Ignored in Trending Now mode.

## `regionResolution` (type: `string`):

Granularity for the interest-by-region breakdown. <b>Auto</b> lets Google choose based on the location (countries worldwide, states for a country, metros for a state).

## `language` (type: `string`):

Interface language for labels & related results, e.g. <code>en-US</code>, <code>en-GB</code>, <code>es</code>, <code>de</code>, <code>fr</code>, <code>pt-BR</code>.

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

Maximum number of records to output. Mainly limits <b>Trending Now</b> (one record per trending search); keyword/compare runs are bounded by your keyword list.

## `monitorMode` (type: `boolean`):

Remember what was seen in previous runs (in a named key-value store) and output ONLY new items — ideal for <b>Trending Now</b> to capture only freshly trending searches. Works together with Apify <a href='https://docs.apify.com/platform/schedules'>Schedules</a> (the schedule starts the run; monitoring filters to what's new).

## `monitorKey` (type: `string`):

Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per country) so different monitors don't share state.

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

Maximum parallel keyword analyses. Google Trends rate-limits per IP — keep this low (2–4); the actor rotates proxy IPs and retries on rate limits.

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

Proxy settings. The default Apify Proxy rotates IPs so the per-IP Google Trends rate limit is spread across many addresses. If a run is rate-limited, try the RESIDENTIAL group.

## Actor input object example

```json
{
  "mode": "keywords",
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "timeRange": "today 12-m",
  "searchType": "web",
  "category": 0,
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "relatedTopics"
  ],
  "regionResolution": "",
  "language": "en-US",
  "maxItems": 500,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped records as JSON items in the 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 = {
    "searchTerms": [
        "bitcoin",
        "ethereum"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/google-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/google-trends-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Trends Scraper - Interest, Regions & Trends",
        "description": "Scrape Google Trends with no browser or API key: interest over time, interest by region, related & rising queries/topics, multi-keyword comparison, and real-time Trending Now searches with traffic & news. Web, YouTube, News, Image & Shopping trends. Monitoring mode.",
        "version": "0.1",
        "x-build-id": "TAG4wkpiht7U5bDVc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~google-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapesage~google-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapesage~google-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-google-trends-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "What to scrape",
                        "enum": [
                            "keywords",
                            "compare",
                            "trending"
                        ],
                        "type": "string",
                        "description": "<b>Keyword analysis</b> = full Google Trends breakdown for each keyword (interest over time, by region, related & rising queries/topics). <b>Compare keywords</b> = put 2–5 keywords on one relative 0–100 scale (who's winning, where). <b>Trending Now</b> = real-time trending searches for a country with traffic estimates and related news (great with Monitoring mode).",
                        "default": "keywords"
                    },
                    "searchTerms": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Search terms to analyze, e.g. <code>bitcoin</code>, <code>chatgpt</code>, <code>iphone 16</code>. In <b>Keyword analysis</b> each term gets its own record; in <b>Compare</b> the first 2–5 terms are compared on one scale. Not needed for <b>Trending Now</b>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Trends URLs (optional)",
                        "type": "array",
                        "description": "Paste Google Trends Explore URLs (e.g. <code>https://trends.google.com/trends/explore?q=bitcoin&geo=US&date=today%2012-m</code>). The keywords, geo, time range, category and property are read straight from the URL — handy for reproducing a chart you built in the Trends UI.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "geo": {
                        "title": "Location (geo)",
                        "type": "string",
                        "description": "Where to measure interest. Leave blank for <b>Worldwide</b>, or use a Google geo code: country (<code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>), US state (<code>US-CA</code>, <code>US-NY</code>) or metro (<code>US-CA-807</code>). In <b>Trending Now</b> mode this is the 2-letter country (defaults to <code>US</code>)."
                    },
                    "timeRange": {
                        "title": "Time range",
                        "enum": [
                            "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",
                            "custom"
                        ],
                        "type": "string",
                        "description": "How far back to measure interest. Pick <b>Custom</b> to supply your own range below.",
                        "default": "today 12-m"
                    },
                    "customTimeRange": {
                        "title": "Custom time range",
                        "type": "string",
                        "description": "Used only when Time range = <b>Custom</b>. Format <code>YYYY-MM-DD YYYY-MM-DD</code> (e.g. <code>2023-01-01 2024-06-30</code>). For hourly data use <code>YYYY-MM-DDTHH YYYY-MM-DDTHH</code>."
                    },
                    "searchType": {
                        "title": "Search property",
                        "enum": [
                            "web",
                            "images",
                            "news",
                            "youtube",
                            "froogle"
                        ],
                        "type": "string",
                        "description": "Which Google surface to measure: <b>Web Search</b> (default), <b>Image</b>, <b>News</b>, <b>YouTube</b> or <b>Google Shopping</b> search. A standout differentiator — most scrapers only do web search.",
                        "default": "web"
                    },
                    "category": {
                        "title": "Category filter",
                        "type": "integer",
                        "description": "Restrict interest to one Google Trends category id (0 = All categories). Examples: <code>7</code> Finance, <code>5</code> Computers & Electronics, <code>71</code> Food & Drink, <code>20</code> Sports, <code>45</code> Health. See the Trends category list for more ids.",
                        "default": 0
                    },
                    "dataTypes": {
                        "title": "Data to include (Keyword / Compare)",
                        "type": "array",
                        "description": "Which breakdowns to fetch per keyword. Fewer types = faster & cheaper. Ignored in Trending Now mode.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "interestOverTime",
                                "interestByRegion",
                                "relatedQueries",
                                "relatedTopics"
                            ],
                            "enumTitles": [
                                "Interest over time",
                                "Interest by region",
                                "Related queries (top & rising)",
                                "Related topics (top & rising)"
                            ]
                        },
                        "default": [
                            "interestOverTime",
                            "interestByRegion",
                            "relatedQueries",
                            "relatedTopics"
                        ]
                    },
                    "regionResolution": {
                        "title": "Region resolution (Interest by region)",
                        "enum": [
                            "",
                            "COUNTRY",
                            "REGION",
                            "CITY",
                            "DMA"
                        ],
                        "type": "string",
                        "description": "Granularity for the interest-by-region breakdown. <b>Auto</b> lets Google choose based on the location (countries worldwide, states for a country, metros for a state).",
                        "default": ""
                    },
                    "language": {
                        "title": "Language (hl)",
                        "type": "string",
                        "description": "Interface language for labels & related results, e.g. <code>en-US</code>, <code>en-GB</code>, <code>es</code>, <code>de</code>, <code>fr</code>, <code>pt-BR</code>.",
                        "default": "en-US"
                    },
                    "maxItems": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of records to output. Mainly limits <b>Trending Now</b> (one record per trending search); keyword/compare runs are bounded by your keyword list.",
                        "default": 500
                    },
                    "monitorMode": {
                        "title": "Monitoring mode — only new results",
                        "type": "boolean",
                        "description": "Remember what was seen in previous runs (in a named key-value store) and output ONLY new items — ideal for <b>Trending Now</b> to capture only freshly trending searches. Works together with Apify <a href='https://docs.apify.com/platform/schedules'>Schedules</a> (the schedule starts the run; monitoring filters to what's new).",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per country) so different monitors don't share state.",
                        "default": "default"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Maximum parallel keyword analyses. Google Trends rate-limits per IP — keep this low (2–4); the actor rotates proxy IPs and retries on rate limits.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The default Apify Proxy rotates IPs so the per-IP Google Trends rate limit is spread across many addresses. If a run is rate-limited, try the RESIDENTIAL group.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
