# Google Trends API: Interest, Related & Trending Now (`ocius-data/google-trends-reliable`) Actor

Google Trends API: interest over time, by region, related queries and topics, and Trending Now. Unlimited terms on one scale. Pay per keyword with data.

- **URL**: https://apify.com/ocius-data/google-trends-reliable.md
- **Developed by:** [Christian Barbosa](https://apify.com/ocius-data) (community)
- **Categories:** SEO tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 keyword with data

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: Interest, Related & Trending Now

Get **Google Trends data** for any keyword, country, category and time range: **interest over time**, **interest by region**, **share of search** and **related queries** (top and rising). Compare **more than 5 terms on one scale**, which Google Trends itself cannot do, filter by **category**, and pull the searches **trending now** in any country. You pay **only per keyword that returns data**. Terms with no data and failed terms are free.

This Actor works as a Google Trends API: call it from Python or JavaScript, a schedule, Google Sheets, Zapier, Make, n8n or an AI agent through MCP. It is a fast alternative to browser-based Google Trends scrapers: no browser, automatic retries and proxy escalation.

### What this Google Trends scraper does

- **Compare unlimited terms on one scale.** Google Trends compares at most 5 terms at a time. With **Compare terms** on and more than 5 terms, the Actor adds an anchor term to every batch and rescales all values to one common 0-100 scale in the field `valueComparable`. Compare 10, 50 or 500 keywords in one run.
- **Category filter.** Narrow any search to one Google Trends category, for example 71 (Food & Drink) or 7 (Finance). The ID is checked against Google's own category list before the run, so a wrong ID never returns unfiltered data silently.
- **Trending now.** The searches trending in a country or region right now, with search volume, growth, start and end time, categories and related searches, from the Google Trends Trending now page.
- **All data types in one run.** Interest over time, interest by region, share of search between compared terms and related queries.
- **Any country or region.** ISO codes such as `US`, `GB`, `KR`, `TW`, `ID`, `CO`, or subregions such as `US-CA`. Leave empty for worldwide.
- **Search properties.** Web, image, news, Google Shopping and YouTube search.
- **Correct dates.** Full timestamps, data granularity (minute, hour, day, week or month) and your own timezone, so values match the Google Trends website.
- **Reliable by design.** Each blocked request is retried with exponential backoff and a fresh session. If Google keeps blocking, the Actor switches from datacenter to residential proxies in the same country.

### Use cases

- **Market research and demand forecasting.** Track seasonality and demand by region before launching a product.
- **SEO and content planning.** Find rising queries and compare topic demand across many keywords on one scale.
- **E-commerce and retail.** Compare product categories, brands or models, and plan stock around seasonal peaks.
- **Brand and competitor monitoring.** Schedule weekly runs to follow your brand against competitors.
- **Newsrooms and social media teams.** Pull the searches trending now every hour, filtered by category.
- **Academic and economic research** with consistent, comparable time series.

### How to use it

#### Explore mode (default)

1. Enter one or more **search terms**.
2. Set a **country or region code** or leave it empty for worldwide.
3. Choose a **time range**, from the past hour to 2004-present, or a custom range (`2024-01-01 2024-12-31`).
4. Optional: turn on **Compare terms**, set a **category ID**, a **timezone** or a **search property**.
5. Choose the data types: interest over time, interest by region and related queries.

```json
{
  "searchTerms": ["coffee", "tea", "beer", "wine", "water", "juice", "soda"],
  "compare": true,
  "anchorTerm": "coffee",
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 71
}
```

#### Trending now mode

Set **Mode** to Trending now, enter a **country or region code**, and optionally a time window (4, 24 or 48 hours, or 7 days), a category and whether to keep only active trends.

```json
{
  "mode": "trendingNow",
  "geo": "US",
  "trendingHours": 24,
  "trendingCategory": 17,
  "trendingActiveOnly": true,
  "maxTrendingSearches": 50
}
```

#### Comparing more than 5 terms

Values in Google Trends are relative within each request, so two separate requests cannot be compared directly. The Actor puts the **anchor term** (by default the first term) in every batch of up to 5 terms, measures how the anchor scores in each batch, and rescales every batch to the anchor's scale. The result is `valueComparable`: one 0-100 scale for all terms, where 100 is the highest weekly (or daily) interest of any term. Choose a popular anchor term. If the anchor has very low interest in some batch, rows are flagged `lowPrecision: true` and the factors are stored in the `ANCHOR_SCALING` record.

### Category IDs

Use these IDs in **Category ID** (explore mode). They come from Google's category list, which has more than 1,400 subcategories; any valid subcategory ID also works, for example 277 (Alcoholic Beverages).

| ID | Category | ID | Category |
|---|---|---|---|
| 0 | All categories | 13 | Internet & Telecom |
| 3 | Arts & Entertainment | 958 | Jobs & Education |
| 47 | Autos & Vehicles | 19 | Law & Government |
| 44 | Beauty & Fitness | 16 | News |
| 22 | Books & Literature | 299 | Online Communities |
| 12 | Business & Industrial | 14 | People & Society |
| 5 | Computers & Electronics | 66 | Pets & Animals |
| 7 | Finance | 29 | Real Estate |
| 71 | Food & Drink | 533 | Reference |
| 8 | Games | 174 | Science |
| 45 | Health | 18 | Shopping |
| 65 | Hobbies & Leisure | 20 | Sports |
| 11 | Home & Garden | 67 | Travel |

Trending now uses a separate set of categories, selectable in the input: All categories (0), Autos and Vehicles (1), Beauty and Fashion (2), Business and Finance (3), Climate (20), Entertainment (4), Food and Drink (5), Games (6), Health (7), Hobbies and Leisure (8), Jobs and Education (9), Law and Government (10), Other (11), Pets and Animals (13), Politics (14), Science (15), Shopping (16), Sports (17), Technology (18) and Travel and Transportation (19).

### Output

Each row has a `type`. The output tab has separate views for each data type. Download as JSON, CSV, Excel or HTML, or read it through the API.

Interest over time, comparing 7 terms with an anchor:

```json
{
  "type": "interestOverTime",
  "searchTerm": "juice",
  "comparedWith": ["coffee", "soda"],
  "timestamp": "2025-10-26T00:00:00.000Z",
  "date": "2025-10-26",
  "granularity": "week",
  "value": 16,
  "valueComparable": 7.2,
  "anchorTerm": "coffee",
  "lowPrecision": false,
  "isPartial": false,
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "categoryName": "All categories"
}
```

Trending now:

```json
{
  "type": "trendingSearch",
  "rank": 1,
  "searchTerm": "cardinals vs cowboys",
  "searchVolume": 200000,
  "searchVolumeLabel": "200,000+",
  "increasePercent": 1000,
  "startedAt": "2026-11-01T13:50:00.000Z",
  "endedAt": null,
  "isActive": true,
  "categoryNames": ["Sports"],
  "relatedSearches": ["jacoby brissett", "gardner minshew", "gardner minshew ii"],
  "newsArticleCount": 16,
  "geo": "US",
  "timeWindowHours": 24
}
```

#### Field dictionary

| Field | Type | Meaning | When it is null or empty |
|---|---|---|---|
| `type` | string | `interestOverTime`, `interestByRegion`, `shareOfSearchByRegion`, `relatedQuery` or `trendingSearch`. | Never |
| `searchTerm` | string | The term the row belongs to, or the trending search. | Never |
| `value` | number | Google Trends score from 0 to 100; for rising queries, the growth percentage. | When Google reports no value |
| `formattedValue` | string | The value as Google displays it, for example `<1`, `+250%` or `Breakout`. | When not provided |
| `valueComparable` | number | Score on one common 0-100 scale when more than 5 terms are compared. | Outside anchor mode |
| `anchorTerm`, `lowPrecision` | string, boolean | Anchor used for rescaling, and whether its interest was too low for precise rescaling. | Outside anchor mode |
| `comparedWith` | array | The other terms in the same request. | Single-term requests |
| `timestamp`, `date`, `dateLabel`, `granularity` | mixed | Start of the period (UTC), its date, Google's label and the period length. | Outside time series |
| `isPartial` | boolean | `true` when the period is not complete yet. | Outside time series |
| `region`, `regionCode` | string | Region name and ISO code. | Outside regional data |
| `sharePercent` | number | Share of search between compared terms in a region (sums to 100). | Outside compare mode |
| `ranking`, `query` | string | `top` or `rising`, and the related query. | Outside related queries |
| `geo`, `timeRange`, `timezone`, `property` | string | The filters used. | Never |
| `category`, `categoryName` | number, string | Category ID and its name from Google's list. | `categoryName` if the list could not be loaded |
| `rank`, `searchVolume`, `searchVolumeLabel` | mixed | Trending now: position, approximate searches and the label Google shows. | Outside Trending now |
| `increasePercent` | number | Trending now: growth in search interest, in percent. | Outside Trending now |
| `startedAt`, `endedAt`, `isActive` | mixed | Trending now: when the trend started and ended (null while active). | Outside Trending now |
| `categoryIds`, `categoryNames` | array | Trending now: categories of the trend. | Outside Trending now |
| `relatedSearches`, `newsArticleCount` | mixed | Trending now: related searches and number of news articles Google links. | Outside Trending now |
| `exploreUrl`, `sourceUrl` | string | The same data in Google Trends, to check it yourself. | Never |
| `scrapedAt` | ISO 8601 | When the data was collected (UTC). | Never |

### Pricing and cost calculator

This Actor uses pay-per-event pricing. You pay only for the events below. All data types for a term are included in its price. Terms with no data, failed terms and repeated terms are never charged. Your maximum cost per run is respected: the Actor checks the remaining budget before saving each term and stops when it is reached; terms it could not process are marked `NOT_PROCESSED`.

| Event | Price | When it is charged |
|---|---|---|
| `keyword` | USD 0.01 | Each search term that returns data, with every data type selected. |
| `trending-search` | USD 0.002 | Trending now mode: each trending search saved. |

| Scenario | Units | Approximate cost |
|---|---|---|
| Weekly check of 10 keywords | 10 keywords | USD 0.10 |
| Compare 50 keywords on one scale | 50 keywords | USD 0.50 |
| 1,000 keywords | 1,000 keywords | USD 10.00 |
| Top 50 trending searches in one country, daily for 30 days | 1,500 trending searches | USD 3.00 |

Formula: `keywords with data × 0.01 + trending searches saved × 0.002`.

### Integrations: schedules, API, webhooks, Google Sheets, Zapier, Make and AI agents

- **Schedules.** In Apify Console, open **Schedules**, create a schedule (for example every Monday, or every hour for Trending now) and add this Actor with your saved input.

- **API.** Run the Actor and get the rows in one call:

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/ocius-data~google-trends-reliable/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"searchTerms":["heat pump"],"geo":"US","timeRange":"today 5-y"}'
  ```

  Python, with the official `apify-client` package:

  ```python
  from apify_client import ApifyClient

  client = ApifyClient("YOUR_API_TOKEN")
  run = client.actor("ocius-data/google-trends-reliable").call(
      run_input={"searchTerms": ["heat pump", "air conditioner"], "compare": True, "geo": "US"}
  )
  rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
  ```

- **Webhooks.** In the Actor's **Integrations** tab, add a webhook for the event `ACTOR.RUN.SUCCEEDED`. Your endpoint receives the run, and the rows are at `/v2/datasets/{defaultDatasetId}/items`.

- **Google Sheets.** Use the Google Sheets integration in the **Integrations** tab to append each run to a sheet, for example to build a weekly demand dashboard.

- **Zapier, Make and n8n.** Use the official Apify app in each tool: trigger on "Actor run finished" and read the dataset items, or start a run from your workflow.

- **MCP and AI agents.** The input is flat (a list of terms and simple options, no nested flags), so the Actor works through the Apify MCP server (`mcp.apify.com`) and in Zapier or Apify steps. Ask Claude, ChatGPT, Cursor or another MCP client to run `ocius-data/google-trends-reliable` for your keywords.

Related Actor from the same developer: Google Ads Transparency Scraper, to see which ads the brands behind a trend are running.

### Statuses and errors

Every term (or, in Trending now, the country) ends with one status in the `RUN_SUMMARY` record (Storage, key-value store). The run message shows the counts.

| Status | Meaning | Charged | What to do |
|---|---|---|---|
| `OK` | Data returned. | Yes | Nothing |
| `NO_DATA` | Not enough search volume for the term with these filters. | No | Use a broader region, longer period or another term. |
| `BLOCKED` | Google kept rate-limiting after all retries and proxy escalation. | No | Run again later or select residential proxies. |
| `ERROR` | The request was rejected, for example an invalid time range. | No | Check the input. |
| `INVALID_INPUT` | Trending now is not available for this country or region code. | No | Use a code such as `US`, `GB`, `CO` or `US-CA`. |
| `NOT_PROCESSED` | Your maximum cost per run was reached first. | No | Raise the cost limit or split the list. |

Invalid input (time range format, region code, category ID) stops the run within seconds with a message that explains how to fix it. If more than 20% of terms fail, the run is marked as failed so you notice.

### Known limits

- Google Trends values are relative and sampled; repeated runs can differ slightly, as on the website.
- Rescaled values (`valueComparable`) are as precise as the anchor term allows. Pick an anchor with steady, high interest.
- In anchor mode, interest by region and related queries are reported per batch, not rescaled.
- Related topics are not included because Google currently returns them empty (checked November 2026).
- Trending now returns what Google shows on its Trending now page for the selected window; search volumes are approximate ranges.

### FAQ

**Can I use this as a Google Trends API?** Yes. The Actor returns the data you see on the Google Trends website through a simple, documented API with pay-per-use pricing.

**Can I compare more than 5 keywords?** Yes. Turn on Compare terms and use `valueComparable`.

**How do I filter by category?** Enter the category ID from the table above in Category ID.

**How do I get daily trending searches?** Use Trending now mode with a 24-hour window and schedule it daily, or hourly with the 4-hour window.

**Why do my numbers differ from the website?** Set the same timezone, region, period, category and property. Google samples data, so small differences are normal.

**Is it legal?** The Actor collects publicly available, aggregated search data. No personal data is involved.

**Do you offer volume pricing?** For more than one million rows per month, open an issue on the Actor page.

### Related Actors from ocius-data

Built to the same standard: a status for every input in `RUN_SUMMARY`, actionable error messages and list-based inputs, so they chain well in one workflow:

- **[Bulk Keyword Search Volume & CPC - Keyword Planner](https://apify.com/ocius-data/keyword-metrics)**: absolute monthly search volume, cost per click (CPC) and competition from Google Ads data, no Ads account needed.
- **[Google Autocomplete API: Keyword Ideas & Questions](https://apify.com/ocius-data/google-autocomplete-keyword-ideas)**: hundreds of long-tail keyword ideas and questions from Google, YouTube and Shopping autocomplete.
- **[Google News API: Real URLs, Pay per Article](https://apify.com/ocius-data/google-news-reliable)**: news coverage for any keyword or topic, with the real publisher URL of each article.
- **[Google Ads Transparency Center API - Competitor Ads](https://apify.com/ocius-data/google-ads-transparency-reliable)**: the Google Ads your competitors are running, with full creatives, and alerts when ads start or stop.

### Changelog

- **0.3** (November 2026) Trending now mode (event `trending-search`). Category IDs checked against Google's list and `categoryName` on every row. Budget checked before each term is saved, with `NOT_PROCESSED` for terms beyond the cost limit. Rows of terms without data are no longer saved in anchor mode. Run summary kept across platform restarts.
- **0.2** Pay per keyword, proxy escalation, anchor comparison for more than 5 terms, timezones, full timestamps, per-term statuses and run summary.
- **0.1** First version.

### Support

Open an issue on the Actor page. Issues are reviewed every day and fixes are released quickly.

# Actor input Schema

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

Explore analyzes your search terms. Trending now returns the searches that are trending in the selected country, with search volume, growth and related searches.

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

Keywords to analyze in Explore mode. You are charged once per search term that returns data; terms with no data or errors are free. Not used in Trending now mode.

## `compare` (type: `boolean`):

Put the terms on one comparable 0-100 scale, as in the Google Trends compare view. Up to 5 terms are compared directly. With more than 5 terms, the Actor adds an anchor term to every batch of 5 and rescales all values to one common scale (field valueComparable), so you can compare 10, 50 or 500 terms.

## `anchorTerm` (type: `string`):

Used only when comparing more than 5 terms. This term is included in every batch so all terms can be rescaled to one comparable scale. Choose a popular term. Defaults to the first term.

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

ISO code such as US, CO, ES, MX or US-CA. Leave empty for worldwide.

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

Period to analyze, as in the Google Trends time selector.

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

Optional. Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD

## `timezone` (type: `string`):

IANA timezone used for dates, e.g. America/New_York, America/Bogota, Europe/Madrid. Matches what you see in Google Trends in that timezone.

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

Google Trends category ID that narrows the search to one topic, for example 71 (Food & Drink), 7 (Finance), 47 (Autos & Vehicles) or 958 (Jobs & Education). 0 means all categories. The ID is checked against Google's category list before the run starts. The README lists the main IDs.

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

Google property to analyze: web, images, news, shopping or YouTube.

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

Search interest (0-100) for each date in the period.

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

Search interest (0-100) by subregion of the selected country.

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

Top and rising related search queries.

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

Only used in Trending now mode. The period of trending searches, as in the Google Trends Trending now page.

## `trendingCategory` (type: `string`):

Only used in Trending now mode. Return only trending searches in this category.

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

Only used in Trending now mode. Return only searches that are still trending, not those that have ended.

## `maxTrendingSearches` (type: `integer`):

Only used in Trending now mode. Maximum number of trending searches saved, in Google's order. You are charged per trending search saved.

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

Language for labels, for example en-US or es.

## `maxRetries` (type: `integer`):

How many times a blocked request is retried with a new session.

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

By default the Actor starts with Apify datacenter proxies and switches automatically to residential proxies in the same country if Google blocks requests.

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

How many term groups are processed in parallel.

## Actor input object example

```json
{
  "mode": "explore",
  "searchTerms": [
    "air conditioner",
    "heat pump"
  ],
  "compare": false,
  "geo": "",
  "timeRange": "today 12-m",
  "timezone": "UTC",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "trendingHours": "24",
  "trendingCategory": "0",
  "trendingActiveOnly": false,
  "maxTrendingSearches": 50,
  "language": "en-US",
  "maxRetries": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 3
}
```

# Actor output Schema

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

All Google Trends rows: interest over time, interest by region, share of search, related queries and, in Trending now mode, trending searches.

## `runSummary` (type: `string`):

Status per search term or trending country (OK, NO_DATA, BLOCKED, ERROR, INVALID_INPUT, NOT_PROCESSED), with events charged and the category used.

# 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": [
        "air conditioner",
        "heat pump"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ocius-data/google-trends-reliable").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": [
        "air conditioner",
        "heat pump",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ocius-data/google-trends-reliable").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": [
    "air conditioner",
    "heat pump"
  ]
}' |
apify call ocius-data/google-trends-reliable --silent --output-dataset

```

## MCP server setup

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

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/WZNP46apNY284eW1A/builds/VlMIfMCKT3qoH9aSw/openapi.json
