# Google Trends Scraper (fast, no browser) (`zovo-one/google-trends-scraper-fast`) Actor

Google Trends without a browser. Get interest over time, interest by region and related queries for many comparisons of up to 5 terms, in any geo, timeframe, category and property (web, news, images, YouTube, Shopping). Tidy rows, ready for CSV, BI and AI agents.

- **URL**: https://apify.com/zovo-one/google-trends-scraper-fast.md
- **Developed by:** [Michael Lip](https://apify.com/zovo-one) (community)
- **Categories:** Marketing, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 term 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

## Google Trends Scraper (fast, no browser)

Get Google Trends interest over time, interest by region and top related queries as tidy rows, for $0.001 per search term.

The Actor calls the same JSON endpoints the Google Trends website uses, so there's no browser to start. One run holds up to 500 comparisons of up to 5 terms each, in any geo, timeframe, category and Google property (web, news, images, YouTube, Shopping). On Apify, the prefilled input (`coffee, tea` in the US, past 12 months) saved 258 rows in 7 s in one run and in 24 s in another.

### What you get

Every row goes to the default dataset. The `type` field tells you what the row is, and there are no nested tables, so the data drops straight into CSV, Excel, Google Sheets, a BI tool or an AI agent.

| `type` | One row per | Main fields |
|---|---|---|
| `interest_over_time` | term and time point | `date`, `timestamp`, `resolution`, `formattedTime`, `value` (0-100), `hasData`, `isPartial` |
| `interest_by_region` | term and region | `regionCode`, `regionName`, `regionResolution`, `value` (0-100), `comparisonShare`, `latitude`, `longitude` |
| `related_query` | related query | `query`, `rankType` (`top` or `rising`), `rank`, `value`, `formattedValue`, `isBreakout`, `mentionsTerm`, `link` |
| `related_topic` | related topic | `topicId`, `topicTitle`, `topicType`, `rankType`, `rank`, `value`, `formattedValue`, `isBreakout`, `mentionsTerm`, `link` |

Every row also carries these fields.

| Field | Type | Meaning |
|---|---|---|
| `type` | string | Row type, see the table above |
| `comparisonId` | string | `c1`, `c2`, ... in input order |
| `comparisonTerms` | array | All terms of the comparison this row belongs to |
| `term`, `termIndex` | string, number | The term of this row and its position in the comparison |
| `geo` | string | `US`, `US-CA`, `worldwide`, ... |
| `timeframe` | string | `today 12-m` or a custom range such as `2024-01-01 2024-12-31` |
| `category`, `categoryName` | number, string | Google Trends category id and name (`0` = All categories) |
| `property` | string | `web`, `news`, `images`, `youtube` or `froogle` (Google Shopping) |
| `scrapedAt` | string | ISO time the comparison was fetched |

A few fields need a word of explanation.

- `value` runs from 0 to 100. Over time it's relative to the highest point among all terms of the comparison. By region it's relative to the top region.
- `comparisonShare` has a value only in comparisons of 2 or more terms, and is `null` for a single term. It's the term's share, in percent, of the compared terms' searches in that region.
- `resolution` is the time step Google picked (HOUR, DAY, WEEK, MONTH and so on). `isPartial` is `true` for the last, still incomplete point.
- `formattedValue` on rising rows shows Google's label, such as `+250%` or `Breakout`. `isBreakout` is `true` for Breakout, which means growth above 5,000%.
- `mentionsTerm` is `true` when the related query contains every word of the term that has 3 or more letters (a plural "s" or "es" is fine). It is `null` for topic ids. The FAQ has the full rule. Use it to drop unrelated entries (see the FAQ).

The dataset has column views called Overview, Interest over time columns, Interest by region columns and Related queries & topics columns. Apify views pick columns, but they cannot filter rows, so filter on the `type` column to see one row type.

The key-value store also gets an `OUTPUT` record, which is the run report. It lists each comparison with its `status` (`ok`, `partial`, `no-data`, `failed`, `stopped` or `skipped`), row counts by type, `termResultsCharged`, notes, errors and request statistics.

### Example output

These rows come from a real run of the prefilled input on Apify (2026-11-05, `coffee, tea`, US, past 12 months, Apify Proxy). That run saved 106 interest-over-time rows, 102 region rows and 50 related queries.

```json
[
  {
    "type": "interest_over_time",
    "comparisonId": "c1",
    "comparisonTerms": ["coffee", "tea"],
    "term": "coffee",
    "termIndex": 0,
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "categoryName": "All categories",
    "property": "web",
    "scrapedAt": "2026-11-05T13:38:17.167Z",
    "date": "2025-11-02",
    "timestamp": "2025-11-02T00:00:00.000Z",
    "resolution": "WEEK",
    "formattedTime": "Nov 2 – 8, 2025",
    "value": 68,
    "hasData": true,
    "isPartial": false
  },
  {
    "type": "interest_by_region",
    "comparisonId": "c1",
    "comparisonTerms": ["coffee", "tea"],
    "term": "coffee",
    "termIndex": 0,
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "categoryName": "All categories",
    "property": "web",
    "scrapedAt": "2026-11-05T13:38:17.167Z",
    "regionCode": "US-WY",
    "regionName": "Wyoming",
    "regionResolution": "region",
    "value": 100,
    "comparisonShare": 70,
    "latitude": null,
    "longitude": null
  },
  {
    "type": "related_query",
    "comparisonId": "c1",
    "comparisonTerms": ["coffee", "tea"],
    "term": "tea",
    "termIndex": 1,
    "geo": "US",
    "timeframe": "today 12-m",
    "category": 0,
    "categoryName": "All categories",
    "property": "web",
    "scrapedAt": "2026-11-05T13:38:17.167Z",
    "query": "green tea",
    "rankType": "top",
    "rank": 1,
    "value": 100,
    "formattedValue": "100",
    "isBreakout": false,
    "link": "https://trends.google.com/trends/explore?q=green+tea&date=today+12-m&geo=US",
    "mentionsTerm": true
  }
]
```

### Pricing

You pay per search term with data, not per row. There's one event.

| Event | Price | Charged when |
|---|---|---|
| Term result | $0.001 | Once per search term per comparison that returns at least one row. It covers all outputs of that term: interest over time, by region and related queries. |

Rows are free. Terms with no data, comparisons that fail, URLs that can't be read and comparisons skipped after an early stop cost nothing. Platform usage (compute and proxy traffic) is included in the event price, so it isn't billed on top. The Actor needs no browser. Its build's default memory is 256 MB, which is enough. Runs on the Apify Store currently start at 512 MB, and you can lower that in Run options.

Some worked examples.

| Input | Term results | Cost |
|---|---|---|
| The prefilled input, `coffee, tea` in the US (258 rows in our run) | 2 | $0.002 |
| 100 single keywords, one per line, in 1 geo | 100 | $0.10 |
| 20 lines of 5 terms each, in 10 geos (200 comparisons) | 1,000 | $1.00 |
| `coffee, tea` and `bitcoin` in US and GB | 6 | $0.006 |

The price is the same whether you turn outputs on or off. To cap spend, set the maximum cost per run in Run options (or `maxTotalChargeUsd` in the API). The Actor then saves only the terms it could charge for and stops at the limit. The Apify SDK can charge one term over the cap ($0.001), and that term is saved.

### Quick start in Apify Console

1. Open the Input tab. It's already filled with `coffee, tea` and geo `US`.
2. Click Start. The run costs $0.002.
3. Open the Output tab, or export the dataset as CSV, JSON or Excel.

To run your own terms, put one comparison per line. Terms on the same line are compared on one 0-100 scale, like on the Google Trends website.

### Use it from the API

This call runs the Actor and returns the dataset rows in one request.

```bash
curl -X POST "https://api.apify.com/v2/acts/zovo-one~google-trends-scraper-fast/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["coffee, tea", "bitcoin"],
    "geos": ["US", "GB"],
    "timeframe": "today 5-y",
    "relatedQueriesTop": true
  }'
```

`run-sync-get-dataset-items` waits up to 300 seconds. For bigger inputs, start the run with `POST /v2/acts/zovo-one~google-trends-scraper-fast/runs` and read the dataset when it finishes.

### Use it from Python and Node.js

Python, with `pip install apify-client`.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zovo-one/google-trends-scraper-fast").call(run_input={
    "searchTerms": ["coffee, tea"],
    "geos": ["US"],
    "timeframe": "today 12-m",
})

