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

Every Google Trends signal in one run and one schema: interest over time, interest by region and city, top and rising related queries, compare up to five keywords on one scale, and Trending Now with news. A keyword with no data is free; no run-start fee.

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

## Pricing

from $5.00 / 1,000 keyword reports

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Trends Scraper - Interest, Regions, Related & Trending

<table style="border-collapse:collapse;width:100%;margin:0 0 4px">
<tr><td colspan="3" style="padding:9px 12px;background:#0B6E75;border:1px solid #0B6E75"><span style="color:#FFFFFF;font-weight:700;font-size:13px;letter-spacing:.3px">Google Trends Suite</span><span style="color:#CFF0F2;font-size:12px"> &nbsp;&bull;&nbsp; 2 Actors, one codebase, one keyword-report billed once</span></td></tr>
<tr><td style="padding:9px 12px;border:1px solid #E5E7EB;background:#ECFDF5;vertical-align:top;width:33%"><span style="color:#0B6E75;font-weight:700;font-size:13px">Google Trends Scraper</span><br><span style="color:#0B6E75;font-size:11px;font-weight:600">&#10148; You are here</span></td><td style="padding:9px 12px;border:1px solid #E5E7EB;background:#FFFFFF;vertical-align:top;width:33%"><a href="https://apify.com/vonsensey/google-trending-searches" style="color:#111827;font-weight:700;font-size:13px;text-decoration:none">Google Trending Searches Scraper API</a><br><span style="color:#6B7280;font-size:11px">Trending Now</span></td></tr>
</table>

