# Google Trends API & Scraper (`kwerix/google-trends-api`) Actor

Find out what people search for, and when. For any keywords: growth, seasonal peaks and the date to publish by, breakout queries and top regions, compared on one scale. Plus Trending Now: every search trending in any country, with volume and related searches. Export to Excel or API.

- **URL**: https://apify.com/kwerix/google-trends-api.md
- **Developed by:** [Kwerix](https://apify.com/kwerix) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 keywords

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

**Find out what people search for, and when.** For any list of keywords, this Google Trends API gives you interest over time, interest by region, rising and breakout queries and a comparison of any number of keywords on one scale, plus a ready-made summary for every keyword: is it growing, is it seasonal, when is the next peak and when should you publish.

🔥 **New: Trending Now.** Get every search trending in a country right now (about 300 in the US for the last 24 hours, 1,900 for the last 7 days) with search volume, increase, categories and related searches.

> 💡 **Try it free:** Apify's monthly free credit covers about 3,300 keywords or 10,000 trending searches. After that you pay $1.50 per 1,000 keywords or $0.50 per 1,000 trends, with no start fee, no browser and no Google account needed.

### 📈 What is Google Trends API?

Google Trends API is an Apify Actor that turns Google Trends into clean, structured data. Give it keywords, a location and a time range, and it returns one row per keyword in JSON, CSV or Excel with:

<table>
<tr>
<td>📊 Interest over time</td>
<td>🗺️ Interest by country, region or US metro</td>
</tr>
<tr>
<td>🚀 Rising and breakout queries</td>
<td>🔝 Top related queries</td>
</tr>
<tr>
<td>⚖️ Any number of keywords on one scale</td>
<td>🗓️ Seasonality: peak months and next peak</td>
</tr>
<tr>
<td>📅 Publish-by date for seasonal content</td>
<td>📉 Trend per year and year-over-year change</td>
</tr>
<tr>
<td>🔎 Web, YouTube, News, Images and Shopping search</td>
<td>🌍 Any country, time range and category</td>
</tr>
<tr>
<td>🔥 Trending Now: what is trending today, by country</td>
<td>🔗 Paste Google Trends URLs as input</td>
</tr>
</table>

### 🤔 Why use this Google Trends API?

✅ **An API that works today.** Google's official Trends API is an alpha with access by application only, and pytrends was archived in April 2025. This Actor handles Google's rate limiting (HTTP 429) for you and switches to residential proxies only when needed.

⚖️ **More than 5 keywords on one scale.** Google compares at most 5 terms at a time. Turn on *Compare all keywords* and every keyword is batched with a shared anchor term and rescaled to one 0–100 scale, so you can rank 50 or 500 keywords by relative popularity.

🧠 **Answers, not just timelines.** Each row already tells you whether the keyword is seasonal, which months peak, when the next peak is, how fast it is growing and which queries are breaking out right now.

🤖 **Built for pipelines, spreadsheets and AI agents.** One compact row per keyword, stable field names and table views in the Console. The full timeline is one switch away.

### 🎯 What can you do with Google Trends data?

🗓️ **Plan an SEO content calendar.** Publish seasonal content 45 days before demand peaks, so pages collect rankings and user signals before the peak.

🚀 **Find new topics early.** Rising and breakout queries show new subtopics before keyword tools report any volume.

🔥 **Catch trends while they happen.** Trending Now lists what a country is searching for right now, so you can publish or react while demand is peaking.

⚖️ **Prioritize keywords.** Rank a long keyword list by relative popularity on one scale.

📍 **Target the right places.** Find the countries, regions or US metros where a topic is searched most.

🛍️ **Research products and markets.** Growth trend and year-over-year change for products, brands and categories, across web, YouTube, News, Images and Google Shopping search.

### 🚀 How do I use Google Trends API?

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open **Google Trends API & Scraper** and click **Try for free**.
3. Pick a mode: **Keyword analysis** (your keywords, or Google Trends URLs) or **Trending Now** (countries and a time window).
4. Switch on what you need: related queries, interest by region, comparison on one scale or the full timeline.
5. Click **Start** and download the results as JSON, CSV or Excel, or read them via API.

### 💰 How much does it cost?

| Mode | Price | Example |
|---|---|---|
| Keyword analysis | **$1.50 per 1,000 keywords** | 100 keywords = $0.15 |
| Trending Now | **$0.50 per 1,000 trends** | US, last 24 hours (≈300 trends) ≈ $0.15 |

One charge per result row, whatever data you switch on. There is no charge per run start, and keywords that fail are never charged (they are listed in the `FAILED_KEYWORDS` record of the run's key-value store).

Apify's free plan includes $5 of credit every month, enough for about 3,300 keywords or 10,000 trends.

### ⬇️ Input example

```json
{
    "keywords": ["sunscreen", "retinol", "niacinamide", "azelaic acid"],
    "geo": "US",
    "timeRange": "today 5-y",
    "includeRelatedQueries": true,
    "includeInterestByRegion": true,
    "compareKeywords": true,
    "anchorKeyword": "retinol"
}
```

`timeRange` accepts the Trends presets (`now 7-d`, `today 12-m`, `today 5-y`, `all`...) or a custom `customTimeRange` like `2020-01-01 2024-12-31`. Seasonality and year-over-year need at least 2 years.

You can also paste Google Trends URLs: each keyword in the URL is analyzed with the URL's own location, time range, search type and category.

```json
{ "trendsUrls": ["https://trends.google.com/trends/explore?q=sunscreen,retinol&geo=US&date=today%205-y"] }
```

For **Trending Now**:

```json
{ "mode": "trending", "trendingGeos": ["US", "GB", "ES"], "trendingHours": "24", "trendingCategories": ["Sports", "Technology"] }
```

### ⬆️ Output example

```json
{
    "keyword": "sunscreen",
    "geo": "US",
    "timeRange": "today 5-y",
    "averageInterest": 26.3,
    "trendSlopePctPerYear": 21.6,
    "yoyChangePct": 55.9,
    "seasonality": {
        "isSeasonal": true,
        "peakMonths": ["Jun", "May", "Apr"],
        "nextPeakDate": "2027-06-08",
        "publishBy": "2027-04-24",
        "publishWindowOpen": true
    },
    "breakoutQueries": ["beauty of joseon", "beauty of joseon sunscreen", "joseon sunscreen", "anua sunscreen"],
    "interestByRegion": [
        { "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 },
        { "geoCode": "US-HI", "geoName": "Hawaii", "value": 80 }
    ],
    "comparison": { "anchor": "retinol", "averageOnCommonScale": 26.27, "rank": 1, "of": 12 },
    "trendsUrl": "https://trends.google.com/trends/explore?q=sunscreen&date=today+5-y&geo=US"
}
```

Trending Now returns one row per trend:

```json
{
    "type": "trending",
    "keyword": "wnba playoffs",
    "geo": "US",
    "isActive": true,
    "startedAt": "2026-09-29T12:10:00.000Z",
    "searchVolume": 5000000,
    "searchVolumeLabel": "5M+",
    "increasePct": 1000,
    "categories": ["Sports"],
    "relatedQueries": ["aces vs fever", "fever", "wnba", "wnba playoffs bracket"],
    "trendsUrl": "https://trends.google.com/trends/explore?q=wnba+playoffs&date=now+7-d&geo=US"
}
```

#### 📋 What each field means

| Field | What it means |
|---|---|
| `averageInterest`, `latestInterest`, `peakInterest`, `peakDate` | Google's 0–100 relative interest for the keyword over the chosen range |
| `trendSlopePctPerYear` | Linear trend of interest, as % of the average per year |
| `yoyChangePct` | Average of the last 12 months vs the 12 months before |
| `seasonality.peakMonths`, `monthlyProfile` | Average interest per calendar month across years |
| `seasonality.isSeasonal` | The monthly swing is large and the yearly peak lands in the same months year after year |
| `seasonality.nextPeakDate`, `publishBy` | Next expected peak, and the date to publish by (peak minus the lead time, 45 days by default) |
| `breakoutQueries`, `risingQueries`, `topQueries` | Related searches; *Breakout* means growth above +5000% |
| `interestByRegion` | Relative interest by country, region or US metro area (DMA) |
| `comparison` | Rank and average on the common scale when comparing keywords |
| `interestOverTime` | Full timeline (weekly for 5 years, monthly for 2004–present, hourly or daily for short ranges). Off by default: turn on *Full interest-over-time timeline* to chart the data |

Google Trends values are **relative**, not search volumes: 100 is the peak of the term in the selected range and location.

### 🤖 Use with AI agents (MCP)

AI agents can find and run this Actor through the Apify MCP server (`https://mcp.apify.com`): search for "google trends", read this page, call the Actor, then read the dataset.

- **Minimal input**: `{"keywords": ["sunscreen", "retinol"], "geo": "US"}`. Defaults: past 5 years, related queries on, one compact row per keyword (no raw timeline), so results fit comfortably in a model's context.
- **Which field answers which question**:

| Question | Field |
|---|---|
| Is this topic growing or declining? | `trendSlopePctPerYear`, `yoyChangePct` |
| Is it seasonal, and when does it peak? | `seasonality.isSeasonal`, `seasonality.peakMonths`, `seasonality.nextPeakDate` |
| When should content about it be published? | `seasonality.publishBy`, `seasonality.publishWindowOpen` |
| What is breaking out right now? | `breakoutQueries`, then `risingQueries` |
| Which of these keywords is most popular? | set `compareKeywords: true`, read `comparison.rank` and `comparison.averageOnCommonScale` |
| Where is it searched most? | set `includeInterestByRegion: true`, read `interestByRegion` |
| What is trending right now in a country? | `{"mode": "trending", "trendingGeos": ["US"]}`, read `keyword`, `searchVolumeLabel`, `relatedQueries` |

- **Cost**: $0.0015 per keyword, $0.0005 per trend. Cap a run with `maxTotalChargeUsd` in the call options.
- Values are Google's relative 0–100 index, not search volumes. `seasonality` is `null` for ranges shorter than 2 years, and the peak dates are `null` when a keyword is not seasonal.

### 🔌 Integrations

Run it from the Apify API or the Python and JavaScript clients, schedule it in the Console, and connect the results to Google Sheets, Make, Zapier or n8n. Results export to JSON, CSV or Excel.

📦 **Code examples on GitHub:** [Kwerix/google-trends-api](https://github.com/Kwerix/google-trends-api) has ready-to-run scripts in Python, JavaScript, cURL and MCP, including a seasonal content calendar and a Trending Now monitor.

### ❓ FAQ

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

Google announced one in July 2025, but it is an alpha with access by application only. This Actor gives you Google Trends data today, without waiting for approval.

#### Can I use this Google Trends API in Python?

Yes. With the [Apify Python client](https://docs.apify.com/api/client/python):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("kwerix/google-trends-api").call(
    run_input={"keywords": ["sunscreen", "retinol"], "geo": "US"}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["keyword"], row["trendSlopePctPerYear"], row["breakoutQueries"][:3])
```

#### Can I paste a Google Trends URL?

Yes. Add explore URLs to **Google Trends URLs**; each keyword in them is analyzed with the URL's location, time range, search type and category.

#### What does Trending Now return?

Every search trending in the countries you choose over the last 4, 24 or 48 hours or 7 days, with Google's search volume bucket (e.g. 200K+), increase in %, categories, start and end time, and the related searches grouped into the trend. Filter by category or keep only active trends.

#### How many keywords can I compare?

Any number with *Compare all keywords*. Pick an anchor of medium popularity: terms that are tiny next to it lose precision and are flagged with `lowPrecision`.

#### Why do other Google Trends scrapers fail?

Google answers bursts of requests from one IP with HTTP 429. This Actor starts on the server's own connection and switches to rotating residential proxies as soon as Google rate-limits it, retrying the keyword on a fresh session.

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

Google Trends shows aggregated, anonymized search interest, and this Actor collects only that public data: no personal data and no login. Check Google's terms and your local regulations for your use case; this is not legal advice.

#### Does it return related topics?

Not at the moment: Google currently returns related topics empty through its API.

#### Found a bug or missing a feature?

Open an issue in the **Issues** tab. We read every one.

***

<sub>Kwerix is an independent company, not affiliated with, endorsed or sponsored by Google. "Google Trends" is a trademark of Google LLC and is used here only to describe the data this Actor works with.</sub>

# Actor input Schema

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

Keyword analysis studies the keywords you give. Trending Now lists every search trending in a country right now, with search volume, growth and related queries.

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

Search terms to analyze (Keyword analysis mode). Each keyword is one result. Topic IDs such as /m/0dl567 are accepted too.

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

Optional. Paste Google Trends explore URLs (trends.google.com/trends/explore?q=...). Each keyword in the URL is analyzed with the URL's own location, time range, search type and category.

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

Country or region code (US, GB, ES, US-CA...). Leave empty for worldwide.

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

Seasonality and year-over-year change need at least 2 years (Past 5 years or 2004–present).

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, e.g. 2020-01-01 2024-12-31.

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

Which Google search to measure: web, images, news, Google Shopping or YouTube.

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

Google Trends category ID (0 = all categories).

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

Rising queries marked as Breakout grew more than 5000%.

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

Relative interest per country, region, metro or city.

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

Granularity of the regional breakdown. Automatic follows the location (countries for worldwide, regions for a country). City level is not offered: Google returns no data for it.

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

Adds the raw timeline (and the common-scale timeline when comparing) to each result. Averages, trend, YoY and seasonality are always computed. Off by default to keep results compact for spreadsheets and AI agents; turn it on to chart the data.

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

Google Trends compares at most 5 terms. This batches keywords with a shared anchor term and rescales them onto one 0–100 scale, so any number of keywords can be ranked by relative popularity.

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

Term shared by every batch. Pick one of medium popularity among your keywords. Defaults to the first keyword.

## `seasonalityLeadDays` (type: `integer`):

publishBy = next seasonal peak minus this many days. 45 days lets new content collect rankings and user signals before demand peaks.

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

Country codes for Trending Now (US, GB, ES, DE...). One request per country.

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

Time window of Trending Now. The US returns roughly 30 trends for 4 hours, 300 for 24 hours and 1,900 for 7 days.

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

Skip trends that have already ended.

## `trendingCategories` (type: `array`):

Optional. Keep only trends in these categories.

## `maxTrendingPerGeo` (type: `integer`):

0 returns all of them. Each trend is one result.

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

Language for dates and topic names, e.g. en-US, es-ES.

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

Keywords processed in parallel.

## `tryWithoutProxyFirst` (type: `boolean`):

Start on the server's own IP and switch to the proxy only when Google blocks it.

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

Used once Google rate-limits the direct connection. Residential proxies are the most reliable for Google Trends.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "sunscreen",
    "retinol"
  ],
  "geo": "",
  "timeRange": "today 5-y",
  "property": "",
  "category": 0,
  "includeRelatedQueries": true,
  "includeInterestByRegion": false,
  "regionResolution": "AUTO",
  "includeInterestOverTime": false,
  "compareKeywords": false,
  "seasonalityLeadDays": 45,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "maxTrendingPerGeo": 0,
  "language": "en-US",
  "maxConcurrency": 3,
  "tryWithoutProxyFirst": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

One row per keyword: average and latest interest, trend per year, year-over-year change, seasonality (peak months, next peak, publish-by date), breakout queries and comparison rank.

## `rising` (type: `string`):

Breakout, rising and top related queries for each keyword.

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

Trending searches by country with search volume, increase, categories and related searches (Trending Now mode).

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

Every field for every keyword, including interest by region and the timeline when enabled.

# 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": [
        "sunscreen",
        "retinol"
    ],
    "trendingGeos": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kwerix/google-trends-api").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": [
        "sunscreen",
        "retinol",
    ],
    "trendingGeos": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("kwerix/google-trends-api").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": [
    "sunscreen",
    "retinol"
  ],
  "trendingGeos": [
    "US"
  ]
}' |
apify call kwerix/google-trends-api --silent --output-dataset

```

## MCP server setup

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

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/VcTYnBFpuwXZganhK/builds/WM8taFyGNSsTY99sP/openapi.json
