# Google Trends Scraper — Compare, Interest & Trending Now (`automation_craft/google-trends-scraper`) Actor

Fast, browser-free Google Trends data: interest over time with real multi-keyword comparison (shared 0-100 scale), interest by region, related queries & topics, plus real-time Trending Now with volume, growth and news. Pay only for results.

- **URL**: https://apify.com/automation\_craft/google-trends-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** SEO tools, News
- **Stats:** 4 total users, 3 monthly users, 91.7% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Trends Scraper — Compare Keywords, Interest & Trending Now

Get Google Trends data as clean JSON — no browser, no API key, no login. Three things in one Actor:

1. **Keyword reports** — how interest in a search term changed over time (0–100), which regions search for it most, and which related queries are rising.
2. **Keyword comparison** — 2–5 terms in ONE query on a **shared 0–100 scale**, exactly like the compare view on trends.google.com. This is the feature most Trends scrapers get wrong: if you scrape terms separately, Google normalizes each one to its own scale and the numbers are NOT comparable.
3. **Trending Now** — the searches trending right now in any country, with search volume, growth %, start time, related keywords, and news articles.

### Why use this one?

- **Fast.** Trending Now returns in seconds; a full keyword report typically takes under a minute. No headless browser anywhere.
- **Comparison that actually works.** `compareKeywords` is a plain input field — no fragile flags — so it behaves the same from the Console, the API, and AI agents (MCP).
- **You only pay for data.** A failed keyword, an empty result, an error — all free. If the run charges you, it delivered data.
- **Built for Google's rate limits.** Google throttles Trends hard, per IP. This Actor rotates a fresh residential IP on every data request and retries automatically, which is why runs succeed where scripts and cheaper actors return nothing.

### What this Actor does NOT do

Honesty up front:

- **No absolute search volumes for keywords.** Google Trends only publishes relative interest (0–100). Only Trending Now items carry approximate real volumes (e.g. `200000`) — because Google publishes those.
- **No related topics.** Google returns empty topic lists to any automated session, so this Actor doesn't pretend to offer them. Related *queries* work fully.
- **Comparison is capped at 5 terms** — that's Google's own limit for a shared scale. Individual keywords are capped at 20 per run to keep runs reliable.

### Input examples

**What's trending in the US right now:**

```json
{
    "scrapeTrendingNow": true,
    "trendingGeos": ["US"]
}
```

**Full report for each keyword:**

```json
{
    "keywords": ["standing desk", "ergonomic chair"],
    "timeframe": "today 12-m",
    "geo": "US"
}
```

**Compare terms on one scale:**

```json
{
    "compareKeywords": ["notion", "obsidian", "evernote"],
    "timeframe": "today 3-m",
    "geo": ""
}
```

