# Google Trends Scraper — API & Trending Now | $0.50/1k keywords (`glasswing/google-trends-scraper`) Actor

Google Trends without a login or API key, one result per keyword: interest over time, interest by region and top/rising related queries nested in one row for $0.0005. Compare up to 5 terms in any country, time range or category. Plus Trending now per country with traffic and news.

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

## Pricing

from $0.50 / 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.

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 [Google Trends](https://trends.google.com/) into data you can export to CSV, Excel or JSON, or pull from the API. Type search terms and get **one result per keyword**: its **interest over time**, **interest by region** and **top and rising related queries**, all in one row. Or list countries and get what is **trending now**, with search volume, start time, related searches and news articles. It works as a **Google Trends API** alternative: no Google account, no API key, no browser.

Typical use cases:

- **SEO and content planning:** compare keywords on one 0-100 scale, find rising related queries and "Breakout" searches before competitors write about them.
- **Market and product research:** track the seasonality of hundreds of products over 5 years, see which states or countries search for them most.
- **Newsrooms, social teams and AI agents:** pull the Trending now list every hour for several countries, with the news articles behind each trend.

It reads only data Google Trends shows publicly to anyone. It does not log in and does not collect personal data.

### Why use this Google Trends scraper?

- **One result per keyword, $0.0005.** A keyword with all three data types (about 50 dates, 50 regions and 50 related queries) is one row and one billed result. 1,000 keywords cost $0.50, platform usage included.
- **Summary numbers included.** Every keyword row also has `latestValue`, `averageValue`, `peakValue` and `peakDate`, so you can sort 500 keywords without opening a single timeline.
- **Flat tables when you want them.** Switch **Output format** to *one row per data point* for spreadsheet-ready rows (one per date, region or related query; each row is billed).
- **Reliable from Apify's servers.** The Actor handles Google's cookie handshake and rate limits itself (pacing, backoff, and a switch to Apify's datacenter proxy when Google slows it down). Tested at 100% success over 300+ calls through the datacenter proxy.
- **Honest results.** Every row carries a `status` (`ok`, `not_found`, `error`), so you or an AI agent can tell "Google has no data for this term" apart from "could not be read". You pay only for `ok` rows.

### What data can Google Trends Scraper extract?

**Default: one row per keyword** (`dataType: search_term`):

| Field | Type | Description |
|---|---|---|
| `searchTerm` | string | The keyword (or topic id) |
| `comparedWith` | array | The other terms when keywords were compared on one scale |
| `geo` | string | Location code (`US`, `GB`, `US-CA`) or `WORLDWIDE` |
| `timeRange` | string | Time range, e.g. `today 12-m`, or custom `2024-01-01 2024-12-31` |
| `category` | integer | Google Trends category id (0 = all) |
| `property` | string | `web`, `images`, `news`, `youtube` or `froogle` (Shopping) |
| `latestValue` | number | Interest (0-100) in the latest complete period |
| `averageValue` | number | Average interest over the range |
| `peakValue`, `peakDate` | number, string | Highest interest and when it happened |
| `interestOverTime` | array | Every date: `{date, value, isPartial}` (value 0-100; `isPartial` = period not finished yet) |
| `interestByRegion` | array | Every region with data: `{geoCode, geoName, value}` (plus `latitude`/`longitude` for cities) |
| `resolution` | string | Region level: `COUNTRY`, `REGION`, `CITY` or `DMA` |
| `relatedQueries` | object | `{top: [{query, value, formattedValue}], rising: [{query, value, formattedValue, isBreakout}]}` |
| `partialError` | string | Set only when one requested data type could not be read |

**Trending now: one row per trending search** (`dataType: trending_now`):

| Field | Type | Description |
|---|---|---|
| `title` | string | The trending search |
| `rank` | integer | Position in the Trending now list |
| `approxTraffic` | string | Search volume as Google prints it, e.g. `200K+` |
| `searchVolume` | integer | Approximate number of searches |
| `increasePercent` | integer | Rise in searches, percent |
| `startedAt`, `endedAt` | string | When the trend started / ended (ISO 8601) |
| `isActive` | boolean | Still trending |
| `trendCategories` | array | e.g. `Sports`, `Entertainment` |
| `trendBreakdown` | array | The searches Google groups into the trend |
| `newsArticles` | array | `{title, url, source, publishedAt}` |

**Flat format (`outputFormat: rows`): one row per data point**, `dataType` `interest_over_time`, `interest_by_region` or `related_queries`:

| Field | Type | Description |
|---|---|---|
| `dataType` | string | `search_term`, `interest_over_time`, `interest_by_region`, `related_queries` or `trending_now` |
| `date` | string | Interest over time: `YYYY-MM-DD`, or a UTC timestamp for hourly data |
| `dateLabel` | string | Interest over time: the period as Google labels it (e.g. a week) |
| `value` | number | Interest 0-100; region share for comparisons; related-query score or rise % |
| `formattedValue` | string | The value as Google prints it: `73`, `68%`, `+250%`, `Breakout` |
| `isPartial` | boolean | Interest over time: `true` for the latest, still incomplete period |
| `hasData` | boolean | Interest over time: `false` where Google shows no data |
| `geoCode` | string | By region: region code (`US-CA`, `DE`, `602` for a metro area) |
| `regionName` | string | By region: country, state, city or metro area |
| `latitude`, `longitude` | number | By region, city level: coordinates |
| `rankType` | string | Related queries: `top` or `rising` |
| `query` | string | Related queries: the related search |
| `isBreakout` | boolean | Related queries: rising more than +5000% |

Every row also has `url` (the Google Trends page), `status`, `error` and `scrapedAt`.

#### Result status (tri-state output)

| `status` | Meaning | Billed? |
|---|---|---|
| `ok` | Data was read. | Yes |
| `not_found` | Google Trends answered but has too little search volume for the keyword, or nothing trends with your filters. | No |
| `error` | Google Trends could not be read after retries, or the input was not usable. `error` says why. | No |

### How to use the Google Trends API alternative

1. Open the Actor in Apify Console and click **Try for free**.
2. Type **Search terms**, one per line. To compare terms on one scale, put up to 5 on one line separated by commas (`coffee, tea, matcha`).
3. Pick the **Location** (empty = worldwide), **Time range**, and which data to include.
4. For Trending now, add country codes under **Trending now: countries** (search terms can stay empty).
5. Click **Start**. The default input (5 keywords) finishes in about 20 seconds. Open **Output** or **Export** as CSV, Excel or JSON.

To automate it, use the **API** tab (Node.js, Python, curl) or add a **Schedule** (e.g. Trending now every hour).

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

Pay-per-event pricing; Apify platform usage (compute and proxy) is included, so you pay only these events:

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| Result (`status: ok` row) | $0.0005 per row ($0.50 per 1,000) |

What counts as one result depends on **Output format**:

- **One row per keyword (default): one result per keyword.** Interest over time, interest by region and related queries of a keyword are one row, so one keyword costs **$0.0005**, and 1,000 keywords cost **$0.50**. A comparison line such as `coffee, tea` is one row per keyword (2 results).
- **One row per data point (`rows`): every data point is billed.** Each date, region and related query is its own row. One keyword over 12 months with all three data types is about **154 rows = $0.077**. Use it only when you need the flat table.
- **Trending now:** one result per trending search. The US list for the past 24 hours is about 370 trends = **$0.19**; cap it with **Maximum rows**.

Examples: 5 keywords in one run = $0.005 start + 5 × $0.0005 = **$0.0075**. 1,000 keywords = $0.005 + $0.50 = **$0.505**.

Rows with `not_found` or `error` are free. Cap spending with **Maximum rows** and the run's **Max total charge**.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | array | - | One keyword per line; `a, b, c` on one line compares up to 5 terms |
| `geo` | string | `""` (worldwide) | `US`, `GB`, `US-CA`, `GB-ENG`... |
| `timeRange` | string | `today 12-m` | `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` |
| `startDate`, `endDate` | string | - | Custom range `YYYY-MM-DD` (overrides `timeRange`) |
| `category` | integer | `0` | Google Trends category id |
| `property` | string | `web` | `web`, `images`, `news`, `youtube`, `froogle` |
| `includeInterestOverTime` | boolean | `true` | Interest over time |
| `includeInterestByRegion` | boolean | `true` | Interest by region |
| `regionResolution` | string | `auto` | `COUNTRY`, `REGION`, `CITY`, `DMA` |
| `includeRelatedQueries` | boolean | `true` | Top and rising related queries |
| `outputFormat` | string | `perTerm` | `perTerm` (one row per keyword) or `rows` (one row per data point) |
| `trendingGeos` | array | - | Country codes for Trending now |
| `trendingHours` | string | `24` | `4`, `24`, `48`, `168` |
| `trendingCategory` | string | `0` | Trending category id (17 = Sports, 18 = Technology...) |
| `trendingActiveOnly` | boolean | `false` | Only trends that are still active |
| `trendingNewsPerTrend` | integer | `3` | News articles per trend (0-10) |
| `startUrls` | array | one example URL | Google Trends explore or Trending now URLs from your browser |
| `maxItems` | integer | `1000` | Stop after this many rows (keywords in the default format) |
| `proxyConfiguration` | object | off | Optional Apify Proxy (datacenter) |

Example input:

```json
{
    "searchTerms": ["coffee", "iphone 17, galaxy s26, pixel 11"],
    "geo": "US",
    "timeRange": "today 5-y",
    "trendingGeos": ["US", "GB"],
    "trendingHours": "24"
}
```

### Output

Download the dataset as JSON, CSV, Excel, XML or HTML. A real row from a run of the default input on the Apify platform (keyword `coffee`, US, past 12 months; 2026-09-28). This whole row is **one result ($0.0005)**; the arrays are shortened here (the run returned 53 dates, 51 states, 25 top and 25 rising queries):

```json
{
    "url": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=coffee&hl=en-US",
    "status": "ok",
    "scrapedAt": "2026-09-28T19:55:25.761Z",
    "dataType": "search_term",
    "searchTerm": "coffee",
    "geo": "US",
    "timeRange": "today 12-m",
    "category": 0,
    "property": "web",
    "latestValue": 72,
    "averageValue": 76.4,
    "peakValue": 100,
    "peakDate": "2026-04-12",
    "interestOverTime": [
        { "date": "2025-09-28", "value": 66, "isPartial": false },
        { "date": "2025-10-05", "value": 60, "isPartial": false },
        { "date": "2026-09-20", "value": 72, "isPartial": false },
        { "date": "2026-09-27", "value": 71, "isPartial": true }
    ],
    "interestByRegion": [
        { "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 },
        { "geoCode": "US-HI", "geoName": "Hawaii", "value": 47 },
        { "geoCode": "US-KS", "geoName": "Kansas", "value": 42 }
    ],
    "resolution": "REGION",
    "relatedQueries": {
        "top": [
            { "query": "coffee near me", "value": 100, "formattedValue": "100" },
            { "query": "coffee shop", "value": 91, "formattedValue": "91" }
        ],
        "rising": [
            { "query": "how to remove coffee stain from carpet", "value": 5150, "formattedValue": "Breakout", "isBreakout": true },
            { "query": "sports scores today", "value": 4900, "formattedValue": "+4,900%", "isBreakout": false }
        ]
    }
}
```

A Trending now row from the platform (GB, past 24 hours, 2 news articles per trend), breakdown trimmed:

```json
{
    "url": "https://trends.google.com/trends/explore?date=now+1-d&geo=GB&q=belgium+vs+france&hl=en-US",
    "status": "ok",
    "scrapedAt": "2026-09-28T19:28:06.057Z",
    "dataType": "trending_now",
    "title": "belgium vs france",
    "rank": 1,
    "geo": "GB",
    "timeRange": "past 24 hours",
    "approxTraffic": "20K+",
    "searchVolume": 20000,
    "increasePercent": 1000,
    "startedAt": "2026-09-28T17:50:00.000Z",
    "isActive": true,
    "trendCategories": ["Sports"],
    "trendBreakdown": ["france vs belgium", "france fc", "belgium v france"],
    "newsArticles": [
        {
            "title": "Belgium vs France: UEFA Nations League stats & head-to-head",
            "url": "https://www.bbc.co.uk/sport/football/live/cmzxzevvrd6nt",
            "source": "BBC",
            "publishedAt": "2026-09-28T19:07:30.000Z"
        },
        {
            "title": "Belgium v France, Northern Ireland v Hungary and more: Nations League – live",
            "url": "https://www.theguardian.com/football/live/2026/sep/28/belgium-v-france-northern-ireland-v-hungary-and-more-nations-league-live",
            "source": "The Guardian",
            "publishedAt": "2026-09-28T17:45:00.000Z"
        }
    ]
}
```

In the flat format (`outputFormat: rows`) the same keyword comes back as one row per data point, for example `{"dataType": "interest_over_time", "searchTerm": "coffee", "date": "2025-09-28", "value": 66, "isPartial": false, ...}`, `{"dataType": "interest_by_region", "regionName": "Wyoming", "geoCode": "US-WY", "value": 100, ...}` and `{"dataType": "related_queries", "rankType": "top", "rank": 1, "query": "coffee near me", "value": 100, ...}`.

A keyword Google has no data for comes back as one free row: `{"status": "not_found", "searchTerm": "...", "error": "Google Trends has too little search volume for \"...\" (US, past 90 days) to show interest over time, related queries."}`

### Tips

- Put many keywords in one run instead of one run per keyword; the start fee is paid once.
- Sort by `latestValue`, `averageValue` or `peakValue` to rank keywords without opening their timelines.
- For large runs (hundreds of keywords), turn on Apify Proxy (datacenter) so the calls spread over many IPs.
- Compare keywords on one line (`a, b`) when you need them on the same scale; separate lines are each scaled 0-100 on their own.

### Limitations

- Google Trends values are **relative indexes (0-100)**, not search counts. Each request is scaled to its own peak, so values from separate runs, terms or regions are not directly comparable unless the terms were compared on one line.
- Google samples the data, so the same request can return slightly different values on different days (for short ranges even minutes apart).
- **Related topics** are not offered: Google Trends returns an empty list to automated clients. Related queries work.
- Region data for comparisons shows each keyword's share of the region (`formattedValue` `68%`), as on the Google Trends page. City-level data is sparse: many keywords have none at country level (metro areas, `DMA`, are usually filled).
- Trending now volumes (`approxTraffic`) are Google's rounded buckets (`2K+`, `200K+`).
- Very large runs are paced to stay within Google's rate limits, so hundreds of terms take minutes, not seconds.

### FAQ

#### Does Google have a Trends API?

Google offers a Trends API only to selected testers. This Actor reads the same public data the Google Trends website shows and returns it as structured rows.

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

Google Trends data is aggregated and anonymous, and this Actor reads only what the public website shows. You are responsible for how you use the output; read the legal notice below and Google's terms of service.

#### Can I use this Actor from an AI agent or MCP client?

Yes. Call it with `{"searchTerms": ["your term"]}` or `{"trendingGeos": ["US"]}`. Every row is self-describing (`dataType`, `status`, `error`), and one row per keyword with summary numbers (`latestValue`, `peakValue`) keeps answers short.

#### Why did I get fewer rows than expected?

Google shows no data for low-volume keywords (you get a free `not_found` row), regions without enough data are left out of `interestByRegion`, and the run stops at **Maximum rows** or your **Max total charge**.

#### Can I search a topic instead of a keyword?

Yes. Paste the topic id Google Trends uses in its URLs (for example `/m/02vqfm` from `...explore?q=%2Fm%2F02vqfm`) as a search term, or paste the whole explore URL into **Google Trends URLs**.

### Legal and data-protection notice

This Actor extracts only data that Google Trends publishes publicly; it does not extract private user data such as e-mail addresses, phone numbers, gender or precise location, and it does not log in or circumvent access controls. However, your results could still contain personal data, for example a person's name inside a trending search or a news headline. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You are responsible for complying with Google's terms of service and applicable law when using the extracted data.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by Google LLC. Google and Google Trends are trademarks of Google LLC. All trademarks belong to their respective owners.

# Changelog

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

# Actor input Schema

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

One term per line; each term is one result row. To compare terms on one 0-100 scale, put up to 5 on one line separated by commas, e.g. `coffee, tea, matcha` (one row per term, scaled together). Topic ids such as `/m/02vqfm` work too.

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

Country or region code as Google Trends uses it: `US`, `GB`, `DE`, `US-CA`, `GB-ENG`. Leave empty for worldwide.

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

Period to read. Ignored when a custom start date is set below.

## `startDate` (type: `string`):

Optional custom range start, YYYY-MM-DD (from 2004-01-01). Overrides the time range.

## `endDate` (type: `string`):

Optional custom range end, YYYY-MM-DD. Defaults to today when only a start date is set.

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

Google Trends category id to narrow the searches (0 = all categories). Examples: 71 Food & Drink, 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 20 Sports.

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

Which Google search to read: web search, image search, news search, YouTube search or Google Shopping.

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

Interest 0-100 for every date of the time range (`interestOverTime`, or one row per date in the flat format).

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

Interest per country, state, city or metro area (`interestByRegion`, or one row per region in the flat format).

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

Level of the regions. Automatic = what Google Trends shows for the location (countries worldwide, subregions in a country). Cities and metro areas (DMA, US only) need a country location.

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

Top and rising related queries (`relatedQueries`, or one row per query in the flat format); rising values above +5000% read Breakout.

## `outputFormat` (type: `string`):

One row per keyword (default) = one result per search term with interest over time, interest by region and related queries nested inside, so one keyword costs one result. One row per data point = flat rows for spreadsheets and BI tools; every date, region and related query is its own billed result (about 150 per keyword for 12 months).

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

Country codes for the Google Trends Trending now list (e.g. US, GB, DE, IN). One row per trending search with traffic, start time, related queries and news articles.

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

Trends that started in the past 4, 24 or 48 hours, or the past 7 days.

## `trendingCategory` (type: `string`):

Only trends in this category.

## `trendingActiveOnly` (type: `boolean`):

Skip trends that have already ended.

## `trendingNewsPerTrend` (type: `integer`):

How many related news articles (title, URL, source, time) to attach to each trend. 0 = none.

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

Optional: Google Trends explore URLs (https://trends.google.com/trends/explore?q=coffee\&geo=US) or Trending now URLs (https://trends.google.com/trending?geo=US), copied from the browser. The built-in example is skipped when search terms or trending countries are given.

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

Language for region names and labels, e.g. en-US, de, fr, ja.

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

Stop after this many rows have been saved. With one row per keyword that is the number of keywords (and trending searches); each saved row with status `ok` is one billable result, rows without data are free.

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

Optional. Works without a proxy; when Google Trends slows the run down on the Apify platform, the Actor switches to Apify Proxy (datacenter) by itself. Turn it on here to use rotating datacenter IPs from the start for large runs. Residential proxies are not needed.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "tea",
    "matcha",
    "espresso",
    "cold brew"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "auto",
  "includeRelatedQueries": true,
  "outputFormat": "perTerm",
  "trendingHours": "24",
  "trendingCategory": "0",
  "trendingActiveOnly": false,
  "trendingNewsPerTrend": 3,
  "startUrls": [
    "https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=coffee"
  ],
  "language": "en-US",
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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": [
        "coffee",
        "tea",
        "matcha",
        "espresso",
        "cold brew"
    ],
    "geo": "US",
    "outputFormat": "perTerm",
    "startUrls": [
        "https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=coffee"
    ],
    "maxItems": 1000,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/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": [
        "coffee",
        "tea",
        "matcha",
        "espresso",
        "cold brew",
    ],
    "geo": "US",
    "outputFormat": "perTerm",
    "startUrls": ["https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=coffee"],
    "maxItems": 1000,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/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": [
    "coffee",
    "tea",
    "matcha",
    "espresso",
    "cold brew"
  ],
  "geo": "US",
  "outputFormat": "perTerm",
  "startUrls": [
    "https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=coffee"
  ],
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call glasswing/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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