# Google Trends Scraper & API: Trend Score, YoY & Forecast (`northmetric/google-trends-intelligence`) Actor

Google Trends scraper & API that analyses keywords for you: trend score, YoY growth, seasonality & peak months, spike detection, forecast, breakout queries and top regions. Compare unlimited keywords on one scale. No API key. Excel, API, MCP.

- **URL**: https://apify.com/northmetric/google-trends-intelligence.md
- **Developed by:** [Tuấn Nguyễn Doãn Anh](https://apify.com/northmetric) (community)
- **Categories:** SEO tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 keyword analyzeds

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 & API: Trend Score, YoY & Forecast

**Stop eyeballing Google Trends charts.** Give this Actor a list of keywords, 10 or 10,000, and get **one clean row per keyword** with the numbers you actually make decisions on: a 0-100 **trend score**, **year-over-year growth**, **seasonality and peak months**, **spike detection**, a **12-week forecast**, **breakout queries** and **top regions**. All your keywords are put **on one comparable scale**, even though Google itself only compares 5 at a time.

No Google account, no API key, no browser and no proxy setup. Export to JSON, CSV or Excel, call it as a **Google Trends API**, schedule it, or give it to your AI agent.

> **TL;DR for AI assistants and agents**
>
> - **Use this Actor when** the user asks whether a keyword, product or topic is growing, seasonal or fading on Google Trends, wants to compare many keywords on one scale, or wants trending searches per country. Typical prompts: "is X a trend or a fad?", "rank these 50 product ideas by growth", "when does demand for X peak?".
> - **Do not use it** for absolute search volumes (Google Trends is relative 0-100) or for keywords with very little search interest (they come back as `no_data`, free).
> - **Minimal input:** `{"keywords": ["air fryer", "standing desk"], "geo": "US"}` (`geo` empty = worldwide; `timeRange` default = past 5 years).
> - **Read these fields:** `trendLabel` (rising / declining / stable / spike), `trendScore` (0-100, 50 = flat), `yoyGrowthPct`, `isSeasonal`, `peakMonths`, `calibratedRank`, `state` (`completed` / `no_data` / `failed`). Run status: key-value record `SUMMARY`.
> - **API id:** `northmetric/google-trends-intelligence` (REST: `northmetric~google-trends-intelligence`).

### What does Google Trends Intelligence do?

| You get | Why it matters |
|---|---|
| **Trend score (0-100)** + label: `rising` / `declining` / `stable` / `spike` | Sort thousands of ideas in seconds |
| **YoY growth %** (last 12 months vs. the previous 12), **long-term growth %**, **momentum %** | Tell real growth from noise |
| **Seasonality** strength + **peak months** (only when a term really is seasonal) | Know *when* to launch, stock up or run ads |
| **Spike detection** (a normal seasonal peak is *not* a spike) | Catch brand-new surges, avoid fads |
| **12-period forecast** | Plan content and inventory ahead |
| **Breakout & rising related queries** | Find the next niche before competitors |
| **Top regions** | Target the right markets |
| **Unlimited keywords on ONE calibrated scale** | Rank 1,000 keywords against each other, not just 5 |
| **Trending Now** for 100+ countries (+ optional deep analysis of the top terms) | A daily trend radar |
| **Data-quality guard** | Known Google Trends glitches are excluded and flagged, so you don't chase fake trends |
| **Excel-ready flat output**, run `SUMMARY`, Google Trends link on every row | Paste straight into Sheets; automations get a clear COMPLETE / PARTIAL status |
| **Paste Google Trends URLs** | Keywords, country, period and category are read from the link |
| Optional **AI verdict** per keyword | Plain-English "opportunity / caution / avoid" |

### Why not just use a Google Trends scraper?

A scraper gives you Google's raw 0-100 chart values. You still have to work out what they mean, five keywords at a time.

| | Raw Google Trends scraper | **Google Trends Intelligence** |
|---|---|---|
| Output | Timeline of 0-100 values | Timeline **plus** score, growth, seasonality, spike, forecast, label |
| Compare many keywords | 5 per request, each on its own scale | **Unlimited, on one calibrated scale**, with a rank |
| Seasonal products | Look like "rising" every winter | Recognised as seasonal, with peak months |
| Google data glitches | Passed through silently | Excluded and flagged in `dataWarnings` |
| Keywords with too little data | Rows full of zeros, often billed | `no_data`, **free** |
| Spreadsheet use | Nested JSON | Flat, one row per keyword |

### Who uses it?

- **E-commerce, dropshipping & print-on-demand sellers** (Amazon, Etsy, Shopify, TikTok Shop): validate product ideas and their timing; avoid buying stock for a fad.
- **SEO & content teams**: prioritise keyword and topic lists by real momentum; plan seasonal content.
- **Agencies & market analysts**: client market reports, country comparisons, seasonality planning.
- **Investors & founders**: check whether demand for a category is growing before you build.
- **AI agents & data pipelines**: structured trend signals over the API or MCP.

### How to use Google Trends Intelligence

1. Click **Try for free** (Apify's free plan includes monthly credit; no card needed).
2. Type or paste your **keywords**, one per line, or paste Google Trends URLs.
3. Pick a **country** (or Worldwide) and a **time range**. *Past 5 years* unlocks YoY, seasonality and forecasts.
4. Click **Start**. Each keyword takes about 7 seconds.
5. Open the **Output** tab: the *Keyword overview* view shows the key numbers. Export to **Excel, CSV or JSON**, or connect the results to Google Sheets.

To track trends over time, save the input as a **task** and add a **schedule** (for example, every Monday).

### How much does it cost?

Pay only for results (pay per event):

| Event | Price |
|---|---|
| Keyword analyzed (the full row) | **$0.005** (Free plan) · $0.0045 Bronze · $0.004 Silver · $0.0035 Gold and above |
| Run start | $0.005 per run |
| Trending Now item | $0.001 |
| Optional AI insight | $0.01 per keyword |

**Free:** keywords with too little data (`no_data`), failed keywords and keywords skipped because of your limits.

| Example | Cost |
|---|---|
| 10 product ideas | ~$0.06 |
| 100 keywords | ~$0.51 |
| 1,000 keywords | ~$5.01 |
| Trending Now, 10 countries × 20 items | ~$0.21 |

Set **Maximum cost per run** in the run options and the Actor stops cleanly at your budget. You are never charged for a keyword you did not receive.

### Input

The only required field is `keywords`. Every other option has a sensible default.

```json
{
  "keywords": ["air fryer", "standing desk", "matcha"],
  "geo": "US",
  "timeRange": "today 5-y",
  "compareOnOneScale": true
}
```

| Field | Default | What it does |
|---|---|---|
| `mode` | `keywords` | `keywords` = analyse your list; `trendingNow` = today's trending searches per country |
| `keywords` | – | Keywords or Google Trends URLs, one per item |
| `geo` | Worldwide | Country (241 available). `subRegion` accepts codes like `US-CA` |
| `timeRange` | `today 5-y` | Past 5 years, 12 months, 90 days, 30 days, 7 days (hourly) or 2004 – present |
| `compareOnOneScale` | `true` | Put all keywords on one calibrated scale and rank them (`anchorKeyword` to choose the anchor) |
| `property` | Web search | Web, YouTube, News, Image search or Google Shopping |
| `category` | All | Google Trends category id |
| `outputFormat` | `nested` | `flat` = one spreadsheet-friendly row per keyword, no nested data |
| `includeRelated` / `includeRegions` / `includeForecast` / `includeTimeline` | on | Turn parts of the output off to make rows smaller |
| `trendingGeos`, `analyzeTrendingTop`, `trendingTimeRange` | – | Trending Now: countries, how many top terms to analyse in depth, their time range |
| `aiInsights` | off | Paid add-on: one AI verdict per keyword |

### Output

One row per keyword. A real row, shortened, from a 100-keyword US run in November 2026:

```json
{
  "keyword": "walking pad",
  "geo": "US",
  "timeRange": "today 5-y",
  "state": "completed",
  "trendLabel": "rising",
  "trendScore": 58,
  "currentInterest": 31,
  "averageInterest": 17.5,
  "yoyGrowthPct": 27.8,
  "yoyWindowDays": 365,
  "longTermGrowthPct": 268.2,
  "momentumPct": -9.7,
  "isSeasonal": true,
  "seasonalityStrength": 0.89,
  "peakMonths": ["Jan", "Dec"],
  "isSpike": false,
  "peakDate": "2025-12-28",
  "breakoutQueries": ["urevo walking pad", "deerrun walking pad", "deer run walking pad"],
  "topRegions": [{"geoCode": "US-WY", "name": "Wyoming", "value": 100}],
  "forecast": [{"date": "2026-11-01", "value": 40.5}, {"date": "2026-11-08", "value": 44.9}],
  "calibratedAverage": 3.09,
  "calibratedRank": 64,
  "dataWarnings": ["Excluded Google data anomaly 2026-03-22..2026-07-11 from metrics: ..."],
  "sourceUrl": "https://trends.google.com/trends/explore?q=walking+pad&date=today+5-y&geo=US"
}
```

Read it as: *a seasonal product (peaks Dec–Jan), up 28 % on the last 12 months and 268 % over 5 years, currently in its pre-season dip.*

#### Output fields

| Field | Meaning |
|---|---|
| `state` | `completed` (billed), `no_data` (too little search volume, free), `failed` / `skipped` (free, see `error`) |
| `trendLabel`, `trendScore` | Verdict and 0-100 score (50 = flat) |
| `yoyGrowthPct`, `yoyWindowDays` | Growth vs. one year earlier and the window used (365 with ≥ 2 years of data) |
| `longTermGrowthPct` | Last 12 months vs. the same months at the start of the range |
| `momentumPct`, `momentumWindowDays` | Latest window vs. the previous one (short-term direction) |
| `isSeasonal`, `seasonalityStrength`, `peakMonths` | Seasonality; `peakMonths` is empty for non-seasonal terms |
| `isSpike` | New surge far above the previous 12 months (for seasonal terms: vs. the same season last year) |
| `forecast[]` | Next 12 periods |
| `breakoutQueries`, `relatedQueries` | Rising / Breakout related searches |
| `topRegions` | Sub-regions by interest |
| `calibratedAverage`, `calibratedRank` | Position on the shared scale (top keyword = 100) when `compareOnOneScale` is on. Ranks always run 1..n; a `no_data` keyword that is still measurable next to the others keeps its place. Keywords with zero interest get no rank |
| `dataWarnings` | Data-quality notes (e.g. excluded Google glitches) |
| `timeline[]` | Raw series (nested output only) |
| `sourceUrl`, `valueScale` | Open the same query on Google Trends; what the numbers mean |

Each run also saves a **`SUMMARY`** record in its key-value store: the overall `status` (`COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `UPSTREAM_FAILED`, `INVALID_INPUT`), the reason if the run stopped early, and the state of every keyword. Automations can check one field instead of parsing every row.

### Export & integrations

- **Excel / CSV / JSON / XML**: from the Output tab or the API. Use `outputFormat: "flat"` for clean spreadsheet columns.
- **Google Sheets**: with Apify's Google Sheets integration, every run updates a sheet, so you build your own trend history.
- **Make, n8n, Zapier**: use the Apify app or node: run the Actor, then send the rows to Slack, Notion, Airtable or your CRM.
- **Schedules & webhooks**: run weekly and get notified when the data is ready.

### Use it as a Google Trends API

Google has no public Google Trends API for general use. This Actor works as one: send keywords, get analysed JSON back.

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("northmetric/google-trends-intelligence").call(run_input={
    "keywords": ["air fryer", "standing desk", "matcha"],
    "geo": "US",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["keyword"], row["trendLabel"], row.get("trendScore"), row.get("yoyGrowthPct"))
```

Node.js:

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('northmetric/google-trends-intelligence').call({ keywords: ['air fryer', 'matcha'], geo: 'GB' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(items.map(({ keyword, trendLabel, trendScore }) => ({ keyword, trendLabel, trendScore })));
```

cURL (starts the run and returns the rows in one request; best for small lists):

```bash
curl -X POST "https://api.apify.com/v2/acts/northmetric~google-trends-intelligence/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["air fryer","matcha"],"geo":"US","outputFormat":"flat"}'
```

### Use it with AI agents (MCP)

Claude, Cursor, VS Code and other MCP clients can call this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp):

```
https://mcp.apify.com?tools=northmetric/google-trends-intelligence
```

Example prompts:

- "Which of these 50 product ideas are growing in Germany, and when do they peak?"
- "Is interest in walking pads a trend or a fad in the US?"
- "Rank these blog topics by momentum in Spain."

The `trendLabel`, `trendScore` and `SUMMARY.status` fields are designed to be easy for an agent to read.

### How the metrics are calculated

- **Momentum**: mean of the last 90 days vs. the previous 90 (shorter windows for short ranges).
- **YoY**: with ≥ 2 years of data, the last 12 months vs. the previous 12, compared week by week (weeks excluded as data anomalies drop out on both sides). With shorter ranges: the latest window vs. the same window a year earlier.
- **Seasonality**: ratio to a centred 12-month moving average, median per calendar month (≥ 2 years); strength = max − min of the monthly index; seasonal if ≥ 0.5. In tests, 10 of 10 classic seasonal terms (Halloween, Christmas tree, sunscreen, tax software, …) got the correct peak month.
- **Long-term growth**: last 12 months vs. the same calendar months at the start of the range (paired).
- **Spike**: peak inside the latest window, ≥ 3× the average of the 12 months before it (which must be low). Seasonal terms additionally need ≥ 3× the same window last year.
- **Trend score**: 50 + 0.3 × growth (YoY, else 12-month slope, else momentum; capped ±100) + 0.2 × momentum (capped ±100, ignored for seasonal terms), clamped 0-100. Label: `rising` if growth ≥ 20 %, `declining` if ≤ −20 %.
- **Forecast**: seasonal-naive (same period last year × YoY level ratio) with ≥ 2 years of data, otherwise a linear trend.
- **Calibration**: every batch of 5 shares an anchor keyword; batches are rescaled through the anchor, then normalised so the top keyword = 100. Google rounds each batch to whole numbers, so a keyword under ~1 % of the anchor would read 0. Those low-volume keywords are automatically re-measured against a smaller "bridge" keyword (up to 4 levels), so big and tiny keywords still land on one scale.

Google Trends values are relative (0-100), not absolute search volumes.

### Tips

- **Run time**: about 7 seconds per keyword (Google rate limits). The default timeout (6 h) fits ~2,800 keywords; for bigger lists raise *Timeout* in the run options. If time runs out, the Actor stops cleanly: unfinished keywords come back as `skipped` (free) and the `SUMMARY` says so.
- Use **Past 5 years** to unlock YoY, seasonality and forecasts.
- For calibration, choose a stable, mid-popularity anchor (not a brand-new fad).
- Small countries and long-tail keywords often return `no_data`: Google shows 0 for most weeks. Try a bigger country, Worldwide, or a broader keyword. You are not charged.
- **Trending Now** titles are often long news headlines ("team A - team B") that nobody types into Google; deep analysis of those usually returns `no_data` (free). Short trending terms analyse fine.
- CSV export through the API orders columns alphabetically. Export the **Keyword overview** view, or pass `fields=keyword,trendLabel,...`, to choose the order.

### FAQ

**Is there an official Google Trends API?**
Not for general use. This Actor gives you the same public Trends data as structured JSON, plus the analysis on top.

**Are these search volumes?**
No. Google Trends shows relative interest (0-100), not search counts. Use the trend score, growth and calibrated rank to compare keywords, and a keyword tool if you need absolute volumes.

**How reliable are the results?**
Before release, the Actor ran about 3,000 real keyword analyses (1,450+ different keywords, 14 countries, every time range and search type) plus Trending Now in 20 countries, including runs of 1,000 keywords and several users at once. In every normal run, at least 97 % of keywords were analysed or correctly marked `no_data`. When the same keywords were run again in independent runs, the labels matched 100 % and the median score difference was 0.

**The run started but I see no results yet. Is it stuck?**
No. With *Compare all keywords on one scale* on (the default), the Actor first measures all keywords against each other (about 2 seconds per keyword) and only then starts writing rows. The status line shows the progress ("Step 1/2 … batch 12/50"). Turn the option off if you want rows to appear immediately.

**Why do the numbers differ slightly from the Google Trends website?**
Google Trends answers from a random sample of searches, so two requests can differ by a few points, especially for small keywords. The Actor uses one consistent session per run, so all keywords in a run are compared on the same sample. Repeated runs gave the same labels in 100 % of cases.

**Why is a keyword `no_data`?**
Google has too little search volume for it in that country and period: most weeks read 0. An analysis would be noise, so the row is marked `no_data` and is free.

**Why did a keyword fail?**
Google sometimes rate-limits. The Actor backs off, retries, and tries rate-limited keywords once more after a cool-down at the end of the run. If a keyword still fails, its row gets an `error` and is **not billed**.

**What is the US 2026 data warning?**
Google Trends US data shows a system-wide jump between 22 Mar and 11 Jul 2026, which we measured on 100 unrelated terms. Those weeks are excluded from the metrics of US keywords and noted in `dataWarnings`, so they don't show up as fake growth.

**Is it legal?**
The Actor reads only public, aggregated and anonymous Trends data. It does not log in, solve CAPTCHAs or collect personal data. You are responsible for using the data in line with Google's terms and the law where you are.

**Can I compare countries?**
Yes: put the same keyword in several runs (or tasks) with different `geo` values, or use Worldwide and look at `topRegions`. Each country has its own scale.

### Support & feedback

Found a problem or missing a feature? Open an issue on the **Issues** tab. We usually reply within one working day. If the Actor saves you time, a review helps other users find it.

# Changelog

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

# Actor input Schema

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

Analyze your own keyword list (most common), or pull the live Trending Now list for one or more countries.

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

One keyword per line, any language. No limit: 10 or 10,000. Each keyword gets its own row with a trend score, growth, seasonality and forecast. You can also paste Google Trends URLs here.

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

Where to measure search interest. Worldwide = all countries combined. For a state/province use <b>Sub-region</b> below.

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

Longer ranges give more reliable growth and seasonality numbers.

## `compareOnOneScale` (type: `boolean`):

Google Trends compares only 5 terms at a time. With this on, every keyword gets <code>calibratedAverage</code> (biggest keyword = 100) and <code>calibratedRank</code>, so you can rank any number of keywords by popularity. Adds ~1 request per 4 keywords.

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

Optional. Paste trends.google.com/trends/explore URLs; their keywords, geo, time range, category and search type are used as-is (comma-separated q= terms become separate rows).

## `subRegion` (type: `string`):

ISO 3166-2 code such as <code>US-CA</code> (California) or <code>ES-MD</code> (Madrid). Overrides <b>Country</b>.

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

Which Google search index to measure: web, YouTube, News, Images or Google Shopping.

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

Google Trends category to disambiguate terms (0 = all). Examples: 71 Food & Drink, 18 Shopping, 44 Beauty & Fitness, 958 Jobs, 5 Computers & Electronics. Tip: copy it from the <code>cat=</code> part of a Trends URL.

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

Flat = every column is a plain value (lists are joined with ;), no raw timeline.

## `includeRelated` (type: `boolean`):

Add top & rising related queries and a list of Breakout queries (great for finding new niches).

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

Add the top sub-regions (states/provinces) by interest.

## `includeForecast` (type: `boolean`):

Add a 12-period forecast (seasonal-naive with 2+ years of data, otherwise linear trend).

## `includeTimeline` (type: `boolean`):

Add the full interest-over-time series to each row.

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

Google often returns no topics for automated requests; enable only if you need them (adds one request per keyword).

## `anchorKeyword` (type: `string`):

Keyword that links the 5-term batches. Defaults to your first keyword. Pick a stable, mid-popularity term (not a brand-new fad).

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

Country codes (US, ES, GB, DE, ...).

## `analyzeTrendingTop` (type: `integer`):

0 = list only. Each analyzed term is billed as one keyword analysis.

## `trendingTimeRange` (type: `string`):

Trending terms are usually brand new, so a short range shows the surge best.

## `aiInsights` (type: `boolean`):

Adds a short plain-English verdict (opportunity, risk, timing). Billed separately.

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

Keywords processed in parallel. Requests to Google are deliberately paced to avoid blocks, so values above 2 barely speed up a run (measured: ~7 s per keyword at 2 or 5). Most users should leave the default.

## `stopAfterRateLimits` (type: `integer`):

Protects your budget and Google: after N keywords in a row fail with HTTP 429 the run stops and the rest are marked skipped (not billed). 0 = never stop.

## `retryRateLimitedAfterSecs` (type: `integer`):

Keywords that hit Google rate limits are retried once at the end of the run after this cool-down. 0 = no retry.

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

Apify Proxy spreads requests politely. One sticky session is kept per run so all numbers come from the same Google sample.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "air fryer",
    "walking pad",
    "matcha"
  ],
  "geo": "US",
  "timeRange": "today 5-y",
  "compareOnOneScale": true,
  "trendsUrls": [
    "https://trends.google.com/trends/explore?date=today%205-y&geo=ES&q=padel,pickleball"
  ],
  "subRegion": "US-CA",
  "property": "",
  "category": 71,
  "outputFormat": "nested",
  "includeRelated": true,
  "includeRegions": true,
  "includeForecast": true,
  "includeTimeline": true,
  "includeRelatedTopics": false,
  "trendingGeos": [
    "US",
    "ES",
    "GB"
  ],
  "analyzeTrendingTop": 0,
  "trendingTimeRange": "today 1-m",
  "aiInsights": false,
  "maxConcurrency": 2,
  "stopAfterRateLimits": 3,
  "retryRateLimitedAfterSecs": 90,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `keywords` (type: `string`):

Analysed keywords with the key metrics. The full rows (timeline, related queries, regions, forecast) are in the same dataset.

## `trending` (type: `string`):

Trending searches per country (Trending Now mode only).

## `summary` (type: `string`):

SUMMARY record: status COMPLETE / PARTIAL / VALID_EMPTY / UPSTREAM_FAILED / INVALID_INPUT, counts, warnings and the state of every keyword.

# 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": [
        "air fryer",
        "walking pad",
        "matcha"
    ],
    "geo": "US",
    "trendingGeos": [
        "US",
        "ES",
        "GB"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("northmetric/google-trends-intelligence").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": [
        "air fryer",
        "walking pad",
        "matcha",
    ],
    "geo": "US",
    "trendingGeos": [
        "US",
        "ES",
        "GB",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("northmetric/google-trends-intelligence").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": [
    "air fryer",
    "walking pad",
    "matcha"
  ],
  "geo": "US",
  "trendingGeos": [
    "US",
    "ES",
    "GB"
  ]
}' |
apify call northmetric/google-trends-intelligence --silent --output-dataset

```

## MCP server setup

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

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/3XnhJ70VHAkJ2pWke/builds/CBmEfQR09ExJlEHlq/openapi.json
