# Google Trends Scraper — Interest, Regions & Rising Queries (`umararshad2/google-trends-scraper`) Actor

Google Trends scraper and API alternative: interest over time, interest by region, top & rising related queries and Trending Now for any keyword, country and timeframe. Adds trend direction, peak and seasonality fields. Proxies included, pay per result.

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

## Pricing

from $0.70 / 1,000 keyword trends

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

## Google Trends Scraper & Google Trends API Alternative

### What does Google Trends Scraper do?

**Google Trends Scraper** pulls data from [Google Trends](https://trends.google.com/) for any keyword, country and timeframe, and returns clean JSON/CSV. You get:

- **Interest over time** (the Google Trends chart, 0–100)
- **Interest by region** (states, countries or US metro areas)
- **Top and rising related queries**, including "Breakout" queries
- **Trending Now**: what people are searching for right now in a country, with search volume, % increase, related searches and news links

Every keyword row also comes with **ready-made summary fields**: average interest, latest value, peak value and date, **trend direction** (rising / stable / falling), **recent change %**, and **peak months** (seasonality).

Use it as a **Google Trends API alternative** or a **pytrends replacement** (pytrends was archived in April 2025, and Google's official Trends API is still an invite-only alpha). No Google account, no API key and no browser needed.

### Why use this Google Trends scraper?

- ✅ **Built for reliability.** Google Trends rate-limits heavily. This Actor handles Google's cookie handshake, retries with backoff, rotates sessions and switches automatically from a direct connection to Apify datacenter and then residential proxies. All of that is **included in the price**.
- ⚡ **Fast.** The default input (2 keywords) finishes in about 5 seconds. In our launch tests, 25 keywords took ~20 s and 100 keyword × country jobs took ~84 s.
- 📊 **Analysis-ready output.** Trend direction, recent change %, peak date and peak months are pre-computed, so you can sort a sheet or feed an AI agent without post-processing.
- 💸 **Pay only for results.** Rows where Google has no data are delivered but never charged.
- 🔌 **Apify platform:** schedule daily runs, call it over the API, export to Google Sheets/Excel/CSV, or connect it to Make, Zapier, n8n and MCP-based AI agents.

#### Use cases

- **E-commerce & Etsy/Amazon product research:** check whether a niche is growing or seasonal before you stock or list it.
- **SEO & content planning:** find rising queries and publish before the peak months.
- **Market research & investing:** track brand vs. competitor interest across countries.
- **Newsrooms & social media:** monitor Trending Now in several countries every hour.
- **AI agents & dashboards:** a single JSON row per keyword with a trend label is easy for an LLM or BI tool to use.

### What data can Google Trends Scraper extract?

| Field | Type | Description |
|---|---|---|
| `keyword`, `geo`, `timeframe` | string | What was queried (`geo` is `WORLDWIDE` for worldwide) |
| `averageInterest` | number | Mean interest (0–100) over the period |
| `latestValue`, `latestDate` | number, date | Latest complete data point |
| `peakValue`, `peakDate` | number, date | Highest point in the period |
| `trendDirection` | string | `rising`, `stable`, `falling` or `insufficient-data` |
| `recentChangePct` | number | Average of the last quarter of the period vs. the quarter before, in % |
| `trendBasis`, `unadjustedRecentChangePct` | string, number | Which data the trend was computed from (`full-period`, `after-data-break`, `excluding-data-anomaly`) and the raw-series change when a break changed it |
| `dataBreakDetected`, `dataBreakFrom`, `dataBreakDate`, `dataBreakChangePct`, `dataBreakSource` | boolean, date, date, number, string | Set when the series contains a Google-side data anomaly or a sharp level shift (see below) |
| `peakMonths` | array | Up to 3 months with the highest interest (periods of ~1 year or longer) |
| `interestOverTime` | array | `{date, formattedTime, value, isPartial}` for every point on the chart |
| `interestByRegion` | array | `{geoCode, geoName, value}` sorted by interest |
| `relatedQueriesTop` / `relatedQueriesRising` | array | `{query, value, formattedValue, isBreakout, exploreUrl}` |
| `title`, `searchVolume`, `increasePct`, `startedAt`, `isActive`, `categories`, `relatedQueries` | various | Trending Now rows (`type: "trending"`), the same list as trends.google.com/trending |
| `newsItems` | array | News links for trending searches that also appear in Google's Trending Now RSS feed (about 10 per country) |
| `exploreUrl` | URL | Opens the same query on trends.google.com |

### How to scrape Google Trends

1. Click **Try for free** and open the **Input** tab.
2. Enter one or more **keywords** (e.g. `coffee`, `matcha`).
3. Choose **countries / regions** (`US`, `GB`, `US-CA`, or `worldwide`) and a **timeframe** (past hour up to 2004–present, or a custom date range).
4. Optional: turn on **Compare keywords on one scale**, choose a **search type** (web, YouTube, News, Images, Shopping) or a **category**, paste **Google Trends explore URLs**, or add **Trending Now countries**.
5. Click **Start**. Results appear in the **Output** tab within seconds. Download them as JSON, CSV, Excel or HTML, or fetch them over the API.

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

Pay-per-event pricing. **Platform usage and proxies are included.** The prices below are for the Apify Free plan; paid Apify plans get automatic discounts.

| Event | Price (Free plan) | Paid plans |
|---|---|---|
| Actor start (once per run) | $0.01 | $0.005–$0.01 |
| Keyword trend row (interest over time + summary stats) | **$0.002** ($2.00 per 1,000) | from $0.0007 |
| Keyword insights (regions and/or related queries, only if enabled and returned) | $0.001 | from $0.0004 |
| Trending Now row | $0.0005 | from $0.0002 |

**Examples (Free plan):**

- Default input (2 keywords with regions + related queries): **$0.016**
- 100 keywords with insights: **$0.31**; 100 keywords trend-only: **$0.21**
- Trending Now, 25 searches in 1 country: **$0.0225**

The Apify Free plan includes $5 of monthly credit, which covers roughly 1,600 keywords with full insights.

#### Price and reliability compared with other Google Trends Actors

Numbers below were read from the Apify Store API on **8 Oct 2026**. "Success" is the share of other users' runs in the last 30 days that ended with status SUCCEEDED.

| Actor | List price (Free plan) | Platform usage | 30-day run success |
|---|---|---|---|
| **This Actor** | $2.00/1k keyword rows (+$1.00/1k insights) + $0.01/run | **Included** | New Actor: all 75 of our test runs (builds 1.0.1–1.0.6, 8 Oct 2026) succeeded and every keyword returned data |
| apify/google-trends-scraper | $3.00/1k results | Paid by you, on top | 57% (12,524 of 21,945 runs) |
| khadinakbar/google-trends-scraper | $5.00/1k results | Paid by you, on top | 94% (1,411 of 1,503 runs) |
| agenscrape/google-trends-scraper | $25.00/1k results + $0.025/run | Included | 99% (6,842 of 6,902 runs) |

### Input

See the **Input** tab for all options. Example input:

```json
{
    "keywords": ["coffee", "matcha"],
    "geos": ["US", "GB"],
    "timeframe": "today 12-m",
    "includeRegions": true,
    "includeRelatedQueries": true,
    "trendingNowGeos": ["US"]
}
```

- **Location codes:** use 2-letter country codes (`US`, `DE`, `IN`), sub-regions (`US-CA`, `GB-SCT`) or `worldwide`.
- **Custom time range:** `"customTimeRange": "2024-01-01 2024-12-31"`.
- **Compare mode:** with `compareKeywords: true`, up to 5 keywords share one 0–100 scale, just like typing them into the same Google Trends chart. With it off (default), each keyword gets its own 0–100 scale.
- **Explore URLs:** paste any `trends.google.com/trends/explore?...` URL; keywords, geo, date, category and search type are read from it.

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. The **Keyword trends** view shows one row per keyword and location.

#### Sample output from a real run

From a real run on 8 Oct 2026 (build 1.0.6; 50 keywords, US, past 12 months, weekly data). All 50 US rows have `dataBreakDetected: true` because of Google's spring-2026 US anomaly (see below), so the trend is computed from the weeks after 28 June; the raw-series change is shown for comparison. Peak weeks in April 2026 fall inside the anomaly.

| Keyword | Avg interest | Latest | Peak week | Trend | Recent change | Raw-series change | Peak months | Top related query | Top rising query |
|---|---|---|---|---|---|---|---|---|---|
| coffee grinder | 19 | 9 | 2026-09-20 | rising | +71.9% | +25.9% | Sep, Aug, Dec | best coffee grinder | laptop stand |
| heated vest | 22.7 | 11 | 2025-12-07 | rising | +150% | -36.8% | Dec, Nov, Jan | heated vest ororo | solana gear heated vest reviews |
| heated blanket | 34.5 | 29 | 2025-11-30 | rising | +104.8% | -48.4% | Dec, Nov, Jan | heated blanket electric | cozzies heated blanket |
| telescope | 58.7 | 50 | 2026-04-05 | rising | +38.5% | -29.6% | Feb, Nov, Aug | space telescope | dwarf mini smart telescope |
| sourdough starter | 61.1 | 49 | 2026-01-18 | stable | -0.3% | -18.6% | Jan, Feb, Dec | make sourdough starter | costco sourdough starter kit |
| crochet | 75.3 | 69 | 2025-12-21 | stable | -3.4% | -14% | Dec, Jan, Feb | crochet pattern | burmese curly crochet hair |
| pickleball | 64.1 | 49 | 2026-04-12 | falling | -17.1% | -30% | Jun, Jul, Aug | pickleball paddle | best pickleball paddles 2026 |
| camping tent | 51 | 39 | 2026-06-07 | falling | -29% | -35.5% | Jun, Jul, Aug | tent for camping | coleman sundome 6-person camping tent |
| golf simulator | 69.1 | 47 | 2025-12-28 | falling | -12.1% | -32.9% | Dec, Jan, Feb | home golf simulator | jain golf simulator |
| yoga mat | 16.8 | 4 | 2026-04-12 | falling | -25% | -86.5% | Feb, Jul, Jun | yoga mat bag | yune yoga mat |

#### JSON example (one keyword row, arrays shortened)

```json
{
    "type": "keyword",
    "keyword": "matcha",
    "geo": "US",
    "timeframe": "today 12-m",
    "timeRange": "2025-10-08 2026-10-08",
    "resolution": "WEEK",
    "category": 0,
    "searchProperty": "web",
    "comparedWith": [],
    "hasData": true,
    "dataPoints": 53,
    "averageInterest": 75.2,
    "latestValue": 63,
    "latestDate": "2026-09-27T00:00:00.000Z",
    "peakValue": 100,
    "peakDate": "2026-04-12T00:00:00.000Z",
    "recentChangePct": -14,
    "trendDirection": "falling",
    "trendBasis": "after-data-break",
    "unadjustedRecentChangePct": -17.7,
    "dataBreakDetected": true,
    "dataBreakDate": "2026-06-28T00:00:00.000Z",
    "dataBreakFrom": "2026-03-22T00:00:00.000Z",
    "dataBreakChangePct": -10.2,
    "dataBreakSource": "google-us-level-anomaly-2026-03-22-to-2026-06-25",
    "peakMonths": [
        "Jul",
        "Jun",
        "Feb"
    ],
    "topRegion": "Hawaii",
    "topRelatedQuery": "matcha latte",
    "topRisingQuery": "grind rail",
    "interestOverTime": [
        {
            "date": "2026-09-27T00:00:00.000Z",
            "formattedTime": "Sep 27 – Oct 3, 2026",
            "value": 63,
            "isPartial": false
        },
        {
            "date": "2026-10-04T00:00:00.000Z",
            "formattedTime": "Oct 4 – 10, 2026",
            "value": 63,
            "isPartial": true
        }
    ],
    "interestByRegion": [
        {
            "geoCode": "US-HI",
            "geoName": "Hawaii",
            "value": 100
        },
        {
            "geoCode": "US-WY",
            "geoName": "Wyoming",
            "value": 90
        }
    ],
    "relatedQueriesTop": [
        {
            "query": "matcha latte",
            "value": 100,
            "exploreUrl": "https://trends.google.com/trends/explore?q=matcha+latte&date=today+12-m&geo=US"
        },
        {
            "query": "matcha tea",
            "value": 90,
            "exploreUrl": "https://trends.google.com/trends/explore?q=matcha+tea&date=today+12-m&geo=US"
        }
    ],
    "relatedQueriesRising": [
        {
            "query": "grind rail",
            "value": 25900,
            "formattedValue": "Breakout",
            "isBreakout": true,
            "exploreUrl": "https://trends.google.com/trends/explore?q=grind+rail&date=today+12-m&geo=US"
        },
        {
            "query": "earthquake pills",
            "value": 19500,
            "formattedValue": "Breakout",
            "isBreakout": true,
            "exploreUrl": "https://trends.google.com/trends/explore?q=earthquake+pills&date=today+12-m&geo=US"
        }
    ],
    "exploreUrl": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=matcha&hl=en-US",
    "scrapedAt": "2026-10-08T07:28:24.113Z"
}
```

#### Trending Now example (arrays shortened)

```json
{
    "type": "trending",
    "geo": "US",
    "rank": 1,
    "title": "susan dell",
    "searchVolume": 200000,
    "searchVolumeLabel": "200K+",
    "increasePct": 1000,
    "startedAt": "2026-10-07T17:10:00.000Z",
    "endedAt": null,
    "isActive": true,
    "categories": [
        "Law and Government"
    ],
    "relatedQueries": [
        "susan dell",
        "trump accounts",
        "michael dell",
        "trump account for kids"
    ],
    "newsItems": [],
    "source": "trending-now",
    "exploreUrl": "https://trends.google.com/trends/explore?q=susan%20dell&geo=US&date=now%207-d",
    "scrapedAt": "2026-10-08T06:49:41.698Z"
}
```

#### Google's US data anomaly (22 Mar – 25 Jun 2026)

Google Trends' own **US** data sits on a much higher level from about **22 March to 25 June 2026** for practically every keyword, then drops back in the week of 28 June. In our check of 50 unrelated US keywords, all 50 jumped in the week of 29 March and 49 of 50 dropped in the week of 28 June (median −38.5% vs the 4 weeks before). The same keywords in the UK and Canada show nothing. trends.google.com shows the same values, so this is Google's data, not a scraping error, but it makes a "past 12 months" US chart look as if everything is falling.

How the Actor handles it:

- `interestOverTime` is returned **unchanged**, exactly as Google shows it.
- US series (including states and metros) that overlap the period get `dataBreakDetected: true`, `dataBreakFrom` (first affected point), `dataBreakDate` (first point back on the normal level) and `dataBreakChangePct`. Worldwide series are flagged only if they clearly show it.
- `trendDirection` / `recentChangePct` are computed only from data **after** the anomaly when it falls inside the comparison window (`trendBasis: "after-data-break"`). For long periods (5 years, all-time) the affected points are left out instead (`"excluding-data-anomaly"`). The raw-series figure stays in `unadjustedRecentChangePct`.
- `peakMonths` ignores the affected points. `averageInterest`, `peakValue` and `peakDate` still describe the raw chart, so a US peak can fall inside the anomaly.
- In any other series, a sharp single-step level change that stays (≥35%, flat on both sides) inside the comparison window is flagged with `dataBreakSource: "series-step"` and the trend is computed after it. That can also be a real event (a launch, a recall), so check the chart.

### Tips for scraping Google Trends

- **Need only the chart?** Turn off *interest by region* and *related queries*. You pay $0.002 per keyword instead of $0.003, and runs are faster.
- **Comparing brands?** Turn on *Compare keywords on one scale* so values are directly comparable.
- **Seasonality:** use `today 5-y` and look at `peakMonths`.
- **Monitoring:** schedule the Actor daily or hourly and connect a webhook, Google Sheets or Slack integration.
- **Big lists:** the Actor works in parallel (tested with 100 keyword × country jobs in one run) and stops cleanly at your *Max cost per run*.

### FAQ

#### Is there an official Google Trends API?

Google announced an official Trends API in July 2025, but access is limited to approved alpha testers. This Actor reads the same public endpoints that power trends.google.com, with no application needed.

#### Why do so many US keywords drop at the end of June 2026?

That's Google's own US data: values were inflated from about 22 March to 25 June 2026. See "Google's US data anomaly" above for how `trendDirection` handles it.

#### Why do some keywords show 0 or "insufficient-data"?

Google returns 0 when search volume is too low for the selected location or period. Such rows are still returned so you can see them, but rows without any data points are not charged.

#### Are the numbers absolute search volumes?

No. Like the Google Trends website, interest is relative (0–100) within the chosen keyword, location and period. Trending Now rows include Google's approximate search volume (e.g. 200K+).

#### Why do rising queries sometimes look unrelated?

Rising and "Breakout" queries are returned exactly as Google provides them. Google's data occasionally contains noisy breakouts or regional spikes. We do not modify or filter Google's numbers.

#### Related topics?

Google currently returns an empty list for related topics to API clients, so this Actor doesn't offer them (and never charges for them). Related **queries** work normally.

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

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. 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're unsure whether your reason is legitimate, consult your lawyers. Google Trends data is aggregated and anonymous.

#### Something isn't working?

Please open an issue in the **Issues** tab with your run link. You can also call this Actor programmatically from the **API** tab (JavaScript, Python, cURL or MCP).

# Actor input Schema

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

Search terms to look up on Google Trends (max 100 characters each). Each keyword becomes one result row per country.

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

Google Trends location codes: a country ("US", "GB", "DE", "IN"), a sub-region ("US-CA", "GB-ENG") or "worldwide". Each keyword is scraped for every location. Default: US.

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

Time range of the trend data. Ignored if a custom time range is set below.

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

Exact date range as "YYYY-MM-DD YYYY-MM-DD", e.g. "2025-01-01 2025-12-31". Overrides the timeframe above.

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

Adds interest by sub-region (e.g. US states) or country (for worldwide). Charged as a keyword insight together with related queries.

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

Granularity of interest by region. "Auto" uses Google's default for the location (states for a country, countries for worldwide, metro areas for a US state). Metro (DMA) data exists for the US only.

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

Adds the top related queries and the rising queries (including "Breakout" ones) for each keyword. Charged as a keyword insight together with regions.

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

If on, keywords are compared in groups of up to 5 (like typing them into one Google Trends chart), so values are relative to each other. If off, each keyword is scraped on its own 0–100 scale.

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

Which Google search to measure.

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

Google Trends category ID to narrow the meaning of a keyword (0 = all categories). Examples: 71 = Food & Drink, 18 = Shopping, 12 = Business & Industrial, 5 = Computers & Electronics.

## `exploreUrls` (type: `array`):

Paste URLs copied from trends.google.com/trends/explore. Keywords, location, date, category and search type are read from the URL; up to 5 compared keywords per URL.

## `trendingNowGeos` (type: `array`):

Country codes to fetch Google Trends "Trending Now" (currently trending searches with approximate traffic and news links), e.g. \["US", "GB", "IN"].

## `trendingNowHours` (type: `string`):

How far back to look for Trending Now searches. 4 = last 4 hours, 24 = last day, 48 = last 2 days, 168 = last 7 days.

## `maxTrendingPerCountry` (type: `integer`):

Cap on how many Trending Now searches to return per country (1–1000). Default 25 keeps the default run fast and cheap.

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

If on, drop searches that have already stopped trending within the lookback window.

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

Interface language for region names and related queries (Google's hl parameter), e.g. en-US, de, fr, es.

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

Optional. Leave empty: the Actor connects directly and automatically switches to Apify datacenter and then residential proxies if Google rate-limits it. Set this only if you want to force your own proxies.

## Actor input object example

```json
{
  "keywords": [
    "coffee",
    "matcha",
    "cold brew"
  ],
  "geos": [
    "US",
    "GB",
    "worldwide"
  ],
  "timeframe": "today 12-m",
  "includeRegions": true,
  "regionResolution": "auto",
  "includeRelatedQueries": true,
  "compareKeywords": false,
  "searchProperty": "web",
  "category": 0,
  "exploreUrls": [
    "https://trends.google.com/trends/explore?date=today%205-y&geo=GB&q=matcha,coffee"
  ],
  "trendingNowGeos": [
    "US",
    "GB"
  ],
  "trendingNowHours": "24",
  "maxTrendingPerCountry": 25,
  "trendingActiveOnly": false,
  "language": "en-US"
}
```

# Actor output Schema

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

No description

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

No description

## `runSummary` (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": [
        "coffee",
        "matcha"
    ],
    "geos": [
        "US"
    ],
    "timeframe": "today 12-m"
};

// Run the Actor and wait for it to finish
const run = await client.actor("umararshad2/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": [
        "coffee",
        "matcha",
    ],
    "geos": ["US"],
    "timeframe": "today 12-m",
}

# Run the Actor and wait for it to finish
run = client.actor("umararshad2/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": [
    "coffee",
    "matcha"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m"
}' |
apify call umararshad2/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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