for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "interest_over_time":
        print(row["date"], row["term"], row["value"])
```

Node.js, with `npm install apify-client`.

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('zovo-one/google-trends-scraper-fast').call({
    searchTerms: ['coffee, tea'],
    geos: ['US'],
    timeframe: 'today 12-m',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.type === 'interest_by_region'));
```

### Use it from AI agents with the Apify MCP server

The Apify MCP server at [mcp.apify.com](https://mcp.apify.com) exposes Store Actors as tools for Claude, Cursor, VS Code and other MCP clients. Each client adds servers in its own way. VS Code and Claude Desktop, for example, don't take the JSON below as written. For your client, open the [MCP configurator](https://mcp.apify.com), pick this Actor and copy the setup it gives you. A client that reads an `mcpServers` block with a `url` key, such as Cursor, can use this config.

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=zovo-one/google-trends-scraper-fast"
    }
  }
}
```

On first connect your browser opens so you can sign in to Apify. You can also send your token in an `Authorization: Bearer <APIFY_TOKEN>` header instead. An agent that uses the default server tools can find this Actor with `search-actors`, run it with `call-actor` and read the rows with `get-dataset-items`.

Then ask in plain words, for example "Compare Google Trends interest for coffee and tea in the US over the past 5 years and tell me which months peak." The tidy rows and the `type` field make the result easy for a model to read.

### Input reference

| Field | What it does |
|---|---|
| `searchTerms` | One comparison per line, up to 5 comma-separated terms. Google topic ids such as `/m/02vqfm` work too. |
| `trendsUrls` | Google Trends explore URLs. Each URL is one comparison and keeps its own terms, geo, date, category and property. The fields below don't change URLs. |
| `geos` | `US`, `US-CA`, `GB-ENG`, `US-CA-807` (US metro) or `worldwide`. Countries use ISO codes (`GB`, not `UK`). Each geo repeats every line, so 3 lines in 2 geos make 6 comparisons. |
| `timeframe` | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or 2004 to now. |
| `customTimeRange` | `YYYY-MM-DD YYYY-MM-DD`, from 2004-01-01 to today. Overrides `timeframe`. |
| `category`, `customCategoryId` | A top-level category, or any category id from the `cat=` parameter of a Trends URL. |
| `property` | `web`, `news`, `images`, `youtube` or `froogle` (Google Shopping). |
| `interestOverTime`, `interestByRegion`, `relatedQueriesTop` | On by default. |
| `relatedQueriesRising`, `relatedTopics` | Off by default (see the FAQ). |
| `includeRawResponses` | Saves Google's raw JSON per comparison in the key-value store (`RAW-c1`, ...). Free. |
| `language` | Interface language (`hl`), such as `en-US`, `de`, `es-419`. Changes region names, not numbers. |
| `proxyConfiguration` | Apify Proxy, on by default (datacenter). |
| `maxConcurrency` | 1 to 3 comparisons in parallel. Default 1. |
| `maxRetries` | 1 to 10 retries per request. Default 5. |

Some URL formats aren't supported. URLs with different date ranges per term (`date=2024-01-01 2024-06-30,2025-01-01 2025-06-30`) come from another Google endpoint, so paste one URL per date range. Hourly custom ranges (`date=2024-01-01T00 2024-01-07T00`) and `date=all_2008` don't work either. Such a URL is reported as `failed` in `OUTPUT` with the reason, it isn't charged, and the rest of the run goes on.

### Limits

These are hard caps in the code. Each run allows 5 terms per comparison, 50 different geos and 500 comparisons (lines times geos, plus URLs). A term can have 100 characters, a search-term line 1,000 and a URL 8,192. Bad input is rejected before any request, for example 6 terms on one line, `UK` instead of `GB` or an end date in the future.

Google rate-limits Trends traffic per IP. It often answers a new visitor with HTTP 429 and a cookie. The Actor retries once with that cookie, then moves to a new proxy IP with backoff waits of about 1–2 s, 2–4 s, 4–8 s, 8–16 s, then 15–30 s. In one Apify run Google sent 6 of 13 requests back with HTTP 429, and the Actor still finished in 24 s.

When a request fails on every retry (HTTP 429, 403, 5xx, a network error or a timeout), that comparison gives up after one retry ladder (about 50 s of waiting, or about 3 minutes when every attempt times out after 20 s). Its other outputs are skipped. After 3 such comparisons in a row the run stops with a clear message, so it doesn't burn your timeout. In 3 of 5 local runs of the default input (one direct connection, no proxy), Google answered HTTP 429 on every retry and the run ended after about 1 minute with no data and no charge. If you see that on Apify, select the RESIDENTIAL proxy group and keep `maxConcurrency` at 1.

Run time grows with the input. Plan for roughly 10 to 25 seconds per comparison at concurrency 1, and more when Google rate-limits. That's about 2 to 5 minutes for 10 comparisons, 15 to 45 minutes for 100, and 1.4 to 3.5 hours for 500 comparisons. Set the run timeout to fit. About 30 seconds before the timeout the Actor stops starting requests, saves what it has and lists the rest as `skipped` in `OUTPUT`.

Terms that contain a comma aren't supported, because the comma separates terms. Trending now and daily trending searches aren't in this version. Region data comes at the level Google shows by default (countries for worldwide, states or regions for a country).

### FAQ

#### Data compared with the Google Trends website

Google labels the requests from this Actor `USER_TYPE_SCRAPER` (you can see it in `OUTPUT` as `googleUserType`). In our tests on 2026-11-05, interest over time and by region looked right, with the peaks of "christmas" and "super bowl" in the right weeks over 5 years. We haven't compared the numbers with the website side by side.

#### Rising queries and related topics are off by default

Most rising queries were unrelated filler for automated requests, 38 of 50 in one `coffee, tea` run ("top songs this week", "sports scores today"). Related topics came back empty in 7 of 7 tests. You can turn both on, and they add no charge, because you pay per term.

#### Filtering unrelated related queries

Top related queries are mostly on topic, but some are generic. In the Apify run above, 8 of 50 had `mentionsTerm: false`, such as "travel" and "jobs" for coffee. `mentionsTerm` is `true` when the query contains every word of the term with 3 or more letters, each as a whole word or with a plural "s" or "es". So "teas" matches "tea", but "teams" doesn't. Short terms like `AI` or `c++` must appear as a whole phrase. It's a simple text check, so it also drops some related entries such as "chocolate" for coffee.

#### Terms or regions with no rows

Google hides regions with too little search volume, and so does this Actor. A term with no data at all gets no rows and isn't charged. The `OUTPUT` notes tell you which term got nothing. In a comparison of several terms, a series of zeros is kept, because there 0 means "below 1% of the top term's peak".

#### Weekly ranges can start a few days early

For ranges Google shows in weeks, each point starts on a Sunday, so the first week can begin before your start date. `date` is the start of each point, in UTC.

#### Data from runs that stop early

Rows that were already fetched are charged and saved when the run stops for the circuit breaker or the time limit. They aren't saved after the maximum cost per run is reached (they couldn't be charged) or when you abort the run.

### Legal

This Actor reads public, aggregated Google Trends data. It doesn't collect personal data. Make sure your use complies with Google's terms and the laws that apply to you.

# Changelog

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

# Actor input Schema

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

One comparison per line. Put up to 5 terms on one line, separated by commas, to compare them on the same 0-100 scale like on the Google Trends website, for example "coffee, tea". A line with one term is its own comparison. Google topic ids such as /m/02vqfm work too. Terms can't contain commas, and a line can have at most 1,000 characters. You pay $0.001 per term that returns data, so the prefilled line costs $0.002.

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

Optional. Paste explore URLs from trends.google.com, for example https://trends.google.com/trends/explore?q=coffee,tea\&geo=US\&date=today%205-y. Each URL is one comparison and keeps its own terms, geo, date, category and property; the fields below don't change URLs. The same term may appear twice with different geos (q=coffee,coffee\&geo=US,GB). Missing URL parameters use Google's defaults: worldwide, past 12 months, all categories, web search. Not supported: different date ranges per term (date=A,B; paste one URL per date range instead), hourly custom ranges (date=2024-01-01T00 2024-01-07T00) and date=all_2008. A URL that can't be read fails on its own, isn't charged, and the rest of the run continues.

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

Where to run every comparison. Use a 2-letter country code (US, DE, JP; GB, not UK), a subregion (US-CA, GB-ENG), a US metro (US-CA-807) or "worldwide". Leave empty or use "worldwide" for worldwide. An API call that leaves out geos gets the default, US. Each geo repeats every line, so 3 lines in 2 geos make 6 comparisons. Unknown country codes are rejected before any request. Subregion and metro codes are only checked for format, and Google rejects unknown ones (only that comparison fails).

## `timeframe` (type: `string`):

Preset time range. Google picks the time step from the range: minutes or hours for short ranges, days up to 90 days, weeks up to 5 years, months for longer ranges. Custom time range below overrides this.

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

Optional. Overrides Timeframe. Format YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-12-31. The earliest start is 2004-01-01 and the end can't be in the future.

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

Limit the data to one Google Trends category. All categories is what the website shows by default. For a subcategory, use Custom category id below.

## `customCategoryId` (type: `integer`):

Optional. Any Google Trends category id, for example 174 (Science) or a subcategory id from the cat= parameter of a Google Trends URL. Overrides Category.

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

Which Google search the interest data comes from: web search (default), news, images, YouTube or Google Shopping.

## `interestOverTime` (type: `boolean`):

One row per term and time point, 0-100. Values are relative to the highest point among all terms of the comparison. Same price whether on or off.

## `interestByRegion` (type: `boolean`):

One row per term and region (countries for worldwide, subregions for a country). Regions with too little search volume are left out, as on the website. In a comparison of 2 or more terms, each row also has comparisonShare, the term's share of the compared terms' searches in that region.

## `relatedQueriesTop` (type: `boolean`):

Up to 25 top related queries per term (the most searched queries related to the term). Each row has mentionsTerm (true when the query contains every word of the term with 3 or more letters, plural s or es allowed; null for topic ids), so you can drop generic entries such as "travel" for coffee.

## `relatedQueriesRising` (type: `boolean`):

Up to 25 rising related queries per term (biggest growth). Off by default: Google labels automated requests USER_TYPE_SCRAPER, and in our tests (2026-11-05) most rising queries were unrelated filler, for example 38 of 50 for "coffee, tea" ("top songs this week", "sports scores today"). Turn it on only if you filter with mentionsTerm. It needs no extra request and adds no charge (you pay per term, not per row).

## `relatedTopics` (type: `boolean`):

Up to 25 top and 25 rising related topics per term. Experimental and off by default: in our tests (2026-11-05) Google returned empty related-topic lists to automated requests every time (7 of 7), so this mostly adds requests. Empty lists add no rows and no charge. Google shows related topics only for single terms, so a comparison of N terms needs N extra requests.

## `includeRawResponses` (type: `boolean`):

Also save Google's raw JSON for each comparison in the key-value store (records RAW-c1, RAW-c2, ...). Not charged and not in the dataset.

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

Google Trends interface language (hl), for example en-US, de, pt-BR, es-419. Changes region names and topic titles, not the numbers.

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

Apify Proxy is on by default (datacenter). Google rate-limits busy datacenter IPs (HTTP 429). The Actor retries with a fresh cookie and a new proxy IP, but if many requests fail, select the RESIDENTIAL group (costs more per GB).

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

Comparisons processed in parallel. Higher values are faster but trigger Google's rate limit sooner. Use 2-3 only with the RESIDENTIAL proxy.

## `maxRetries` (type: `integer`):

How often one request is retried after HTTP 429, 403, 5xx, a network error or a timeout. Waits between attempts grow exponentially with random jitter: about 1-2 s, 2-4 s, 4-8 s, 8-16 s, then 15-30 s (or Google's Retry-After, capped at 30 s). The first 429 of a request that sets a new NID cookie is retried after 1-2 s with that cookie (once per request).

## Actor input object example

```json
{
  "searchTerms": [
    "coffee, tea",
    "bitcoin"
  ],
  "trendsUrls": [
    "https://trends.google.com/trends/explore?q=coffee,tea&geo=US&date=today%205-y"
  ],
  "geos": [
    "US",
    "GB"
  ],
  "timeframe": "today 12-m",
  "customTimeRange": "2024-01-01 2024-12-31",
  "category": "0",
  "customCategoryId": 174,
  "property": "web",
  "interestOverTime": true,
  "interestByRegion": true,
  "relatedQueriesTop": true,
  "relatedQueriesRising": false,
  "relatedTopics": false,
  "includeRawResponses": false,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 1,
  "maxRetries": 5
}
```

# Actor output Schema

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

No description

## `interestOverTime` (type: `string`):

No description

## `interestByRegion` (type: `string`):

No description

## `related` (type: `string`):

No description

## `allFields` (type: `string`):

No description

## `runReport` (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"
    ],
    "geos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zovo-one/google-trends-scraper-fast").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"],
    "geos": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zovo-one/google-trends-scraper-fast").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"
  ],
  "geos": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zovo-one/google-trends-scraper-fast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zovo-one/google-trends-scraper-fast"
        }
    }
}
```

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/Eq8Uisf0IgGuMV2aH/builds/TYvaUc1Lf8dJgMsGT/openapi.json