All three can be combined in one run. `geo` empty = worldwide. Timeframes: `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or a custom range like `2024-01-01 2024-12-31`.

### Output examples

**Trending item** (one per trend):

```json
{
    "type": "trending_now",
    "trending_geo": "US",
    "keyword": "taylor farms",
    "search_volume": 200000,
    "volume_growth_pct": 1000,
    "started_at": "2026-07-16T21:20:00.000Z",
    "is_active": true,
    "trend_keywords": ["taylor farms", "taylor farms lettuce"],
    "topics": ["Food and Drink", "Health"],
    "news": [
        {
            "title": "Cyclospora Linked to Taylor Farms Lettuce Sent to Taco Bell",
            "url": "https://www.nytimes.com/...",
            "source": "The New York Times",
            "picture": "https://encrypted-tbn1.gstatic.com/..."
        }
    ]
}
```

**Keyword report** (one per keyword):

```json
{
    "type": "keyword",
    "keyword": "coffee",
    "geo": "US",
    "timeframe": "today 12-m",
    "stats": { "average": 75.4, "peak": 100, "peak_date": "2026-04-12", "latest": 76, "direction": "rising" },
    "interest_over_time": [{ "date": "2025-07-13", "value": 67 }],
    "interest_by_region": [{ "geo_code": "US-HI", "region": "Hawaii", "value": 100 }],
    "related_queries": { "top": [{ "query": "coffee shop", "value": 100 }], "rising": [] }
}
```

**Comparison** (one item for the whole set — values share one scale):

```json
{
    "type": "comparison",
    "keywords": ["netflix", "disney plus", "hbo max"],
    "scale": "shared",
    "stats": { "netflix": { "average": 59.1 }, "disney plus": { "average": 7.6 }, "hbo max": { "average": 5.3 } },
    "interest_over_time": [{ "date": "2026-04-17", "values": { "netflix": 61, "disney plus": 8, "hbo max": 5 } }],
    "interest_by_region": [{ "region": "California", "values": { "netflix": 58, "disney plus": 9, "hbo max": 6 } }],
    "related_queries": { "netflix": { "top": [], "rising": [] } }
}
```

Every run also pushes one `summary` item (what succeeded, what failed and why, what was charged), and failures push free `error` items with plain-language messages.

### How much does it cost?

| Event | Price | You pay when |
| --- | --- | --- |
| Actor start | $0.02 | each run starts |
| Trending Now | $0.02 per country | the country's trend list came back (up to ~480 trends + news — one flat price, however many items) |
| Keyword report | $0.03 per keyword | the report contains data |
| Comparison | $0.05 per comparison | the comparison contains data |

Examples: daily "what's trending in the US" schedule ≈ **$1.20/month**. A 10-keyword research run = **$0.32**. Comparing 5 brands = **$0.07**.

Failed or empty results are never charged — that's the whole point.

### FAQ

**Where does the data come from?** Google Trends' own public endpoints — the same ones the trends.google.com pages call. Nothing is estimated or modeled.

**Can I use it from an AI agent / MCP?** Yes — the input is flat and explicit, and every output item has a `type` field to route on. Ask your agent things like "compare interest in X vs Y over the last 3 months" or "what's trending in Germany right now".

**Which countries work for Trending Now?** Any country Google Trends supports (50+): `US`, `GB`, `IN`, `DE`, `JP`, `BR`… one geo code per entry in `trendingGeos`.

**Why do keyword runs need the residential proxy?** Google rate-limits Trends per IP aggressively. The default configuration (Apify residential) is what makes keyword reports reliable; datacenter proxies will get 429s. Trending Now doesn't need a proxy at all.

**Is this legal?** The Actor only reads publicly available data that Google publishes to everyone. It doesn't log in, bypass paywalls, or collect personal data.

# Actor input Schema

## `scrapeTrendingNow` (type: `boolean`):

Get the searches trending right now in each country listed under <b>Trending geos</b> — with search volume, growth %, start time, related keywords, and news articles. Fast (seconds) and needs no proxy. One flat $0.02 charge per country, however many trends come back.

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

Country codes to get trending searches for: <code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>, <code>JP</code>… One charge per country.

## `trendingHours` (type: `integer`):

How far back to look for trending searches, in hours. 4 = happening right now, 24 = today (default), 168 = past week. Google accepts 1–191.

## `includeTrendingNews` (type: `boolean`):

Attach related news articles (title, URL, source, image) to each trending item. Free — no extra charge.

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

Maximum trending items returned per country. Google provides up to ~480; the price per country is the same either way.

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

Search terms to analyze — each gets its own report: interest over time with summary stats, interest by region, and related queries. Each term is scored on its own 0–100 scale (use <b>Compare keywords</b> below if you need terms on ONE scale). Max 20 per run. $0.03 per report that contains data; failures and empty results are free.

## `compareKeywords` (type: `array`):

2–5 terms compared in a single Google Trends query, so their values share one 0–100 scale — directly comparable, like the compare view on trends.google.com. Produces one comparison item with per-term stats, regional breakdown, and related queries. $0.05 when it contains data.

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

Time range for keyword analysis: <code>now 1-H</code>, <code>now 4-H</code>, <code>now 1-d</code>, <code>now 7-d</code>, <code>today 1-m</code>, <code>today 3-m</code>, <code>today 12-m</code> (default), <code>today 5-y</code>, <code>all</code>, or a custom range like <code>2024-01-01 2024-12-31</code>.

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

Where to measure keyword interest: a country (<code>US</code>), a region (<code>US-CA</code>), or empty for worldwide.

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

Google Trends category id to narrow keyword results (0 = all categories). Find ids in the trends.google.com URL after <code>cat=</code>.

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

Which Google surface to measure: Web Search (default), Image Search, Google News, YouTube, or Google Shopping.

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

Include the interest-over-time series plus computed stats (average, peak, peak date, latest, direction).

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

Include the breakdown of which regions search the term most.

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

Include top and rising related queries. (Related topics are not offered — Google returns empty topic lists to automated sessions.)

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

Language for trending results: <code>en</code>, <code>de</code>, <code>ja</code>…

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

Proxy used for keyword analysis. Keep the default (Apify residential): Google rate-limits Trends per IP, and residential rotation is what makes keyword reports reliable. Datacenter proxies will fail with 429 errors. Trending Now never uses a proxy.

## Actor input object example

```json
{
  "scrapeTrendingNow": true,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": 24,
  "includeTrendingNews": true,
  "maxTrendingItems": 100,
  "keywords": [],
  "compareKeywords": [],
  "timeframe": "today 12-m",
  "geo": "US",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

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

No description

## `keywordReports` (type: `string`):

No description

## `resultsCsv` (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 = {
    "scrapeTrendingNow": true,
    "trendingGeos": [
        "US"
    ],
    "keywords": [],
    "compareKeywords": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/google-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "scrapeTrendingNow": true,
  "trendingGeos": [
    "US"
  ],
  "keywords": [],
  "compareKeywords": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call automation_craft/google-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation_craft/google-trends-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/y2reoTpoAQkVmFGVj/builds/n8ifHObbgLnzE7FEm/openapi.json