**More from this account:** [YouTube Transcript Suite](https://apify.com/vonsensey/youtube-transcript-scraper) · [Website Contact & Email Suite](https://apify.com/vonsensey/website-contact-email-extractor) · [Career Site & ATS Jobs Suite](https://apify.com/vonsensey/career-page-job-postings-scraper-api) · [Google News Suite](https://apify.com/vonsensey/google-news-scraper-api) · [Keyword Research Suite](https://apify.com/vonsensey/google-keyword-ideas-scraper) · [Shopify Store Intelligence Suite](https://apify.com/vonsensey/shopify-store-leads-scraper) · [eBay Data Suite](https://apify.com/vonsensey/ebay-scraper-api) · [Amazon Reviews Suite](https://apify.com/vonsensey/amazon-reviews-scraper-api) · [Reddit](https://apify.com/vonsensey/reddit-scraper-posts-comments-api) · [Meta Ad Library](https://apify.com/vonsensey/facebook-ads-library-scraper-meta-ad-api) · [Vinted](https://apify.com/vonsensey/vinted-scraper-api) · [Trustpilot Review Intelligence Suite](https://apify.com/vonsensey/trustpilot-reviews-scraper) · [App Store & Google Play Reviews Suite](https://apify.com/vonsensey/app-store-google-play-reviews-scraper) · [Telegram Channel Intelligence Suite](https://apify.com/vonsensey/telegram-channel-scraper-api) · [Business Reviews Suite](https://apify.com/vonsensey/business-reviews-aggregator-scraper-api) · [Amazon Product Data Suite](https://apify.com/vonsensey/amazon-product-scraper-api) · [Google Sheets Suite](https://apify.com/vonsensey/google-sheets-scraper-api) · [TikTok Suite](https://apify.com/vonsensey/tiktok-scraper-api) · [Snapchat Suite](https://apify.com/vonsensey/snapchat-scraper-api) · [LinkedIn Public Data Suite](https://apify.com/vonsensey/linkedin-scraper-api) · [Instagram Suite](https://apify.com/vonsensey/instagram-posts-scraper-api) · [Contact Validation Suite](https://apify.com/vonsensey/email-verifier-validator-api)

**Every Google Trends signal for a keyword, in one run and one schema — interest over time, interest by region and city, related and rising queries, up to five keywords compared on one scale, and Trending Now with news.**

**A run that finds nothing costs nothing.** There is no run-start fee, error and coverage rows are free, and on a schedule a re-run bills only what is new.

### ⭐ Why this one

Most Google Trends scrapers give you one chart and stop, or split trending into a second tool. This returns **the whole picture in one report**: the interest-over-time series *and* the map *and* the related searches *and* — when you want it — a side-by-side comparison of up to five keywords on a single 0–100 scale, plus a **Trending Now** mode that no single-purpose scraper bundles in.

A keyword Google has no data for comes back as a **free row that says so**, not an invented zero and not a charge. Numbers come back as real values on Google's 0–100 scale, dates as UTC timestamps, and a section Google leaves empty is marked empty rather than faked. You never configure a proxy.

### 🎯 Use cases

- **Build an SEO content calendar** from the rising and breakout queries around your topic before the rest of the market writes about them.
- **Monitor a brand or category** on a weekly schedule and watch interest move by country and region.
- **Do market research** across up to five competing terms at once, on one comparable scale.
- **Run trend alerts** — an hourly Trending Now pull per country, billed only for the trends that are new.

### 🚀 Recipes

#### One keyword, worldwide, past 12 months

The default. Interest over time, by region, and related queries for one term.

```json
{
  "keywords": [
    "chatgpt"
  ],
  "timeRange": "today 12-m"
}
```

#### Compare five keywords on one scale

All five measured together, so the values are directly comparable.

```json
{
  "keywords": [
    "chatgpt",
    "gemini",
    "claude ai",
    "perplexity",
    "copilot"
  ],
  "compareKeywords": true,
  "geo": "US"
}
```

#### Interest by city, in one country

City-level breakdown where Google has it (it is sparse — empty places are left out).

```json
{
  "keywords": [
    "coffee"
  ],
  "geo": "US",
  "regionResolution": "city"
}
```

#### Trending Now, two countries, hourly

Switch to trending mode and put it on a schedule; only new trends are billed.

```json
{
  "mode": "trending",
  "trendingGeos": [
    "US",
    "GB"
  ],
  "onlyNewSinceLastRun": true,
  "stateName": "hourly"
}
```

### 📥 Input

| Field | What it does |
|---|---|
| `keywords` | The search terms to report on, one per line. A Google topic id such as `/m/05p0rrx` works too, for a concept rather than a phrase. |
| `compareKeywords` | Put keywords on one shared 0–100 scale, in groups of up to five, so their values are directly comparable. |
| `geo` / `geos` | Worldwide by default, or a country like `US`, a subregion like `US-CA`, or several at once — each is its own report. |
| `timeRange` | Past hour to past 5 years, all of 2004–present, or your own custom date range. |
| `property` | Web, Images, News, YouTube or Shopping search. |
| `regionResolution` | Break interest down by country, subregion, metro area or city. |
| `includeRegions` / `includeRelatedQueries` / `includeRelatedTopics` | Turn sections on or off — off is faster, and the price of a report is the same either way. |
| `explodeRows` | Also emit one free flat row per timeline point, region and related query, for a tidy CSV. |
| `onlyNewSinceLastRun` / `stateName` | For a schedule: a report already billed in the last 12 hours is skipped, so a daily run re-bills by design and a re-run within the window is free. |
| `maxReports` / `maxCostUsd` | Hard ceilings on rows and on spend. |

**No proxy settings.** Unblocking is handled and priced in — you never configure infrastructure.

### 📤 Output

| Row | What it is |
|---|---|
| `keyword-report` | **The billed row.** One keyword in one place over one time range, with the interest-over-time series (peak, average, latest, trend direction), interest by region, top and rising related queries, and related topics where Google provides them. |
| `timeline-point` / `region` / `related-query` / `related-topic` | **Free.** Flat child rows, only when `explodeRows` is on. |
| `coverage` | **Free.** Per report: which sections arrived, how many regions had data, and what ended the job. |
| `error` | **Free.** Anything that could not be read, with a stable reason. A keyword with no data is a free row, never a charge. |

Every run also ends with a free **summary** row: counts, the estimated spend, and why it stopped. Export any run to CSV, Excel, JSON, XML or HTML from the Storage tab or the API — the dataset ships with ready-made views (Reports, Trending Now, Timeline, Regions and Related).

#### What every report carries

One `keyword-report` row bundles all of this, so you never join four datasets together:

- **Interest over time** — the full series on a 0–100 scale at the bucket size Google chose for your window (hour, day, week or month), plus the **peak** and when it happened, the **average**, the **latest** value, and a **trend direction** (rising, falling or flat, measured as the last quarter of the series against the first).
- **Interest by region** — one entry per place with data, ranked highest first, at your chosen resolution (country, subregion, metro or city). City rows carry coordinates.
- **Related queries** — the **top** searches on a 0–100 scale and the **rising** ones by growth, with genuine **breakouts** flagged.
- **Related topics** — Knowledge Graph entities where Google provides them.
- **Context** — the exact Google Trends page URL for the query, the property and category, the resolved time span, and which of the four sections actually arrived.

### 📊 Good to know about Google Trends

A few things about the data itself — the kind of detail most scrapers leave you to discover on your own bill:

- **The numbers are relative, on a 0–100 scale.** A value is interest *against the peak of the same series*, not a count of searches. It only means something next to another value on the same scale — which is exactly why the compare mode, which puts several keywords on **one** shared scale, is worth having.
- **The most recent bucket is partial.** The latest point of any live series is still being collected and will move; it is flagged `isPartial` so you can drop or discount it rather than mistake it for a drop in interest.
- **City-level data is sparse.** Google reports city interest for only a handful of places for most keywords. This leaves the empty ones out and tells you how many had data, instead of padding the list with zeros.
- **Related topics are sparse.** The *related topics* section was empty in every session we measured. It is off by default here, and when it is empty the report says so rather than inventing rows — you are never billed for a section Google did not return.

### 💰 Pricing

Pay per keyword report. **Failures are free and there is no run-start fee.**

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|---|---|---|---|---|---|---|
| **keyword report** | $10.00 | $8.30 | $6.30 | $5.00 | $4.70 | $4.30 |
| **trending term** | $1.00 | $0.83 | $0.63 | $0.50 | $0.47 | $0.43 |

*Prices are per 1,000. Your tier is your Apify plan.* On the **Gold** plan, 1,000 keyword reports cost **$5.00**. A keyword report with no data costs **$0.00**, and on a schedule an unchanged feed re-bills nothing.

### ⏰ Run it on a schedule

Set a daily or weekly cron and leave **only new since the last run** on. Interest-over-time reports refresh each day by design (the window has moved), while a monitoring feed pays only for what changed. That is what makes a standing schedule rational instead of a bill you cancel.

Cron: `0 7 * * *` (every morning at 07:00).

### ❓ FAQ

#### Is there a Google Trends API?

Google does not publish an official public API for this data. This Actor is the practical equivalent: give it keywords and it returns clean, structured rows you can pull from the Apify API or export to a file — no account on Google's side, no infrastructure to run.

#### How do I export Google Trends data to CSV, Excel or JSON?

Every run's dataset exports to CSV, Excel, JSON, XML or HTML from the Storage tab, or through the Apify API. Turn on the flat-rows option and every timeline point, region and related query becomes its own line, ready for a spreadsheet.

#### Why do Google Trends numbers change between runs?

Google Trends values are **relative, not absolute**. Each series is scaled 0–100 against its own peak over the window you asked for, so the same keyword reads differently over "past 7 days" than over "past 12 months", and today's live window differs from yesterday's. The numbers are an index of relative interest, not a count of searches — so a value only means something next to another value on the same scale.

#### Can I compare more than five keywords?

Google's shared-scale comparison holds at most five keywords at once. Give this more than five with compare mode on and it splits them into comparable groups of five automatically; across groups the scales differ, exactly as Google’s own tool works.

#### How often does Google Trends data update?

Google refreshes interest-over-time data periodically — more often for the shortest "past hour" and "past day" windows than for multi-year ones; see Google's own Trends help for the current cadence. A daily schedule keeps a series current, and the most recent bucket is always marked partial because it is still filling in.

#### What time zone are the timestamps in?

Every timestamp — each timeline bucket and the fetch time — is a UTC ISO timestamp, so results line up across countries without any conversion on your side.

#### Can I get absolute search volume numbers?

Google Trends is an index of relative interest, not a count of searches, so exact volumes are not part of it. If you need absolute numbers, use the interest curve for the shape and pair it with a keyword-volume source for the magnitude.

#### Do I need a proxy or a Google account?

No. Everything is handled for you and priced into the per-keyword report fee. There is no proxy field to configure and no login anywhere.

### 🛟 Support

Something not working, or a signal you want added? Open an issue on the **Issues** tab — it is read and answered. If this saved you time, a rating on the listing helps more than you would think.

*Unofficial and not affiliated with, endorsed by or sponsored by Google. It reads only publicly available Google Trends data.*

### Use it from n8n, MCP, the API or a schedule

Built to be called by a workflow, not only from the Store form. The Actor is `vonsensey/google-trends-scraper`; every snippet below sends `{}`, which runs the defaults shown on the form — replace it with your own input.

#### n8n

Install the **Apify** community node (`@apify/n8n-nodes-apify` under *Settings → Community Nodes*, or search "Apify" on n8n Cloud). Add **Apify → Run Actor** with Actor `vonsensey/google-trends-scraper` and your input JSON, then **Apify → Get Dataset Items** on the run's `defaultDatasetId` and pipe the rows anywhere. For scheduled runs, the **On new Apify Event** trigger fires when a run of this Actor finishes.

#### MCP (Claude, Cursor, VS Code, any MCP client)

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=vonsensey/google-trends-scraper",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Your agent then calls `vonsensey/google-trends-scraper` as a tool with the same input the form takes and reads the dataset back.

#### REST API (one call, rows in the response)

```bash
curl -X POST "https://api.apify.com/v2/acts/vonsensey~google-trends-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" -d '{}'
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("vonsensey/google-trends-scraper").call(run_input={})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row)
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('vonsensey/google-trends-scraper').call({});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Make, Zapier, LangChain, CrewAI

The Apify app in **Make** and **Zapier** has a *Run an Actor* module: pick `vonsensey/google-trends-scraper`. In **LangChain** and **CrewAI** the Apify tool wrappers take the same Actor id. A daily **schedule** needs nothing but the Console: *Schedules → Create → this Actor → cron*, and the dataset fills on its own.

> **Run it without configuring anything** — [Scrape a full Google Trends report for a keyword](https://apify.com/vonsensey/google-trends-scraper/examples/google-trends-report-for-a-keyword), a ready-made example you can start as-is or copy.

### Use cases

- **Every Trends signal in one report.** Interest over time, interest by region and city, and related and rising queries for a keyword — bundled into one row, not four datasets to join.
- **Compare up to five keywords on one scale.** Google Trends is relative; measured together, the numbers are actually comparable instead of five incomparable charts.
- **Catch what is trending now, by country.** Trending Now with approximate volume, growth, category and news — on an hourly schedule, billed only for new trends.
- **Failures are free.** A keyword with no data is a free row that says so, never an invented zero and never a charge; there is no run-start fee.

### Run it on a schedule

A one-off pull answers a question; a schedule answers it every day without you. Open **Schedules** in the Apify Console, point a cron at this Actor, and the dataset keeps filling on its own — no server, no cron box, no babysitting. Everything here is built to be re-run: you are billed per keyword-report delivered, and the FAQ below says exactly what a scheduled run that finds nothing new costs.

### FAQ

#### Is there a Google Trends API?

Google does not publish an official public API for this data. This suite is the practical equivalent: pass keywords or countries and get clean, structured rows you can pull from the Apify API or export to a file, with no Google account and no infrastructure to run.

#### Why do Google Trends numbers change between runs?

Google Trends values are relative, scaled 0-100 against the peak of each series over the window you asked for. The same keyword reads differently over "past 7 days" than over "past 12 months", and the latest bucket is always partial because it is still being collected. The numbers are an index of relative interest, not a count of searches.

#### How do I export Google Trends data to CSV or JSON?

Every run's dataset exports to CSV, Excel, JSON, XML or HTML from the Storage tab or the Apify API. Turn on the flat-rows option and every timeline point, region and related query becomes its own line, ready for a spreadsheet.

#### Do I need a proxy or a Google account?

No. Unblocking is handled and priced into the per-report fee. There is no proxy field to configure anywhere in the suite and no login on Google's side.

***

Something wrong, or a field you need that is missing? Open an issue on the **Issues** tab — it is read and it gets fixed. If this saved you time, a rating on the Store page helps the next person find it.

# Actor input Schema

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

**Explore** turns each keyword into a full report: interest over time, interest by region, related queries and (where Google provides them) related topics. **Trending Now** returns the currently trending searches for a country, with search volume and news.

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

One search term per line - or a Google topic id such as /m/05p0rrx (Bitcoin) for a concept rather than a phrase. Each keyword becomes one report per country and time range. Used in Explore mode.

## `compareKeywords` (type: `boolean`):

Off: each keyword is measured on its own 0-100 scale. On: keywords are compared in groups of up to five in a single request, so their values share one scale and are directly comparable - each report then lists the others it was compared with.

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

Leave empty for worldwide. An ISO country code like US or GB, or a subregion like US-CA. Used in Explore mode.

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

Optional. One country or region code per line to run every keyword against several places in one go - each place is a separate report. Overrides the single country field above when set.

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

The window each interest-over-time series covers. Google picks the bucket size (hour, day, week, month) from the span. Choose Custom to give your own dates below.

## `customRange` (type: `string`):

Only used when Time range is Custom. Two dates as YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-06-30. An unusable range is reported as a free row rather than quietly replaced with a default.

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

Google Trends category id to narrow the topic - 0 means all categories. For example 5 is Computers & Electronics. Leave at 0 unless you know the id you want.

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

Which Google surface to measure interest on: web search, Images, News, YouTube or Shopping.

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

How finely to break interest down by place: whole countries, subregions/states, metro areas (US only), or cities. City data is precise but sparse - Google returns it for only a handful of places, and empty places are left out.

## `includeRegions` (type: `boolean`):

Add the interest-by-place breakdown to each report. Turning a section off shortens the run but never changes the price - one report is one report.

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

Add the top and rising related searches to each report, with breakout terms flagged. This is the section most buyers want.

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

Add related topics (Knowledge Graph entities) where Google provides them. Off by default because the related-topics section was empty in every session we measured; when it is empty the report says so rather than inventing rows.

## `maxRelated` (type: `integer`):

How many entries to keep from each related list (top and rising). Google returns up to 25.

## `explodeRows` (type: `boolean`):

In addition to the bundled report, emit one free flat row per timeline point, region, related query and related topic - handy for a tidy CSV. Child rows are never charged; the bundled report is the billed unit.

## `trendingGeos` (type: `array`):

One country code per line. Trending Now returns the currently trending searches for each. Used in Trending Now mode.

## `trendingHours` (type: `string`):

How far back the trending list reaches: the last 4, 24, 48 or 168 hours (7 days). A longer window returns more terms.

## `includeTrendingNews` (type: `boolean`):

Attach the latest news headlines, links, sources and timestamps to each trending term.

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

Locale for place names and text labels, such as en-US or de. Times are always reported in UTC.

## `onlyNewSinceLastRun` (type: `boolean`):

For a schedule. Trending Now: a term already delivered by an earlier run of this feed is skipped and not charged again. Explore: a report billed by this feed in the last 12 hours is skipped, so a daily 12-month run re-bills each day by design - the snapshot moved.

## `stateName` (type: `string`):

Names the memory used by 'only new since the last run'. Give two schedules two different names and they track separately; leave it empty to share one feed.

## `maxReports` (type: `integer`):

A hard ceiling on billable reports across the whole run. Explore mode only.

## `maxTrendingTerms` (type: `integer`):

A hard ceiling on billable trending terms across the whole run. Trending Now mode only.

## `maxCostUsd` (type: `number`):

A hard ceiling on what this run can cost, charged at your own plan's tier price. Leave at 0 for no ceiling.

## Actor input object example

```json
{
  "mode": "explore",
  "keywords": [
    "chatgpt",
    "claude ai"
  ],
  "compareKeywords": false,
  "geo": "",
  "geos": [],
  "timeRange": "today 12-m",
  "customRange": "",
  "category": 0,
  "property": "",
  "regionResolution": "region",
  "includeRegions": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "maxRelated": 25,
  "explodeRows": false,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "includeTrendingNews": true,
  "language": "en-US",
  "onlyNewSinceLastRun": false,
  "stateName": "",
  "maxReports": 500,
  "maxTrendingTerms": 500,
  "maxCostUsd": 0
}
```

# Actor output Schema

## `reports` (type: `string`):

No description

## `items` (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 = {
    "keywords": [
        "chatgpt",
        "claude ai"
    ],
    "geo": "",
    "geos": [],
    "customRange": "",
    "category": 0,
    "maxRelated": 25,
    "trendingGeos": [
        "US"
    ],
    "language": "en-US",
    "stateName": "",
    "maxReports": 500,
    "maxTrendingTerms": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("vonsensey/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 = {
    "keywords": [
        "chatgpt",
        "claude ai",
    ],
    "geo": "",
    "geos": [],
    "customRange": "",
    "category": 0,
    "maxRelated": 25,
    "trendingGeos": ["US"],
    "language": "en-US",
    "stateName": "",
    "maxReports": 500,
    "maxTrendingTerms": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("vonsensey/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 '{
  "keywords": [
    "chatgpt",
    "claude ai"
  ],
  "geo": "",
  "geos": [],
  "customRange": "",
  "category": 0,
  "maxRelated": 25,
  "trendingGeos": [
    "US"
  ],
  "language": "en-US",
  "stateName": "",
  "maxReports": 500,
  "maxTrendingTerms": 500
}' |
apify call vonsensey/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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