# Google Trends API, Breakout Keywords and Comparison Scraper (`xenikii/google-trends-scraper`) Actor

Google Trends scraper for breakout rising queries, multi-keyword share-of-search comparisons, regional demand, and real-time trends with news.

- **URL**: https://apify.com/xenikii/google-trends-scraper.md
- **Developed by:** [Xenikii](https://apify.com/xenikii) (community)
- **Categories:** SEO tools, News, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 keyword trend reports

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 API, Breakout Keywords and Comparison Scraper

Extract structured **Google Trends** intelligence — including **`Breakout` (`+5,000%+`) rising queries**, **head-to-head multi-keyword Share-of-Search comparisons**, **interest-over-time series**, **sub-region demand**, **Knowledge Graph semantic topics**, and **real-time Trending Now surges with publisher news links** — via fast, zero-browser HTTP requests (`$0` proxy overhead required).

### Key Capabilities

- **Breakout Rising Queries & Momentum Scoring (`mode: "explore"`):** Automatically flags `isBreakout: true` (`>5,000%` surge), calculates `momentumPercent` and `trendDirection` (`breakout`, `rising`, `stable`, `declining`), and extracts both `rising` and `top` related queries plus Knowledge Graph `semanticTopics`.
- **Multi-Keyword Share-of-Search Comparison (`compareKeywords: true`):** Compare 2–5 competitor brands or product categories on Google's shared `0–100` scale with computed `shareOfSearchPercent`, per-keyword averages, peaks, and `winnerKeyword`.
- **5 Google Search Properties & Custom Date Windows:** Query **Web Search** (`""`), **YouTube Search** (`"youtube"`), **Google Shopping** (`"froogle"`), **Google News** (`"news"`), or **Google Images** (`"images"`) across presets (`now 1-H` through `today 5-y`, `all`) or exact `"YYYY-MM-DD YYYY-MM-DD"` dates.
- **Real-Time Trending Now + Direct News Articles (`mode: "trending_now"`):** Pull live surging search clusters across 40+ countries (`4h`, `24h`, `48h`, `7d`) enriched with estimated `searchVolume`, `growthPercent`, cluster queries, and direct publisher article URLs (`The Guardian`, `ESPN`, `Reuters`, etc.).

### Who Is This For?

- **SEO, Content & Niche Site Teams:** Catch `Breakout` long-tail keywords (`isBreakout: true`) across Web and YouTube Search days or weeks before monthly keyword volume tools update.
- **Brand, PR & Competitive Intelligence:** Track Share-of-Search (`compareKeywords: true`) across up to 5 competing SaaS or consumer brands in automated **n8n**, **Make**, or **Clay** workflows.
- **Ecommerce & Merchandising Analysts:** Validate seasonal product velocity on **Google Shopping (`property: "froogle"`)** and regional buyer demand before committing ad spend or inventory.
- **Newsrooms & Social Media Automation:** Poll `mode: "trending_now"` on a schedule to route real-time surging topics and verified source articles straight to Slack, Notion, or AI editorial agents.

### Input

```json
{
  "mode": "explore",
  "keywords": ["claude code", "cursor ai"],
  "compareKeywords": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "property": "",
  "includeRegionBreakdown": true,
  "includeRelatedQueries": true,
  "includeSemanticTopics": true
}
```

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `mode` | `string` | `"explore"` | `"explore"` (keyword/comparison intelligence), `"trending_now"` (live surging trends + news), or `"both"`. |
| `keywords` | `string[]` | `["claude code", "cursor ai"]` | Keywords or Knowledge Graph entity IDs (`/m/...`, `/g/...`) analyzed in `explore` mode. |
| `compareKeywords` | `boolean` | `false` | Compare up to 5 keywords on a shared `0–100` scale and compute `shareOfSearchPercent` and `winnerKeyword`. |
| `geo` | `string` | `"US"` | Country/sub-region ISO code (`"US"`, `"GB"`, `"DE"`, `"US-CA"`) or `""` for Worldwide. |
| `timeframe` | `string` | `"today 12-m"` | `"now 1-H"`, `"now 4-H"`, `"now 1-d"`, `"now 7-d"`, `"today 1-m"`, `"today 3-m"`, `"today 12-m"`, `"today 5-y"`, or `"all"`. |
| `customTimeRange` | `string` | `""` | Optional exact range (`"YYYY-MM-DD YYYY-MM-DD"`) overriding `timeframe`. |
| `property` | `string` | `""` | `""` (Web), `"youtube"` (YouTube), `"froogle"` (Google Shopping), `"news"` (News), or `"images"` (Images). |
| `category` | `integer` | `0` | Google Trends category ID (`0` = All categories, `5` = Computers & Electronics, `12` = Business, etc.). |
| `includeRegionBreakdown` | `boolean` | `true` | Include geographic interest breakdown (`interestByRegion`). |
| `includeRelatedQueries` | `boolean` | `true` | Include `rising` (`Breakout`) and `top` related search queries. |
| `includeSemanticTopics` | `boolean` | `true` | Resolve Google Knowledge Graph entities (`mid`, `title`, `type`) via autocomplete. |
| `trendingCountries` | `string[]` | `["US"]` | 2-letter ISO countries scraped in `trending_now` / `both` modes (`["US", "GB", "DE"]`). |
| `trendingHours` | `string` | `"24"` | Trending window in hours: `"4"`, `"24"`, `"48"`, or `"168"` (`7` days). |
| `onlyActiveTrends` | `boolean` | `false` | Return only currently accelerating (`isActive: true`) trends in `trending_now` mode. |
| `maxTrendingItems` | `integer` | `25` | Max trending clusters returned per country (`1–200`). |

### Output

Items are written to the default **Dataset** (`JSON`, `CSV`, `Excel`, `Parquet`), and run statistics + billing counters are saved to `SUMMARY` in the default **Key-Value Store**.

#### 1. Keyword Explore Output (`mode: "explore"`)

Untouched live output for `"claude code"` (`customTimeRange: "2026-10-29 2026-11-04"`, `includeRegionBreakdown: false`):

```json
{
  "recordType": "keyword_explore",
  "keyword": "claude code",
  "geo": "US",
  "timeframe": "2026-10-29 2026-11-04",
  "property": "web",
  "category": 0,
  "language": "en-US",
  "trendDirection": "stable",
  "currentInterest": 90,
  "peakInterest": 100,
  "peakDate": "2026-10-30",
  "averageInterest": 85.83,
  "minInterest": 68,
  "momentumPercent": 5.9,
  "breakoutQueriesCount": 1,
  "interestOverTime": [
    {
      "timestamp": 1793232000,
      "date": "2026-10-29",
      "formattedTime": "Oct 29, 2026",
      "value": 91,
      "isPartial": false
    },
    {
      "timestamp": 1793318400,
      "date": "2026-10-30",
      "formattedTime": "Oct 30, 2026",
      "value": 100,
      "isPartial": false
    },
    {
      "timestamp": 1793404800,
      "date": "2026-10-31",
      "formattedTime": "Oct 31, 2026",
      "value": 71,
      "isPartial": false
    },
    {
      "timestamp": 1793491200,
      "date": "2026-11-01",
      "formattedTime": "Nov 1, 2026",
      "value": 68,
      "isPartial": false
    },
    {
      "timestamp": 1793577600,
      "date": "2026-11-02",
      "formattedTime": "Nov 2, 2026",
      "value": 95,
      "isPartial": false
    },
    {
      "timestamp": 1793664000,
      "date": "2026-11-03",
      "formattedTime": "Nov 3, 2026",
      "value": 90,
      "isPartial": false
    },
    {
      "timestamp": 1793750400,
      "date": "2026-11-04",
      "formattedTime": "Nov 4, 2026",
      "value": 74,
      "isPartial": true
    }
  ],
  "interestByRegion": [],
  "relatedQueries": {
    "rising": [
      {
        "query": "anthropic claude code message threads",
        "growthPercent": 8750,
        "formattedValue": "Breakout",
        "isBreakout": true,
        "exploreUrl": "https://trends.google.com/trends/explore?q=anthropic+claude+code+message+threads&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "anthropic claude code limits",
        "growthPercent": 2450,
        "formattedValue": "+2,450%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=anthropic+claude+code+limits&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "goldman sachs claude code",
        "growthPercent": 1500,
        "formattedValue": "+1,500%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=goldman+sachs+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "cursor claude code extension",
        "growthPercent": 800,
        "formattedValue": "+800%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=cursor+claude+code+extension&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code extension",
        "growthPercent": 110,
        "formattedValue": "+110%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+extension&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code game studios",
        "growthPercent": 90,
        "formattedValue": "+90%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+game+studios&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "t3 code",
        "growthPercent": 50,
        "formattedValue": "+50%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=t3+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "what is ultracode in claude code",
        "growthPercent": 40,
        "formattedValue": "+40%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=what+is+ultracode+in+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code 安装",
        "growthPercent": 40,
        "formattedValue": "+40%",
        "isBreakout": false,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+%E5%AE%89%E8%A3%85&date=2026-10-29+2026-11-04&geo=US"
      }
    ],
    "top": [
      {
        "query": "claude vs claude code",
        "score": 100,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+vs+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "vs code",
        "score": 92,
        "exploreUrl": "https://trends.google.com/trends/explore?q=vs+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude ai",
        "score": 80,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+ai&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code ai",
        "score": 75,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+ai&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "what is claude code",
        "score": 64,
        "exploreUrl": "https://trends.google.com/trends/explore?q=what+is+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "codex",
        "score": 43,
        "exploreUrl": "https://trends.google.com/trends/explore?q=codex&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "install claude",
        "score": 39,
        "exploreUrl": "https://trends.google.com/trends/explore?q=install+claude&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "install claude code",
        "score": 38,
        "exploreUrl": "https://trends.google.com/trends/explore?q=install+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "github",
        "score": 36,
        "exploreUrl": "https://trends.google.com/trends/explore?q=github&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code github",
        "score": 36,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+github&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code cli",
        "score": 34,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+cli&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude cli",
        "score": 33,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+cli&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "free claude code",
        "score": 32,
        "exploreUrl": "https://trends.google.com/trends/explore?q=free+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code app",
        "score": 31,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+app&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "how to use claude code",
        "score": 30,
        "exploreUrl": "https://trends.google.com/trends/explore?q=how+to+use+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code desktop",
        "score": 30,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+desktop&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude desktop",
        "score": 30,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+desktop&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "anthropic",
        "score": 30,
        "exploreUrl": "https://trends.google.com/trends/explore?q=anthropic&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "anthropic claude code",
        "score": 30,
        "exploreUrl": "https://trends.google.com/trends/explore?q=anthropic+claude+code&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code terminal",
        "score": 25,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+terminal&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude api",
        "score": 24,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+api&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code api",
        "score": 24,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+api&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude code download",
        "score": 23,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code+download&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude download",
        "score": 23,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+download&date=2026-10-29+2026-11-04&geo=US"
      },
      {
        "query": "claude pro",
        "score": 22,
        "exploreUrl": "https://trends.google.com/trends/explore?q=claude+pro&date=2026-10-29+2026-11-04&geo=US"
      }
    ]
  },
  "semanticTopics": [
    {
      "mid": "/g/11n4qkv0lj",
      "title": "Claude Code",
      "type": "Topic"
    },
    {
      "mid": "/g/11yxpll11h",
      "title": "Claude Code for Non-Developers",
      "type": "Topic"
    },
    {
      "mid": "/g/11y3__0gml",
      "title": "AI-Assisted Programming",
      "type": "Book by Tom Taulli"
    },
    {
      "mid": "/g/11nhzzscdq",
      "title": "Claude Code & Codex Mobile IDE - Version 1.5.2 - iOS",
      "type": "Topic"
    },
    {
      "mid": "/g/11z9rnp59v",
      "title": "Mobile IDE for Claude Code - Version 1.0.3 - iOS",
      "type": "Topic"
    }
  ],
  "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code&date=2026-10-29+2026-11-04&geo=US",
  "scrapedAt": "2026-11-04T09:24:30.004Z"
}
```

#### 2. Real-Time Trending Now Output (`mode: "trending_now"`)

Untouched live output for `"US"` (`trendingHours: "24"`):

```json
{
  "recordType": "trending_now",
  "keyword": "barcelona vs aston villa",
  "geo": "US",
  "trendingHours": 24,
  "searchVolume": 200000,
  "growthPercent": 1000,
  "isActive": true,
  "startedAt": "2026-11-03T07:20:00.000Z",
  "endedAt": null,
  "categoryIds": [
    17
  ],
  "relatedQueries": [
    "barcelona vs aston villa",
    "barcelona - aston villa",
    "man utd vs roma",
    "manchester united - roma",
    "manchester united",
    "man utd",
    "barcelona vs. aston villa",
    "aston villa",
    "man u vs roma",
    "ucl games",
    "man united vs roma",
    "barcelona aston villa",
    "barca vs aston villa",
    "aston villa vs barcelona",
    "aston villa f.c.",
    "fc barcelona vs aston villa"
  ],
  "pictureUrl": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSxkcmOJ7hZNHPnq12K5oOAbqpa0onkAA7JAxP2QQmRIjlITsFx2g7oNrKo9-M",
  "pictureSource": "The Guardian",
  "newsArticles": [
    {
      "title": "Manchester United v Roma: Champions League – live",
      "url": "https://www.theguardian.com/football/live/2026/nov/03/manchester-united-v-roma-champions-league-live",
      "source": "The Guardian",
      "publishedAt": "2026-11-03T20:00:00.000Z",
      "thumbnailUrl": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSxkcmOJ7hZNHPnq12K5oOAbqpa0onkAA7JAxP2QQmRIjlITsFx2g7oNrKo9-M",
      "snippet": null
    },
    {
      "title": "Barcelona vs. Aston Villa LIVE: Champions League updates as Emery's side visit Camp Nou",
      "url": "https://www.espn.com/soccer/story/_/id/50370533/barcelona-aston-villa-live-champions-league-latest-updates-commentary-score-result",
      "source": "ESPN",
      "publishedAt": "2026-11-03T18:41:00.000Z",
      "thumbnailUrl": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTMIfda313W9irTt4NiqjhHHAsLLZmvkMpI_vQsOU-_FfuZtMkHa7mi2jlM910",
      "snippet": null
    },
    {
      "title": "How Barcelona vs. Aston Villa Perfectly Blends Two Kinds Of Soccer History",
      "url": "https://www.foxsports.com/stories/soccer/aston-villa-barcelona-champions-league-unai-emery",
      "source": "FOX Sports",
      "publishedAt": "2026-11-03T00:25:56.000Z",
      "thumbnailUrl": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcT4UB6sYtbUx7bikFPrt0_7B_WtIfAsMuOLrp4DlZnuQmRTkERTDVrIU6ydh6I",
      "snippet": null
    }
  ],
  "exploreUrl": "https://trends.google.com/trends/explore?q=barcelona+vs+aston+villa&date=now+1-d&geo=US",
  "scrapedAt": "2026-11-03T21:14:08.335Z"
}
```

### Pricing (Pay Per Event)

Failed or rate-limited items cost **`$0`**, and the Actor runs on lightweight `512 MB` HTTP workers without browser overhead.

| Event | Title | Price | Charged When |
| :--- | :--- | :--- | :--- |
| `actor-start` | Actor start | `$0.0010` | Once per run |
| `keyword-analyzed` | Keyword trend report | `$0.0025` (`$2.50 / 1,000`) | Per keyword trend report or multi-keyword comparison group completed in `explore` mode |
| `trending-item-scraped` | Trending topic | `$0.0008` (`$0.80 / 1,000`) | Per surging trend cluster with news extracted in `trending_now` mode |

- **1,000 keyword trend reports (`mode: "explore"`):** `$2.50` total (`~2,000` keyword reports/month covered by Apify's `$5` Free plan credit).
- **1,000 live trending topics with publisher news (`mode: "trending_now"`):** `$0.80` total.
- Respects Apify's **Maximum total charge** cap and stops cleanly when reached.

### API, Clay, n8n & MCP Integration

```bash
curl -X POST "https://api.apify.com/v2/acts/xenikii~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "explore", "keywords": ["claude code", "cursor ai"], "compareKeywords": true, "geo": "US"}'
```

- **n8n / Make Trend Alerts:** Schedule `mode: "trending_now"` hourly or daily (`onlyActiveTrends: true`) or monitor brand `shareOfSearchPercent` (`compareKeywords: true`) and send breakout alerts to Slack.
- **Clay Brand Momentum Signal:** Pass `["{{Company Name}}"]` in `explore` mode to enrich outbound accounts with 12-month search `momentumPercent` and `trendDirection`.
- **MCP (`mcp.apify.com`):** Works directly inside Claude Desktop, Cursor, and AI research agents as `xenikii/google-trends-scraper`.

### FAQ & Data Compliance

- **What do `0–100` values mean in `interestOverTime`?** Google Trends normalizes search interest relative to the peak popularity (`100`) within the selected geography and timeframe. To compare absolute demand between 2–5 keywords, enable `compareKeywords: true` so all terms are normalized on the same scale.
- **How does rate-limit handling work without browsers?** The client warms an organic Google Trends cookie jar, paces widget token requests with jitter, and automatically retries transient `429` responses with fresh session cookies (or optional `proxyConfiguration` when running very large batches).
- **Data & Privacy Compliance:** Aggregates **anonymized, public search-volume indices and public news headlines** from Google Trends. Zero personal user data (PII) or individual search histories are accessed or stored.

### Other B2B Intelligence Actors

Combine these Actors in **Clay**, **n8n**, **Make**, or **MCP** to build a complete B2B signal and SEO stack:

| Actor | Best For | Pricing |
| :--- | :--- | :--- |
| **[Company Domain, Tech Stack & MX/DNS Enricher](https://apify.com/xenikii/company-domain-tech-stack-enricher)** | Resolve company names to domains, 12-category tech stacks, MX/SPF/DMARC & role contacts | `$2.50 / 1k` enriched domains |
| **[B2B Hiring Signals & Multi-ATS Job Scraper](https://apify.com/xenikii/company-career-ats-job-scraper)** | Extract hiring velocity, salary transparency & open roles across 7 ATS platforms | `$1.50 / 1k` job postings |
| **[Google Ads Transparency & Ad Library Scraper](https://apify.com/xenikii/google-ads-transparency-scraper)** | Spy on active Google Search, Display & YouTube creatives, days active & EU reach | `$1.80 / 1k` ad creatives |
| **[Broken Link, Sitemap & AI SEO (`llms.txt`) Auditor](https://apify.com/xenikii/broken-link-sitemap-llms-txt-auditor)** | Audit broken links, XML sitemaps, `GPTBot`/`ClaudeBot` rules & generate `llms.txt` | `$3.00 / 1k` audited websites |
| **[Google Trends Breakout & Comparison Scraper](https://apify.com/xenikii/google-trends-scraper)** *(This Actor)* | Track `+5,000%` breakout queries, multi-keyword share of search & live news trends | `$2.50 / 1k` keyword trend reports |

# Actor input Schema

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

Choose keyword trend analysis (explore), real-time trending searches (trending_now), or both in one run.

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

Keywords, phrases, or Google Knowledge Graph topic MIDs (e.g. /m/02wbm) to analyze in Explore mode.

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

When enabled, compares up to 5 keywords on the same normalized 0-100 scale and calculates relative Share of Search.

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

Two-letter country code (e.g. US, GB, DE, FR, IN, BR, JP) or subregion code (e.g. US-CA). Leave empty for Worldwide.

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

Preset Google Trends window or select Custom to provide an exact YYYY-MM-DD YYYY-MM-DD range.

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

Optional exact range in 'YYYY-MM-DD YYYY-MM-DD' format (e.g. '2025-01-01 2026-11-01'). Overrides timeframe if provided.

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

Target Google search vertical for Explore mode.

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

Google Trends numeric category filter (0 = All categories, 5 = Computers & Electronics, 12 = Business & Industrial, 18 = Shopping, etc.).

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

BCP-47 locale tag for labels and related queries (e.g. en-US, en-GB, de, es, fr, pt-BR, ja).

## `includeRegionBreakdown` (type: `boolean`):

Fetch geographic breakdown (countries for Worldwide, states/regions for country-level queries).

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

Fetch top related queries and fast-rising / Breakout (>5000% growth) search terms.

## `includeSemanticTopics` (type: `boolean`):

Resolve matching Google Knowledge Graph topic entities (MID, title, entity type) for each keyword.

## `trendingCountries` (type: `array`):

ISO two-letter country codes to fetch real-time surging trends for when mode is 'trending_now' or 'both' (e.g. US, GB, DE).

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

Lookback window for Real-Time Trending Now: 4h, 24h, 48h, or 168h (7 days).

## `trendingCategory` (type: `integer`):

Category filter for Real-Time Trending Now (0 = All, 18 = Technology, 3 = Business & Finance, 15 = Shopping, 7 = Health, 17 = Sports, 4 = Entertainment, 14 = Science).

## `onlyActiveTrends` (type: `boolean`):

Return only currently active surging trends and exclude cooled-down trends.

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

Maximum number of real-time trending searches to emit per country.

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

Parallel keyword requests (keep between 1 and 5 to avoid rate limiting).

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

Runs without proxies by default for minimal cost. Optional Apify Proxy fallback if running large keyword batches.

## Actor input object example

```json
{
  "mode": "explore",
  "keywords": [
    "claude code",
    "cursor ai"
  ],
  "compareKeywords": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "property": "",
  "category": 0,
  "language": "en-US",
  "includeRegionBreakdown": true,
  "includeRelatedQueries": true,
  "includeSemanticTopics": true,
  "trendingCountries": [
    "US"
  ],
  "trendingHours": "24",
  "trendingCategory": 0,
  "onlyActiveTrends": false,
  "maxTrendingItems": 50,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "mode": "explore",
    "keywords": [
        "claude code",
        "cursor ai"
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("xenikii/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 = {
    "mode": "explore",
    "keywords": [
        "claude code",
        "cursor ai",
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("xenikii/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 '{
  "mode": "explore",
  "keywords": [
    "claude code",
    "cursor ai"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call xenikii/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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