# Google Trends Scraper & API | Interest, Regions & Trending (`corvuslab/google-trends-scraper`) Actor

Scrape Google Trends for any keyword, topic or Trends link: interest over time with average, peak and trend %, interest by region, city and US metro, and top and rising

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

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Google Trends Scraper do?

Google Trends Scraper turns any keyword, topic or Google Trends link into a **complete [Google Trends](https://trends.google.com/trends/) report in one record**: interest over time with ready-made summary stats (average, peak, peak date, latest value, trend %), interest by region, city and US metro (DMA), top and rising **related queries** and, on request, **related topics**. A second mode, **Trending now**, lists the searches surging right now in any country, with approximate traffic and the news behind each one. Up to **40 structured fields**, no code needed, exported as JSON, CSV, Excel or via the API to your AI agent.

> New to Apify? [Sign up free](https://console.apify.com/sign-up) and use the included monthly platform credit to try this Actor — no credit card needed.

**Why this scraper**

- ⚡ **Fast & low-cost** — 100 full keyword reports finish in under 3 minutes.
- 🛡️ **Keeps going when Google pushes back** — a refused connection is swapped for a backup one instead of failing your searches.
- 🧾 **One report per keyword** — every section in a single record, not six exports to stitch together.
- 🎯 **You pay for data, not for gaps** — searches Google has too little data for and duplicate terms are not charged.
- 🤖 **AI- & API-ready** — switch off the sections you don't need for lean, MCP-friendly records.

***

### What data can you extract from Google Trends?

The dataset schema defines **40 fields** across two record types — keyword reports and trending searches — grouped like this:

| Group | What you get |
|---|---|
| **Interest over time** | The full 0–100 timeline (`date`, label, `value`, partial flag) plus `averageInterest`, `peakInterest`, `peakDate`, `latestInterest`, `trendChangePercent` and, for comparisons, `comparisonAverage` |
| **Where people search** | `interestByRegion` (countries or states/regions), `interestByCity` with latitude and longitude, `interestByMetro` for the 210 US DMA markets |
| **Related searches** | `relatedQueriesTop` and `relatedQueriesRising` with value, "+450%" labels and Breakout flags; `relatedTopicsTop` and `relatedTopicsRising` with topic type and topic id (on request, best effort) |
| **Report context** | `searchTerm`, `comparedWith`, `geo` / `geoName`, `timeRange` / `timeRangeName`, `category` / `categoryName`, `searchProperty`, a ready-to-open `trendsUrl`, `incompleteSections` |
| **Trending now** | `title`, `rank`, `approxTraffic` and `approxTrafficNumber`, `startedAt`, `pictureUrl` and `pictureSource`, `newsItems` (headline, link, picture, publisher), `newsCount` |

***

### Key features

- 🔎 **Keywords, topics or URLs** — search terms, Google topic ids such as `/m/05z1_`, or pasted explore links with all their settings.
- 📈 **Summary stats on every report** — sort a thousand keywords by momentum, no charting needed.
- ⚖️ **True side-by-side comparisons** — `coffee, tea, matcha` on one line with `compareTerms` on: up to 5 terms share one 0–100 scale, like the Google Trends compare view.
- 🎚️ **Every Google Trends filter** — 250 countries plus Worldwide, regions and metros, 9 preset periods or custom dates, 300 categories, 28 languages and 5 search types.
- 🔥 **Trending now, country by country** — with approximate traffic, start time, a picture and linked news stories.
- 🔔 **Only-new monitoring with alerts** — schedule it, get each new trending search once (repeats are not charged), straight to Telegram, Slack, Discord or any webhook.

***

### 🚀 How to scrape Google Trends

1. Open the Actor and enter your **Search terms**, one per line (e.g. `electric bikes`) — or paste a Google Trends explore URL.
2. Pick a **Location**, **Time range**, **Category** and **Search type**, or leave the defaults (Worldwide, past 12 months, all categories, web search).
3. Choose the **report sections** you want; all but US metro and related topics are on by default. Want related topics? Switch on **Related topics**.
4. Click **Start** — one report per term streams into the Output tab.
5. Download as **JSON, CSV or Excel**, or pull from the **API**.

> ℹ️ **Related topics are best effort.** Google rations them and often holds them back. When it does, your report still arrives with every other section and lists `"related topics"` in `incompleteSections`, so an empty list never passes for a real one. Related queries are not affected.

No login, no cookies, no Google account. Leave the input empty and it returns a sample report for `web scraping`.

#### Quick-start example input

```json
{ "searchTerms": ["electric bikes", "e-scooter"], "geo": "US", "timeRange": "today 5-y" }
```

This returns two US reports over the past five years, each with the weekly timeline, its average, peak and trend %, interest by state and city, and related queries: which category is growing, and where.

***

### Input

**31 inputs**, grouped as in the editor; set them in the visual editor or pass JSON via the API.

#### 🔎 Search

| Field | Type | What it does |
|---|---|---|
| `mode` | enum | `keywords` (trend reports, default) or `trendingNow` (top searches by country). |
| `searchTerms` | array | Keywords or topic ids, one per line; each line becomes one report. |
| `compareTerms` | boolean | Read a comma in a line as a comparison (`coffee, tea, matcha`), up to 5 per scale. |
| `startUrls` | array | Trends explore or Trending now links, settings used as-is; an unusable link is skipped with a note. |

#### 🎚️ Filters

| Field | Type | What it does |
|---|---|---|
| `geo` | enum | Worldwide (compares countries) or one of 250 countries (breaks down by region and city). |
| `regionCode` | string | A state, region or metro such as `US-CA`, `GB-SCT` or `US-NY-501`. Overrides Location. |
| `timeRange` | enum | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months (default), 5 years, or 2004–present. |
| `customTimeRange` | string | `YYYY-MM-DD YYYY-MM-DD`, e.g. `2024-01-01 2024-06-30`. Overrides Time range. |
| `category` | enum | One of 300 categories, e.g. Finance or Sports › Soccer. |
| `searchProperty` | enum | Web search (default), Image search, News search, Google Shopping or YouTube search. |
| `language` | enum | 28 languages for topic names, region names and date labels. |

#### 📊 Report sections

| Field | Type | What it does |
|---|---|---|
| `includeInterestOverTime` | boolean | Timeline plus summary stats (on). |
| `includeInterestByRegion` | boolean | Per country or per state / region (on). |
| `includeInterestByCity` | boolean | Per city, with coordinates (on). |
| `includeInterestByMetro` | boolean | Per US metro (DMA), United States searches only (off). |
| `includeRelatedQueries` | boolean | Top and rising related queries (on). |
| `includeRelatedTopics` | boolean | Top and rising related topics (off; best effort, see FAQ). |

#### 🔥 Trending now

| Field | Type | What it does |
|---|---|---|
| `trendingCountries` | array | Countries to list; one Google publishes no list for is named in the run status. |
| `onlyNewTrending` | boolean | Deliver only trending searches earlier runs did not deliver. |
| `stateKey` | string | Optional memory name shared by runs; defaults to one per set of countries. |

#### 🔔 Trend alerts

| Field | Type | What it does |
|---|---|---|
| `telegramToken`, `telegramChatId`, `slackWebhookUrl`, `discordWebhookUrl`, `webhookUrl`, `webhookHeaders` | string / object | Alert channels (see the alerts section). Tokens and webhook URLs are secret. |
| `notificationLimit` | integer | How many trending searches each alert lists (default 5). |

#### ⚙️ Advanced

| Field | Type | What it does |
|---|---|---|
| `maxItems` | integer | Stop after this many records (reports or trending searches). Empty or 0 = no limit. |
| `maxConcurrency` | integer | How many searches run at the same time (default 4). |
| `maxRequestRetries` | integer | Retries per request before its search is reported as failed (default 6). |
| `proxyConfiguration` | object | Optional, not needed. |

#### More example inputs

Compare three drinks on one scale in California, measured on YouTube search:

```json
{ "searchTerms": ["coffee, tea, matcha"], "compareTerms": true, "regionCode": "US-CA", "searchProperty": "youtube" }
```

Paste an explore link you already built in the browser, and add US metro data:

```json
{ "startUrls": [{ "url": "https://trends.google.com/trends/explore?q=solar%20panels&geo=US&date=today%205-y" }], "includeInterestByMetro": true }
```

***

### Output

Each keyword item is one **trend report** for one term. A real record from a `coffee, tea, matcha` comparison in the United States with every section on, trimmed (the full one has 53 weekly points, 51 states, 45 cities, 210 metros, 25 + 25 queries and 18 + 3 topics):

```json
{
  "recordType": "keyword",
  "searchTerm": "coffee",
  "comparedWith": ["tea", "matcha"],
  "inputUrlOrTerm": "coffee",
  "geo": "US",
  "geoName": "United States",
  "timeRange": "today 12-m",
  "timeRangeName": "Past 12 months",
  "category": 0,
  "categoryName": "All categories",
  "searchProperty": "Web search",
  "trendsUrl": "https://trends.google.com/trends/explore?q=coffee%2Ctea%2Cmatcha&date=today+12-m&hl=en-US&geo=US",
  "interestOverTime": [
    { "date": "2025-11-09T00:00:00Z", "formattedTime": "Nov 9 – 15, 2025", "value": 72, "hasData": true, "isPartial": false },
    { "date": "2026-11-08T00:00:00Z", "formattedTime": "Nov 8 – 14, 2026", "value": 69, "hasData": true, "isPartial": true }
  ],
  "averageInterest": 78.8,
  "peakInterest": 100,
  "peakDate": "2026-04-12T00:00:00Z",
  "latestInterest": 65,
  "trendChangePercent": -1.4,
  "comparisonAverage": 79,
  "interestByRegion": [
    { "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 }
  ],
  "regionResolution": "REGION",
  "interestByCity": [
    { "geoCode": null, "geoName": "Leesburg", "value": 100, "lat": 39.1156615, "lng": -77.5636015 }
  ],
  "interestByMetro": [
    { "geoCode": "759", "geoName": "Cheyenne WY-Scottsbluff NE", "value": 100 }
  ],
  "relatedQueriesTop": [
    { "query": "coffee near me", "value": 100, "formattedValue": "100", "isBreakout": null, "link": "https://trends.google.com/trends/explore?q=coffee+near+me&date=today+12-m&geo=US" }
  ],
  "relatedQueriesRising": [
    { "query": "coffee shops nearby", "value": 3800, "formattedValue": "+3,800%", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=coffee+shops+nearby&date=today+12-m&geo=US" }
  ],
  "relatedTopicsTop": [
    { "title": "Coffee", "type": "Beverage", "mid": "/m/02vqfm", "value": 100, "formattedValue": "100", "isBreakout": null, "link": "https://trends.google.com/trends/explore?q=/m/02vqfm&date=today+12-m&geo=US" }
  ],
  "relatedTopicsRising": [
    { "title": "Keurig", "type": "Topic", "mid": "/g/122hpghb", "value": 450, "formattedValue": "+450%", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=/g/122hpghb&date=today+12-m&geo=US" }
  ],
  "incompleteSections": [],
  "source": "trends.google.com",
  "scrapedAt": "2026-11-13T23:07:27+00:00"
}
```

In **Trending now** mode each item is one **trending search**. A real record from the United States:

```json
{
  "recordType": "trendingSearch",
  "id": "5978ea503e662007",
  "title": "angelina jolie",
  "geo": "US",
  "geoName": "United States",
  "rank": 1,
  "approxTraffic": "100+",
  "approxTrafficNumber": 100,
  "startedAt": "2026-11-14T09:00:00Z",
  "pictureUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7FlXB9lIJILrOJ65nv3pKxQMD5pr-lvgd18qESJSVNK_it9oxPbx37Lcmdh4",
  "pictureSource": "Page Six",
  "newsItems": [
    { "title": "Angelina Jolie, Brad Pitt's daughter Vivienne reveals hospitalization for eating disorder at LA art exhibit", "url": "https://pagesix.com/2026/11/13/celebrity-news/angelina-jolie-brad-pitts-daughter-vivienne-reveals-hospitalization-for-eating-disorder-at-la-art-exhibit/", "source": "Page Six" }
  ],
  "newsCount": 3,
  "trendsUrl": "https://trends.google.com/trends/explore?q=angelina+jolie&date=now+1-d&hl=en-US&geo=US",
  "source": "trends.google.com",
  "scrapedAt": "2026-11-14T09:13:40+00:00"
}
```

Each `trendsUrl` opens the same view on Google Trends, so anyone can check a number in one click.

#### Data fields

The fields are grouped in the table under *What data can you extract* above. A section that came back empty is `[]`; one that could not be read is `null` and named in `incompleteSections`. Sections you switch off are left out of the record, `interestByMetro` appears only on United States searches with US metro turned on, and `comparisonAverage` only on comparisons. The Output tab ships two ready-made views: **Keyword trends** (term, location, period, average, peak, peak date, latest, trend %, rising queries and topics, Trends link) and **Trending now** (rank, search, country, traffic, start time, news, picture).

***

### 🔔 How to get alerts for new Google Trends searches

Schedule **Trending now** with **Only new trending searches** on, and every new search reaches your phone or team chat once, as soon as it starts trending. A search is delivered once and repeats are **never charged**, so you pay for new searches only, however often you check.

1. Set **What to scrape** to Trending now and pick your **countries**.
2. Turn on **Only new trending searches**.
3. Fill in the alert channels you want:

| Channel | What to configure |
|---|---|
| ✈️ **Telegram** | `telegramToken` (from @BotFather) + `telegramChatId` |
| 💬 **Slack** | `slackWebhookUrl` (Incoming Webhook URL) |
| 🎮 **Discord** | `discordWebhookUrl` (channel webhook URL) |
| 🪝 **Webhook** | `webhookUrl` receives structured JSON — ideal for n8n / Make / Zapier; add `webhookHeaders` for auth |

4. Run it once. The first run delivers today's lists and remembers them.
5. Open the **Schedules** tab and set a recurring run, e.g. every hour.

Each alert lists up to `notificationLimit` new searches with country, approximate traffic and a Trends link. A broken channel never stops the scrape or the other channels.

Tracking keywords instead? Schedule your list weekly and follow `trendChangePercent` per `searchTerm`.

***

### 💡 What can you do with Google Trends data?

#### Keyword research and SEO planning

Run your keyword list and sort by `trendChangePercent` to see what is gaining and what is fading. Rising queries and Breakout terms surface content ideas before keyword tools catch up.

#### Product and market research

Compare product categories, brands or features on one scale and see where demand is growing. Interest by state, city and US metro (DMA) shows which markets to launch in, or where to buy local ads.

#### Seasonality and demand forecasting

Five years of weekly interest with `peakDate` shows when demand peaks each year, ready to feed a forecast for stock, staffing and ad budgets.

#### Newsjacking and real-time content

Trending now with only-new alerts tells your newsroom or social team what the country is searching for the moment it starts, with the news stories already attached.

#### Brand and competitor tracking

Schedule a comparison of your brand against the category leaders and watch the gap week by week; YouTube, News and Shopping search show where the attention comes from.

***

### 💰 How much does it cost to scrape Google Trends?

This Actor uses Apify's **pay-per-result** model: you pay for the records you receive — one keyword report or one trending search each. Searches Google has too little data for, searches that failed, duplicate terms and trending searches already seen are not charged. See the Actor's **Pricing** tab for the current numbers.

Two things cut your bill further:

- **Max results** — set `maxItems` to cap any run exactly.
- **Only new trending searches** — after the first run you pay only for trends you haven't seen before.

***

### 🔌 Integrations & export

Export to **JSON, CSV or Excel**, pull from the **API**, run on a **schedule**, connect **Google Sheets, Make, Zapier or n8n**, or call it as an **MCP tool** for AI agents.

***

### 🔗 Using the API

Run this Actor from your own code. Example with the Apify Python client:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "searchTerms": ["electric bikes", "e-scooter"],
    "geo": "US",
    "timeRange": "today 5-y",
}

run = client.actor("corvuslab/google-trends-scraper").call(run_input=run_input)

for report in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(report["searchTerm"], report["averageInterest"], report["trendChangePercent"])
```

***

### ❓ FAQ

**Why are the values 0–100 and not search volumes?** That is how Google Trends reports interest: 100 is the peak for the chosen place and period, 50 is half as popular. Use `compareTerms` to put terms on one scale. Trending now is the exception: it carries Google's approximate search count (`approxTraffic`, e.g. "100+").

**Why are related topics off by default?** Google rations them, and on busy days holds them back for nearly every report, so leaving them off keeps runs fast and reports complete. With `includeRelatedTopics` on, held-back topics are `null` and flagged in `incompleteSections`, a term that genuinely has none gets `[]`, and the run waits about 20 seconds once to ask again.

**Why are there few or no cities for my term?** Google only reports cities with enough searches, so city data is sparse for niche terms and small countries; regions and metros are usually fuller.

**How is `trendChangePercent` calculated?** It compares the average of the first quarter of the period with the average of the last quarter, using complete points only. `latestInterest` is the last complete point too — the current week or day is often still partial and flagged `isPartial: true` in the timeline.

**How many trending searches does Trending now return?** Google's current list for each country, about 10 per country per run. Add more countries for a wider net.

**What if I compare more than 5 terms?** Google compares at most 5 on one scale, so a longer line is split into groups of 5, and the run log says so.

**What if Google has no data for my term?** Google Trends has "not enough data" for very rare terms, narrow regions or short periods. Such a search delivers no record, is not charged, and the run status names it. In a comparison every term keeps its report, since a low value there is still an answer.

**How many reports can one run handle?** Up to 5,000 records. If a long list would outrun the run's timeout, the Actor stops shortly before it, keeps every report already delivered and says so in the run status.

***

### 🧭 More scrapers from us

Found a rising search? These pick up where Google Trends stops.

| Scraper | What it adds |
|---|---|
| [Google Shopping Scraper](https://apify.com/corvuslab/google-shopping-scraper) | What it sells for and which stores sell it, in 29 countries |
| [TikTok Shop Scraper](https://apify.com/corvuslab/tiktok-shop-scraper) | Whether it already sells on TikTok: price, units sold, ratings |
| [TikTok Shop Creator Scraper](https://apify.com/corvuslab/tiktok-shop-creator-finder) | The creators already selling it, with followers and bio email |
| [Google Ads Scraper](https://apify.com/corvuslab/google-ads-transparency-scraper) | Every ad a brand runs on Google, with reach by country |
| [Facebook Ads Library Scraper](https://apify.com/corvuslab/facebook-ads-library-scraper) | Ad copy, creatives and EU reach on Facebook and Instagram |
| [Google Maps Rank Tracker](https://apify.com/corvuslab/google-maps-geo-grid-rank-tracker) | Where a business ranks on Google Maps, next to its competitors |

***

### ⚖️ Is it legal to scrape Google Trends?

This Actor collects only **publicly available**, aggregated search-interest data and public trending lists; it does not collect personal data about searchers. You're responsible for how you use the output — including any personal information that may appear in news headlines — and for complying with Google's terms and applicable law (including the GDPR/LGPD where they apply). Not affiliated with, endorsed by or sponsored by Google LLC.

***

**Keywords:** google trends scraper · google trends api · google trends data · scrape google trends · google trends export · interest over time · interest by region · related queries · related topics · trending searches · daily trending searches · google trends alerts · keyword research · seo tool · market research · export to CSV · no-code scraper · MCP tool for AI agents

# Changelog

This Actor's version history is a separate document: https://apify.com/corvuslab/google-trends-scraper/changelog.md

# Actor input Schema

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

Keyword trends reports on the terms you enter. Trending now lists the searches surging in the countries you pick, with their news stories.

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

Keywords or topics to report on, one per line. Each term becomes one report. A Google topic id such as /m/05z1\_ works too.

## `compareTerms` (type: `boolean`):

Treat a comma in a line as a comparison, e.g. 'coffee, tea, matcha'. Compared terms share one 0-100 scale, the way Google Trends shows them side by side (up to 5 per line).

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

Paste trends.google.com explore links (their terms, location, dates, category and search type are used as-is) or Trending now links.

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

Country to measure interest in. Worldwide compares countries; a country breaks interest down by its regions and cities.

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

Measure interest inside one state, region or metro instead of a whole country, e.g. US-CA (California), GB-SCT (Scotland) or US-NY-501 (New York metro). Overrides Location.

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

Period to measure. Shorter periods give finer steps (minutes or hours); longer ones give days, weeks or months.

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2024-01-01 2024-06-30.

## `category` (type: `string`):

Narrow interest to searches in one category, e.g. Finance or Sports › Soccer.

## `searchProperty` (type: `string`):

Which Google search to measure: web (default), images, news, Google Shopping or YouTube.

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

Language for topic names, region names and date labels.

## `includeInterestOverTime` (type: `boolean`):

The 0-100 timeline, plus average, peak, latest value and trend change.

## `includeInterestByRegion` (type: `boolean`):

Interest per country (Worldwide) or per state / region (a country).

## `includeInterestByCity` (type: `boolean`):

Interest per city, with coordinates.

## `includeInterestByMetro` (type: `boolean`):

Interest per US metro (DMA) market. United States searches only.

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

Top and rising related searches, with Breakout flags.

## `includeRelatedTopics` (type: `boolean`):

Top and rising related topics (people, brands, places, things), with their type. Best effort: Google often holds topics back, and a report without them lists "related topics" in incompleteSections. Adds about 20 seconds to a run when that happens.

## `trendingCountries` (type: `array`):

Countries to list trending searches for (Trending now mode).

## `onlyNewTrending` (type: `boolean`):

Deliver only trending searches that earlier runs did not deliver. Schedule the actor and get each new trend once, as an alert.

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

Optional. Runs with the same name share their memory of seen trending searches. Defaults to one per set of countries.

## `telegramToken` (type: `string`):

Send new trending searches to Telegram.

## `telegramChatId` (type: `string`):

Chat to send Telegram alerts to.

## `slackWebhookUrl` (type: `string`):

Send new trending searches to a Slack channel.

## `discordWebhookUrl` (type: `string`):

Send new trending searches to a Discord channel.

## `webhookUrl` (type: `string`):

POSTs the new trending searches as JSON.

## `webhookHeaders` (type: `object`):

Optional headers for the webhook request, e.g. an authorization header.

## `notificationLimit` (type: `integer`):

How many trending searches each alert lists.

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

Stop after this many records (reports or trending searches). Empty or 0 = no limit.

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

How many searches run at the same time.

## `maxRequestRetries` (type: `integer`):

How often a failed request is retried before its search is reported as failed.

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

Not needed: the actor runs without a proxy by default.

## Actor input object example

```json
{
  "mode": "keywords",
  "searchTerms": [
    "web scraping"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "today 12-m",
  "category": "0",
  "searchProperty": "",
  "language": "en-US",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeInterestByCity": true,
  "includeInterestByMetro": false,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "trendingCountries": [
    "US"
  ],
  "onlyNewTrending": false,
  "notificationLimit": 5,
  "maxConcurrency": 4,
  "maxRequestRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `trending` (type: `string`):

No description

## `allItems` (type: `string`):

No description

# 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": [
        "web scraping"
    ],
    "trendingCountries": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("corvuslab/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": ["web scraping"],
    "trendingCountries": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("corvuslab/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 '{
  "searchTerms": [
    "web scraping"
  ],
  "trendingCountries": [
    "US"
  ]
}' |
apify call corvuslab/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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