# Google Trends Scraper — No Start Fee, No Empty Charges (`digitalstorks/google-trends-scraper`) Actor

Google Trends data for any keyword: interest over time, by region, rising and breakout queries, topics. Paste Trends links or a Google Sheet, export Excel-ready rows. Trending Now by category, 4h to 7 days. No start fee, no charge for empty results. $3 per 1,000 keywords.

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

## Pricing

from $2.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?

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 gets **Google Trends data for any keyword**: interest over time, interest by country, state or city, related queries (top and **rising / breakout**) and related topics. You also get a **plain-language trend summary** (rising, falling or stable, with peak date and % change). It also pulls **Trending Now** searches for any country or US state, over the past 4 hours to 7 days, filtered by category, with search volume, growth and news links.

**Built for reliability:**

- ⚡ **No hanging runs.** Blocked requests are retried on fresh connections, then switched to a backup data source, so you get data instead of a 20-minute run with nothing in it.
- 💸 **You never pay for empty results.** Keywords that fail, or that Google has no data for, are not charged.
- 🧾 **No start fee.** Many keywords in one run, and you pay only per keyword: 10 keywords cost $0.03. See [the cost comparison](#how-much-does-it-cost).
- 🛑 **Respects your spending limit.** The run stops the moment your maximum cost is reached.

**Easy to use:**

- 🔗 **Paste Google Trends links** straight from your browser. Location, dates, category and search type come with them.
- 📄 **Read keywords from a Google Sheet**, so you don't have to copy long lists.
- 📊 **Excel-ready output:** choose one row per data point for spreadsheets, or one row per keyword for JSON and the API.

### Who is it for?

- **SEO and content teams:** find rising and breakout queries before your competitors, and plan content around seasonal peaks.
- **Marketers and agencies:** compare brands, products or campaigns, and see where in the country interest is highest.
- **E-commerce:** spot seasonal demand and plan stock and promotions.
- **Newsrooms and social media teams:** catch what's trending right now, by category, with the news stories behind it.
- **Researchers and analysts:** pull clean, structured trend data for many keywords at once.
- **AI agents and automations:** works through the Apify API, MCP, Make, n8n and Zapier.

### How to use it

1. Add your keywords in any of three ways:
   - type them into **Keywords**, one per line;
   - paste **Google Trends links** (from trends.google.com/trends/explore);
   - link a **Google Sheet** with one keyword per row in the first column, shared as "Anyone with the link can view".
2. Optionally pick a **location** (e.g. `US`, `GB`, `US-CA`; empty = worldwide), a **time range** and a **search type** (web, YouTube, News, Images, Shopping). Links keep their own settings.
3. Pick an **output format**: one row per keyword, or one row per data point for Excel and Google Sheets.
4. Click **Start**. Download results as JSON, CSV, Excel or HTML, or connect them to your tools.

Want to compare keywords head-to-head, like typing them side by side in Google Trends? Turn on **Compare keywords**. Up to 5 keywords are compared at once.

For trending searches, switch **What do you want to get?** to **Trending Now**, then set a country, a time window and, if you like, categories.

#### Input examples

**One keyword, worldwide, past 12 months**

```json
{ "keywords": ["electric bikes"] }
```

**Compare three brands in the US, as an Excel-ready table**

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

**Exact dates in one country**

```json
{
  "keywords": ["black friday", "cyber monday"],
  "geo": "GB",
  "customTimeRange": "2025-10-01 2025-12-31"
}
```

**YouTube searches over 5 years**

```json
{
  "keywords": ["minecraft", "fortnite"],
  "timeRange": "today 5-y",
  "property": "youtube"
}
```

**Paste Google Trends links, and read more keywords from a Google Sheet**

```json
{
  "trendsUrls": ["https://trends.google.com/trends/explore?date=today%203-m&geo=GB&q=coffee,tea&cat=71"],
  "keywordsSheet": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"
}
```

**Trending Now: sports and technology trends in the UK over the past 7 days**

```json
{
  "mode": "trendingNow",
  "geo": "GB",
  "trendingTimeWindow": "168",
  "trendingCategories": ["17", "18"],
  "maxTrendingItems": 100
}
```

### What data do you get?

| Data | Description |
|---|---|
| Trend summary | Average and peak interest, peak date, latest value, % change (last quarter of the period vs the first) and direction (rising / falling / stable) |
| Interest over time | Timeline of search interest on Google's 0–100 scale |
| Interest by region | Countries, states, metro areas or cities ranked by interest |
| Related queries | Top and rising searches, including **Breakout** queries (+5000%) |
| Related topics *(add-on)* | Top and rising topics, with topic type |
| Trending Now | Trending search, search volume, growth %, start and end time, active or ended, categories, related searches, and news articles for the current top trends |

#### Time ranges

| Time range | Input value | One data point every |
|---|---|---|
| Past hour | `now 1-H` | minute |
| Past 4 hours | `now 4-H` | minute |
| Past day | `now 1-d` | 8 minutes |
| Past 7 days | `now 7-d` | hour |
| Past 30 days | `today 1-m` | day |
| Past 90 days | `today 3-m` | day |
| Past 12 months *(default)* | `today 12-m` | week |
| Past 5 years | `today 5-y` | week |
| 2004 – present | `all` | month |
| Custom dates | `customTimeRange`: `2025-01-01 2025-06-30` | depends on the length |

#### Output formats

**One row per keyword** *(default)*: everything about a keyword in one item. Best for JSON, the API and AI agents.

**One row per data point**: a flat table that opens neatly in Excel or Google Sheets. Each row has a `type`:

| `type` | One row for each | Main columns |
|---|---|---|
| `summary` | keyword | `averageInterest`, `peakInterest`, `peakDate`, `latestInterest`, `changePercent`, `trendDirection`, `googleTrendsUrl` |
| `interestOverTime` | date | `date`, `formattedTime`, `value`, `isPartial` |
| `interestByRegion` | region | `regionCode`, `regionName`, `value` |
| `relatedQuery` | related search | `list` (top / rising), `rank`, `query`, `value`, `formattedValue` |
| `relatedTopic` | related topic | `list`, `rank`, `topic`, `topicType`, `value`, `formattedValue` |

Every row also has `keyword`, `comparedWith`, `geo`, `timeRange`, `property` and `category`, so you can filter and pivot. You're still charged **per keyword**, not per row.

#### Sample output

A real result for `claude ai` in the US over the past 12 months, in the default format (lists shortened):

```json
{
  "keyword": "claude ai",
  "comparedWith": [],
  "geo": "US",
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "summary": {
    "averageInterest": 48,
    "peakInterest": 100,
    "peakDate": "2026-03-01T00:00:00.000Z",
    "latestInterest": 43,
    "changePercent": 186,
    "trendDirection": "rising",
    "dataPoints": 52
  },
  "interestOverTime": [
    {
      "date": "2026-09-27T00:00:00.000Z",
      "formattedTime": "Sep 27 – Oct 3, 2026",
      "value": 43,
      "isPartial": false
    }
  ],
  "interestByRegion": [
    {
      "geoCode": "US-DC",
      "geoName": "District of Columbia",
      "value": 100
    },
    {
      "geoCode": "US-WY",
      "geoName": "Wyoming",
      "value": 95
    }
  ],
  "relatedQueries": {
    "top": [
      {
        "query": "best ai",
        "value": 100,
        "formattedValue": "100"
      }
    ],
    "rising": [
      {
        "query": "claude cowork",
        "value": 91450,
        "formattedValue": "Breakout"
      },
      {
        "query": "claude mythos",
        "value": 41150,
        "formattedValue": "Breakout"
      }
    ]
  },
  "source": "google",
  "googleTrendsUrl": "https://trends.google.com/trends/explore?q=claude+ai&date=today+12-m&geo=US"
}
```

A real Trending Now result (UK, past 7 days, related searches shortened):

```json
{
  "rank": 1,
  "title": "asos hacked",
  "searchVolume": 200000,
  "approxTrafficText": "200K+",
  "growthPercent": 1000,
  "startedAt": "2026-10-06T08:50:00.000Z",
  "endedAt": null,
  "isActive": true,
  "categories": ["Technology"],
  "relatedSearches": ["asos", "has asos been hacked", "asos share price"],
  "news": [],
  "geo": "GB",
  "timeWindowHours": 168
}
```

#### Field reference

| Field | Meaning |
|---|---|
| `keyword` | The search term this result is for |
| `comparedWith` | Other keywords in the same comparison (empty if analysed alone) |
| `geo`, `timeRange`, `property`, `category` | The settings used for this keyword |
| `summary.changePercent` | Average of the last quarter of the period vs the first quarter, in % |
| `summary.trendDirection` | `rising` (over +10%), `falling` (below −10%) or `stable` |
| `interestOverTime[].isPartial` | `true` for the latest point when Google hasn't finished counting it |
| `relatedQueries.rising[].formattedValue` | Growth such as `+250%`, or `Breakout` for growth above 5000% |
| `source` | `google`, `backup` (our backup data source was used) or `google+backup` (topics came from the backup) |
| `googleTrendsUrl` | Opens the same view on trends.google.com |
| `searchVolume` (Trending Now) | Google's approximate number of searches, e.g. `200000` for "200K+" |
| `growthPercent` (Trending Now) | How much searches grew, e.g. `1000` = +1000% |
| `isActive` (Trending Now) | `false` once the trend has peaked and ended (`endedAt` is then set) |

Keywords that failed or had no data are listed, uncharged, in the run's `NOT_RETURNED` record, together with any links that couldn't be used.

#### Trending Now categories

Use these IDs in `trendingCategories`, or tick them in the input form:

| ID | Category | ID | Category |
|---|---|---|---|
| 1 | Autos and Vehicles | 11 | Other |
| 2 | Beauty and Fashion | 13 | Pets and Animals |
| 3 | Business and Finance | 14 | Politics |
| 4 | Entertainment | 15 | Science |
| 5 | Food and Drink | 16 | Shopping |
| 6 | Games | 17 | Sports |
| 7 | Health | 18 | Technology |
| 8 | Hobbies and Leisure | 19 | Travel and Transportation |
| 9 | Jobs and Education | 20 | Climate |
| 10 | Law and Government | | |

### Use it via API, MCP and automations

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("digitalstorks/google-trends-scraper").call(run_input={
    "keywords": ["chatgpt", "gemini"],
    "geo": "US",
    "compareKeywords": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["keyword"], item["summary"]["trendDirection"], item["summary"]["changePercent"])
```

**JavaScript / Node.js**

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('digitalstorks/google-trends-scraper').call({
    keywords: ['chatgpt', 'gemini'],
    geo: 'US',
    compareKeywords: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => console.log(item.keyword, item.summary.trendDirection));
```

**cURL** (runs the Actor and returns the results in one call)

```bash
curl -X POST "https://api.apify.com/v2/acts/digitalstorks~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["chatgpt"], "geo": "US"}'
```

**AI agents (MCP).** Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=digitalstorks/google-trends-scraper"
```

For Claude Desktop, Cursor or VS Code, add this to your MCP config:

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

Then ask things like *"Compare ChatGPT, Gemini and Claude search interest in the US this year"* or *"What sports searches are trending in the UK this week?"*

**No-code:** connect it to Make, n8n, Zapier or Google Sheets, send results to Slack or a webhook, or schedule it to track keywords every day or week.

### How much does it cost?

You pay only for results you receive:

- **Keyword report:** $3.00 per 1,000 keywords ($0.003 each). Includes the timeline, regions, related queries and trend summary, in either output format. Cheaper on paid Apify plans: $2.70 on Starter, $2.40 on Scale, $2.00 on Business and above.
- **Related topics add-on:** $15.00 per 1,000 keywords, only when you turn it on and topics are returned.
- **Trending Now:** $1.00 per 1,000 trending searches.

Failed keywords and keywords with no Google Trends data are **free**. Platform usage (compute and proxies) is included in the price. There's no real start fee: Apify's minimum is $0.00005 per run.

**Apify free plan:** keyword reports and Trending Now work in full, with no keyword limit. Data comes from Google only: the backup data source and the related topics add-on need any paid Apify plan (or your own DataForSEO login in the input).

#### What it really costs per keyword

"Per 1,000 results" means different things on different Actors: per row, per keyword or per run. Some add a fee every time a run starts and take only one keyword per run, so the price on the card is far from what you pay. Compare the **cost per keyword**:

| Keywords | **This Actor** | Typical "$2 / 1,000 results + $0.02 per run" Actor (1 keyword per run) |
|---|---|---|
| 1 | **$0.003** | $0.022 |
| 10 | **$0.03** | $0.22 |
| 100 | **$0.30** | $2.20 |
| 1,000 | **$3.00** | $22.00 |

Each keyword includes the full report: timeline, regions, top and rising queries and the trend summary.

**Examples:**

- A weekly report on 200 keywords: $0.60 a week, about $31 a year.
- Daily Trending Now for 3 countries, top 20 each: $0.06 a day, about $22 a year.

### Tips for best results

- **Be specific.** "iPhone 17 Pro" gives cleaner related queries than "iPhone".
- **Compare in one run.** Turn on **Compare keywords** so values share one scale. Values from separate runs or groups can't be compared directly.
- **Match the time range to the question.** Use the past 7 days or 30 days for news and launches, and 5 years for seasonality.
- **Set a country for regional detail.** Worldwide shows countries; a country shows states or regions; a state such as `US-CA` shows cities.
- **Use a category for ambiguous words.** "Jaguar" with category 47 (Autos & Vehicles) means the car, not the animal.
- **Use the 7-day Trending Now window for weekly briefs.** It returns hundreds of trends per country; filter by category to keep only what matters to you.

### What it doesn't do

- **No absolute search volumes for keywords.** Google Trends publishes only relative interest from 0 to 100. Trending Now items do include Google's approximate volume, such as "200K+".
- **Comparisons are capped at 5 keywords**, which is Google's own limit for one shared scale.
- **News articles and pictures** are available for the current top trending searches only, because that's what Google publishes for them.

### FAQ

**Is there an official Google Trends API?** Not for the public. Google's Trends API is in a limited alpha for selected testers. This Actor gives you the same data through the Apify API, with no Google account or API key.

**How do I use Google Trends for SEO keyword research?** Look at **rising** related queries for your main topics. "Breakout" queries have grown more than 5000% and usually have little competition yet. Use interest over time to see when a topic peaks, and publish 4–6 weeks before the peak so your page has time to rank. Use interest by region to decide which locations to target.

**What's the difference between top and rising related queries?** **Top** queries are the most searched alongside your keyword in the period: established demand. **Rising** queries grew the most compared with the previous period: new demand. `Breakout` means growth of more than 5000%.

**How do I compare two keywords properly?** Put them in the same run with **Compare keywords** on (or paste a Google Trends link that compares them). Google scales every request to its own 0–100, so "80" in one request and "80" in another don't mean the same amount of searches.

**Why are values between 0 and 100?** Google Trends shows *relative* interest, not search counts: 100 is the peak for the chosen keywords, place and time.

**Which Google Trends links work?** Links to the Explore page (`trends.google.com/trends/explore?q=...`). Each link can compare up to 5 terms. For trending searches, use Trending Now mode instead of a link.

**How do I use a Google Sheet?** Put one keyword per row in the first column, click **Share**, set **General access** to "Anyone with the link" (Viewer), and paste the link into **Google Sheet with keywords**. A header such as "Keyword" in the first row is skipped. The location and time range you set apply to all of them.

**Why do some keywords return no data?** Google only shows data for terms with enough search volume. You're not charged for those. Their names are saved in the run's `NOT_RETURNED` record.

**How do I track trends over time?** Save your input as a task and schedule it (daily or weekly). Each run is a fresh read of Google Trends; export to Google Sheets or a database to build your own history.

**Is it legal to scrape Google Trends?** The Actor collects publicly available, aggregated and anonymous trend data. Make sure your use complies with the laws and terms that apply to you.

**Something not working?** Open an issue on the Issues tab. We respond fast.

# Actor input Schema

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

<b>Keyword trends</b>: interest over time, by region, related queries and topics for your keywords.<br><b>Trending Now</b>: today's fastest-rising searches in a country, with approximate traffic and news links.

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

Search terms to analyse, one per line. Each keyword is one result (one charge). You can also use Google Trends links or a Google Sheet below.

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

Optional. Paste links from <a href="https://trends.google.com/trends/explore" target="_blank">Google Trends Explore</a>, one per line. Keywords, location, time range, category and search type are read from each link, and keywords in one link are compared with each other. Each keyword is one result (one charge).

## `keywordsSheet` (type: `string`):

Optional. Link to a Google Sheet shared as <b>Anyone with the link can view</b>. Keywords are read from the first column (of the tab in the link, or the first tab). A header such as "Keyword" in the first row is skipped. Uses the location and time range below.

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

Two-letter country code (e.g. <code>US</code>, <code>GB</code>, <code>DE</code>) or a region code (e.g. <code>US-CA</code>). Leave empty for worldwide. Trending Now needs a country or region and defaults to <code>US</code>.

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

Period to analyse. Use Custom time range below for exact dates.

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

Optional. Overrides Time range. Format: <code>YYYY-MM-DD YYYY-MM-DD</code>, e.g. <code>2025-01-01 2025-06-30</code>.

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

Which Google search to measure.

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

Google Trends category ID to narrow results (0 = all categories). Example: 7 = Finance, 71 = Food & Drink, 958 = Jobs.

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

<b>One row per keyword</b>: all data for a keyword in one item (best for JSON and the API).<br><b>One row per data point</b>: a flat table with one row per date, region, query or topic (best for Excel, CSV and Google Sheets). You are still charged per keyword, not per row.

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

On: keywords are analysed together in groups of up to 5 (like typing them side by side in Google Trends), so their values are directly comparable. Off: each keyword is analysed on its own 0–100 scale.

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

Timeline of search interest (0–100).

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

Where the keyword is most popular.

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

Searches people also make, including breakout queries.

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

Topics people also search for. Add-on: charged separately, only for keywords where topics are returned. Needs a paid Apify plan (or your own DataForSEO login below).

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

Level of detail for Interest by region. Auto = countries for worldwide, regions/states for a country, cities for a region.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions with very little search volume.

## `trendingTimeWindow` (type: `string`):

Trending Now only. How far back to look for trending searches.

## `trendingCategories` (type: `array`):

Trending Now only. Keep only trending searches in these categories. Leave empty for all.

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

Trending Now only. Skip trends that have already peaked and ended.

## `maxTrendingItems` (type: `integer`):

Trending Now only. Each trending search is one result (one charge). The 7-day window can return over 1,000 trends.

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

Language for topic names and formatted dates, e.g. <code>en-US</code>, <code>de</code>, <code>fr</code>.

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

How many fresh connections to try against Google before switching to the backup data source.

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

How many keywords to process at the same time, each on its own connection. Higher is faster; lower is gentler on Google.

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

Residential proxies give the best results with Google Trends.

## `dataForSeoLogin` (type: `string`):

Optional. Use your own DataForSEO account for the backup source and related topics. On the Apify free plan, this is the only way to turn them on.

## `dataForSeoPassword` (type: `string`):

Optional. API password from your DataForSEO dashboard.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "chatgpt",
    "claude ai"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "property": "",
  "category": 0,
  "outputFormat": "grouped",
  "compareKeywords": false,
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "regionResolution": "AUTO",
  "includeLowVolumeRegions": false,
  "trendingTimeWindow": "24",
  "trendingCategories": [],
  "trendingActiveOnly": false,
  "maxTrendingItems": 50,
  "language": "en-US",
  "maxRetries": 4,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Table view: keyword, location, trend summary and related queries.

## `rows` (type: `string`):

Table view for the "One row per data point" output format.

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

Full results, including timelines, regions, related queries and topics.

## `notReturned` (type: `string`):

Keywords that failed or had no Google Trends data (not charged). Only present when there are any.

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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