# Google Trends Scraper - Interest, Regions, Related, Trending (`artificially/google-trends-scraper`) Actor

Scrape Google Trends via its JSON API, no browser. Input: search terms (or up to 5 compared), geo, time range, category, property; or countries for Trending Now. Output: one item per term or comparison with interest over time, by region, related queries and topics; or one per trending search.

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

## Pricing

from $1.26 / 1,000 results

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 – Interest Over Time, Regions, Related Queries & Trending Now

Get **Google Trends data as clean JSON** without a browser: interest over time, interest by region, related queries and related topics for any keyword (or up to 5 keywords compared on one chart), plus the **Trending Now** list of daily trending searches for any country. Every run is quick because the actor talks to the same JSON endpoints the Google Trends website uses, not a headless browser that loads the full page.

**Built by [Artificially](https://apify.com/artificially)** | Follow us on [X @artificially\_io](https://x.com/artificially_io)

#### Use with AI agents (MCP)

This actor works as a tool for Claude, ChatGPT, Cursor and other AI agents through [Apify's MCP server](https://mcp.apify.com). Ask something like "is interest in electric bikes growing in Germany, and what are people searching for with it?" and the agent calls it for you. Set `compactOutput: true` so each result is a small summary (averages, a date+value timeline, top regions, top and rising queries) that fits easily in the agent's context.

**Quick setup** (sign in with your Apify account when asked):

- **Claude** (claude.ai or Claude Desktop): Settings → Connectors → Add custom connector, and paste `https://mcp.apify.com?tools=artificially/google-trends-scraper`
- **Claude Code or Cursor** via the Apify CLI (latest version, `apify upgrade`): `apify mcp install claude-code --tools artificially/google-trends-scraper` (use `cursor` instead of `claude-code` for Cursor)
- **Any MCP client** (Cursor, VS Code, Windsurf):

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

**Try asking:**

- "Compare Google Trends interest for ChatGPT, Gemini and Claude over the last 12 months."
- "What is trending on Google in the US right now?"

### Why this actor

- **No browser, no timeouts** – direct JSON requests, so a keyword takes seconds, not minutes. No page screenshots, no 3-minute page loads.
- **Everything in one item** – one item per keyword with the full timeline, the region table, and top + rising related queries and topics. No need to join four datasets.
- **Real comparisons** – turn on `compareTerms` and up to 5 terms share the same 0-100 scale, exactly like comparing terms in the Google Trends UI.
- **Trending Now** – daily trending searches for any country with search volume, % increase, start time, category, related searches and news articles.
- **All the filters** – location (country, state, US metro), time range (past hour to 2004-present, or custom dates), category, and search property (web, images, news, YouTube, Shopping).
- **You only pay for results** – keywords that fail or have too little search volume are listed for free in `FAILED_QUERIES` and never charged.
- **Built for rate limits** – every request is paced, and when Google answers "too many requests" the actor moves to a fresh proxy session and retries instead of failing the run.

### Use cases

- **SEO and content** – find rising queries and breakout topics before they peak, and plan content around seasonal demand.
- **Market research** – compare brands, products or categories on the same scale, by country or state.
- **Product and e-commerce** – spot seasonality, validate demand for a new product, and pick the regions to launch in.
- **News and social monitoring** – schedule Trending Now every hour and pipe new trends into Slack, Sheets or your own app.
- **Finance and data science** – feed search-interest time series into models and dashboards.

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `mode` | string | `explore` (search terms) or `trendingNow` (trending searches by country) | `explore` |
| `searchTerms` | array | Keywords (or topic IDs like `/m/0dr90d`) | – |
| `compareTerms` | boolean | Compare terms in groups of up to 5 on one shared scale | `false` |
| `geo` | string | Country (`US`), subregion (`US-CA`), US metro (`US-NY-501`) or empty for worldwide | worldwide |
| `timeRange` | string | `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`, `custom` | `today 12-m` |
| `customTimeRange` | string | With `timeRange: custom`: `"YYYY-MM-DD YYYY-MM-DD"` | – |
| `category` | integer | Google Trends category ID (0 = all) | `0` |
| `property` | string | `web`, `images`, `news`, `youtube`, `froogle` (Shopping) | `web` |
| `includeInterestOverTime` | boolean | Time series + averages | `true` |
| `includeInterestByRegion` | boolean | Interest per country / subregion | `true` |
| `includeRelatedQueries` | boolean | Top and rising related queries | `true` |
| `includeRelatedTopics` | boolean | Top and rising related topics | `true` |
| `regionResolution` | string | `auto`, `COUNTRY`, `REGION`, `CITY`, `DMA` | `auto` |
| `includeLowVolumeRegions` | boolean | Also list regions with low search volume | `false` |
| `maxRelatedPerList` | integer | Cap each top/rising list | all (up to 25) |
| `trendingNowCountries` | array | Countries for Trending Now mode, e.g. `["US", "GB"]` | `["US"]` |
| `trendingNowHours` | string | `4`, `24`, `48` or `168` hours | `24` |
| `trendingNowCategory` | string | Trending category ID (`17` Sports, `18` Technology, …) | all |
| `trendingNowActiveOnly` | boolean | Only trends that are still rising | `false` |
| `trendingNowIncludeNews` | boolean | Add picture and news articles for the top trends | `true` |
| `maxItems` | integer | Stop after this many items | no limit |
| `compactOutput` | boolean | Slim items for AI agents | `false` |
| `maxConcurrency` | integer | Parallel proxy sessions (1–10) | `3` |
| `proxyConfiguration` | object | Apify datacenter proxy by default; RESIDENTIAL optional | datacenter |

#### Example: compare terms in the US over 12 months

```json
{
    "searchTerms": ["chatgpt", "gemini", "claude"],
    "compareTerms": true,
    "geo": "US",
    "timeRange": "today 12-m"
}
```

#### Example: one item per keyword, custom dates, news search

```json
{
    "searchTerms": ["world cup", "olympics"],
    "timeRange": "custom",
    "customTimeRange": "2024-01-01 2024-12-31",
    "property": "news",
    "maxRelatedPerList": 10
}
```

#### Example: Trending Now in the US and UK

```json
{
    "mode": "trendingNow",
    "trendingNowCountries": ["US", "GB"],
    "trendingNowHours": "24"
}
```

### Output

#### Explore item (one per term, or one per comparison group)

```json
{
    "type": "explore",
    "searchTerm": "bitcoin",
    "searchTerms": ["bitcoin"],
    "isComparison": false,
    "geo": "US",
    "timeRange": "today 12-m",
    "resolvedTime": "2025-09-23 2026-09-23",
    "category": 0,
    "property": "web",
    "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=bitcoin&hl=en-US",
    "interestOverTime": {
        "resolution": "WEEK",
        "averages": [{ "term": "bitcoin", "value": 31 }],
        "timeline": [
            {
                "date": "2025-09-21T00:00:00.000Z",
                "timestamp": 1758412800,
                "formattedTime": "Sep 21 – 27, 2025",
                "values": [26],
                "hasData": [true],
                "isPartial": false
            }
        ]
    },
    "interestByRegion": {
        "resolution": "REGION",
        "regions": [
            { "geoCode": "US-WY", "geoName": "Wyoming", "values": [100], "hasData": [true], "coordinates": null }
        ]
    },
    "relatedQueries": [
        {
            "term": "bitcoin",
            "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100", "isBreakout": false, "trendsUrl": "https://trends.google.com/trends/explore?q=bitcoin+price&date=today+12-m&geo=US" }],
            "rising": [{ "query": "bitcoin etf news", "value": 350, "formattedValue": "+350%", "isBreakout": false, "trendsUrl": "https://trends.google.com/trends/explore?q=bitcoin+etf+news&date=today+12-m&geo=US" }]
        }
    ],
    "relatedTopics": [{ "term": "bitcoin", "top": [], "rising": [] }],
    "warnings": null,
    "scrapedAt": "2026-09-23T11:20:00.000Z"
}
```

In a comparison, `values` and `hasData` arrays follow the order of `searchTerms`, all on the same 0-100 scale, and `relatedQueries` / `relatedTopics` contain one block per term.

| Field | Description |
|-------|-------------|
| `searchTerm` | The term, or the compared terms joined with ", " |
| `resolvedTime` | The exact date range Google used |
| `interestOverTime` | `resolution` (MINUTE, HOUR, DAY, WEEK, MONTH), `averages` per term and the `timeline` (0-100 relative interest; `isPartial` marks the unfinished last period) |
| `interestByRegion` | `resolution` and `regions` with `geoCode`, `geoName`, `values` (and `coordinates` for cities) |
| `relatedQueries` | Per term: `top` (relative 0-100) and `rising` (growth %, `isBreakout` for +5000% and more) |
| `relatedTopics` | Same as related queries, with the topic `title`, `type` and Knowledge Graph `mid` |
| `warnings` | Blocks Google could not return for this query (the rest of the item is still valid) |

#### Trending Now item (one per trending search)

```json
{
    "type": "trendingNow",
    "searchTerm": "lynx vs fever",
    "geo": "US",
    "rank": 3,
    "searchVolume": 200000,
    "increasePercentage": 1000,
    "startedAt": "2026-09-22T23:00:00.000Z",
    "endedAt": null,
    "isActive": true,
    "categories": ["Sports"],
    "relatedQueries": ["fever vs lynx", "caitlin clark", "wnba playoffs"],
    "articleCount": 12,
    "picture": "https://encrypted-tbn0.gstatic.com/images?q=...",
    "pictureSource": "ESPN",
    "news": [{ "title": "Fever beat Lynx in Game 3", "url": "https://www.espn.com/...", "source": "ESPN", "picture": "https://encrypted-tbn0.gstatic.com/images?q=..." }],
    "trendsUrl": "https://trends.google.com/trends/explore?q=lynx%20vs%20fever&date=now%201-d&geo=US&hl=en-US",
    "hours": 24,
    "scrapedAt": "2026-09-23T11:33:45.451Z"
}
```

`searchVolume` is Google's lower bound ("200K+" becomes 200000). `news` is filled for the trends that appear in Google's Trending Now feed (usually the top ~20) and `null` for the rest.

The key-value store also contains:

- `SUMMARY` – counts, limits reached, and request / rate-limit statistics.
- `FAILED_QUERIES` – terms or countries that failed or had no data, with a reason (`no_data`, `rate_limited`, `invalid_input`, `http_error`). These are never charged.

### Pricing

This actor uses pay-per-event pricing: a tiny fee per run plus a fee per item saved. **One item = one search term with every data block you asked for** (timeline, regions, related queries and topics), or a whole comparison of up to 5 terms, or one Trending Now search. Terms with no data and failed queries are never charged. Set a maximum cost per run in Apify Console and the actor stops cleanly when it is reached. See the **Pricing** tab for current prices.

### FAQ

**Why are the numbers 0-100 and not search counts?**
That is how Google Trends works: values are relative interest, where 100 is the peak for the chosen terms, place and time. Compare terms with `compareTerms: true` to put them on the same scale. Trending Now gives approximate absolute volumes (`searchVolume`).

**Why did a term return no data?**
Google shows nothing for terms with very low search volume in the chosen place and time. These are listed in `FAILED_QUERIES` with reason `no_data` and are not charged. Try a longer time range, a bigger region or a broader term.

**Why is `relatedTopics` empty?**
Google leaves the related topics list empty for many queries, also in its own UI. Related queries are usually available.

**Do I need a residential proxy?**
Usually not. Google limits Trends requests per IP; the actor paces requests and rotates to a new Apify datacenter proxy session whenever it is rate-limited. If `SUMMARY` shows many rate-limited requests or some queries fail with `rate_limited`, run again with the `RESIDENTIAL` proxy group.

**Can I use a Google Trends URL?**
Copy the `q`, `geo`, `date`, `cat` and `gprop` values from the URL into `searchTerms`, `geo`, `timeRange` (or `customTimeRange`), `category` and `property`.

**Is this legal?**
The actor reads the same public, aggregated and anonymized data that anyone can see on trends.google.com. It does not log in and collects no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

### Support

Missing a feature or found a query that does not work? Open an issue on the actor's **Issues** tab – we usually respond within a day.

### Related actors

- [Google Jobs Scraper](https://apify.com/artificially/google-jobs-scraper): job listings from Google Jobs search, with salaries and apply links.
- [Product Hunt Scraper](https://apify.com/artificially/producthunt-scraper): new product launches, upvotes and makers, to pair trend spikes with new products.

# Actor input Schema

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

What to scrape. "explore": Google Trends data for your searchTerms (interest over time, interest by region, related queries and related topics). "trendingNow": the Trending Now list (daily trending searches) for the countries in trendingNowCountries; searchTerms is ignored.

## `searchTerms` (type: `array`):

Keywords to look up in explore mode, one per entry, max 100 characters each. A Google Knowledge Graph topic ID such as "/m/0dr90d" (Tesla, Inc.) also works. Each term returns its own item unless compareTerms is true. Example: \["bitcoin", "ethereum"].

## `compareTerms` (type: `boolean`):

Set to true to compare terms against each other like the Google Trends UI: terms are sent in groups of up to 5 and each group returns ONE item where all values share the same 0-100 scale (values arrays follow the order of searchTerms). Leave false to get one independent item per term (each scaled to its own peak of 100).

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

Where the searches come from. A 2-letter country code (e.g. "US", "GB", "DE"), a subregion code (e.g. "US-CA", "GB-ENG"), a US metro code (e.g. "US-NY-501"), or leave empty for worldwide.

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

Period to analyze. Past hour/4 hours/day return minute or hourly points, 7 days hourly, 1-3 months daily, 12 months and 5 years weekly, "all" (since 2004) monthly. Pick "custom" and fill customTimeRange for exact dates.

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

Used only when timeRange is "custom". Two dates "YYYY-MM-DD YYYY-MM-DD" (start end), from 2004-01-01 on. Example: "2024-01-01 2024-06-30". Ranges up to ~9 months give daily points, longer ranges weekly or monthly.

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

Google Trends category ID to narrow ambiguous terms, 0 = all categories. Top-level IDs: 3 Arts & Entertainment, 47 Autos & Vehicles, 44 Beauty & Fitness, 22 Books & Literature, 12 Business & Industrial, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 8 Games, 45 Health, 65 Hobbies & Leisure, 11 Home & Garden, 13 Internet & Telecom, 958 Jobs & Education, 19 Law & Government, 16 News, 299 Online Communities, 14 People & Society, 66 Pets & Animals, 29 Real Estate, 533 Reference, 174 Science, 18 Shopping, 20 Sports, 67 Travel. Subcategory IDs from a Google Trends URL (cat=...) also work.

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

Which Google search to measure: web search (default), image search, news search, YouTube search or Google Shopping.

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

Return the time series (0-100 relative interest per date) plus the average per term, in interestOverTime.

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

Return interest per country (worldwide) or per subregion (inside a country), in interestByRegion. Change the level with regionResolution.

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

Return top and rising related search queries per term, in relatedQueries. Rising entries show growth such as "+250%" or "Breakout".

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

Return top and rising related topics (Knowledge Graph entities with mid and type) per term, in relatedTopics. Google leaves this list empty for many queries; an empty list is returned as-is.

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

Granularity of interestByRegion. "auto" = countries for worldwide, subregions (states) inside a country. CITY and DMA (US metro areas) only work inside a country; DMA only for US. If Google rejects the level, the default level is returned instead.

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

Set to true to also list regions with too little search volume (they come back with value 0), like the checkbox in the Google Trends UI.

## `maxRelatedPerList` (type: `integer`):

Keep at most this many entries in each top/rising list of relatedQueries and relatedTopics (Google returns up to 25). Example: 10. Leave empty for all.

## `trendingNowCountries` (type: `array`):

Used only when mode is "trendingNow". 2-letter country codes, one item per trending search is returned for each. Example: \["US", "GB"].

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

Used only in trendingNow mode. Look-back window for trending searches.

## `trendingNowCategory` (type: `string`):

Used only in trendingNow mode. Keep only trending searches in this category.

## `trendingNowActiveOnly` (type: `boolean`):

Used only in trendingNow mode. Set to true to keep only trends that are still rising (isActive true).

## `trendingNowIncludeNews` (type: `boolean`):

Used only in trendingNow mode. Adds a picture and the linked news articles for the trends that appear in Google's Trending Now feed (usually the top ~20); other trends get news null.

## `maxItems` (type: `integer`):

Stop after saving this many dataset items in total (explore: one per term or comparison group; trendingNow: one per trending search). Example: 10. Leave empty for no limit (the run also stops at your maximum cost per run).

## `compactOutput` (type: `boolean`):

Set to true to save slim items: explore items keep averages, a date+values timeline, the top 15 regions and the top 10 related queries/topics (rising with growth); trendingNow items keep term, rank, volume, increase, start time, categories and related searches. Recommended when an AI agent or LLM reads the results. Leave false for the full item.

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

How many queries run at the same time, each on its own proxy session, from 1 to 10. Requests inside a session are paced politely. Lower it if you see many rate-limit retries.

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

Google rate-limits Trends per IP. The default Apify datacenter proxy works for most runs; the actor switches to a fresh proxy session whenever Google answers 429. Select the RESIDENTIAL group if a run reports many rate-limited or failed queries.

## Actor input object example

```json
{
  "mode": "explore",
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "compareTerms": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "regionResolution": "auto",
  "includeLowVolumeRegions": false,
  "trendingNowCountries": [
    "US"
  ],
  "trendingNowHours": "24",
  "trendingNowCategory": "0",
  "trendingNowActiveOnly": false,
  "trendingNowIncludeNews": true,
  "maxItems": 10,
  "compactOutput": false,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

Explore items (one per term or comparison) and Trending Now items

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

Explore items as a table (overview view)

## `trendingNow` (type: `string`):

Trending Now items as a table

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

Counts, limits reached and HTTP/rate-limit statistics

## `failedQueries` (type: `string`):

Terms or countries that failed or had no data, with a reason (never charged)

# 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 = {
    "searchTerms": [
        "bitcoin",
        "ethereum"
    ],
    "geo": "US",
    "trendingNowCountries": [
        "US"
    ],
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("artificially/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 = {
    "searchTerms": [
        "bitcoin",
        "ethereum",
    ],
    "geo": "US",
    "trendingNowCountries": ["US"],
    "maxItems": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("artificially/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 '{
  "searchTerms": [
    "bitcoin",
    "ethereum"
  ],
  "geo": "US",
  "trendingNowCountries": [
    "US"
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call artificially/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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