# Google Trends API: Interest, Related Queries, Trending Now (`joesimo/google-trends`) Actor

Google Trends data as clean JSON: interest over time and by region (country, state, city, metro) and related queries for up to 5 compared terms, plus Trending Now by country with volume, growth and top news. Polite back-off, no login or browser. $2 per 1,000 results.

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

## Pricing

from $2.00 / 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.

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 over time, by region, related queries and Trending Now

Get Google Trends data as clean JSON for up to **5 compared search terms** at a time: **interest over time**, **interest by region** (countries, states, cities or US metros) and **related queries** (top and rising). In the same run, get **Trending Now** searches for any country: realtime (4 hours), daily (24 hours), 48 hours or 7 days, with search volume, growth, related searches, categories and the **top news articles** behind each trend.

Plain HTTP against Google Trends' public endpoints: no browser, no login, no captcha solving. Polite by design: one request at a time, a pause between requests and exponential back-off on rate limits. **$2.00 per 1,000 results.**

### What you can use it for

- **SEO and content planning:** seasonality, rising queries and the next topics to write about.
- **Market research:** compare brands, products or competitors on the same 0 to 100 scale, by state or city.
- **Newsrooms and social media:** what the country is searching for right now, with the news coverage behind each trend.
- **Investing and forecasting:** search interest as an alternative data signal, daily or weekly back to 2004.
- **AI and RAG pipelines:** feed fresh trending topics and their news links to an LLM.
- **Dashboards:** schedule a run every hour or day and keep a time series.

### Why this Actor

- **Everything in one run:** many keyword sets plus Trending Now for many countries.
- **Up to 5 terms compared** on one scale, exactly like the Google Trends website, with the average per term.
- **Any location level:** worldwide, country, region (`US-CA`), metro (`US-CA-807`), and region breakdown by country, region, city or DMA.
- **All time ranges:** past hour to 2004 onward, or a custom `YYYY-MM-DD YYYY-MM-DD` range.
- **Web, image, news, shopping and YouTube search** interest.
- **Trending Now with news:** search volume, increase percentage, start and end time, active flag, related searches, category, and the top 3 articles (headline, URL, publisher, time).
- **Filters and sorting for trends:** by category, active only, by volume or newest.
- **Reliable:** fresh sessions and polite back-off on HTTP 429, a clear per-run summary, and partial results are always saved. You only pay for results saved.

### Input example

```json
{
    "searchTerms": ["chatgpt, gemini, claude", "electric cars"],
    "geo": "US",
    "timeRange": "today 12-m",
    "dataTypes": ["interestOverTime", "interestByRegion", "relatedQueries"],
    "trendingGeos": ["US", "GB"],
    "trendingHours": 24,
    "maxTrendingPerGeo": 25,
    "trendingCategories": ["Technology"]
}
```

This run returns 2 keyword results (one per line of `searchTerms`) and up to 50 trending results.

#### Inputs

| Field | What it does |
|---|---|
| `searchTerms` | One search per line. Put up to 5 terms on one line, separated by commas, to compare them on one scale. |
| `geo` | `US`, `GB`, `DE`..., a region such as `US-CA`, a metro such as `US-CA-807`, or empty for worldwide. Default `US`. |
| `timeRange` | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m` (default), `today 5-y`, `all`, or `2024-01-01 2024-06-30`. |
| `category` | Google Trends category number (0 = all), for example 7 Finance. |
| `property` | `web` (default), `images`, `news`, `shopping` or `youtube`. |
| `dataTypes` | `interestOverTime`, `interestByRegion`, `relatedQueries` (default: all three), `relatedTopics` (opt in, see limits). A chart you do not ask for is `null`. |
| `regionResolution` | `auto`, `COUNTRY`, `REGION`, `CITY` or `DMA` (US metros). |
| `includeLowVolumeRegions` | Also list regions with too little data (value 0). |
| `trendingGeos` | Countries (or regions like `US-NY`) to get Trending Now for. |
| `trendingHours` | 4 (realtime), 24 (daily, default), 48 or 168. |
| `maxTrendingPerGeo` | Trends saved per location (default 25, 0 = all, often several hundred). |
| `trendingSortBy` | `relevance` (Google order), `volume` or `newest`. |
| `trendingActiveOnly` | Skip trends that have ended. |
| `trendingCategories` | Keep only these categories, by name (`Sports`, `Technology`...) or number. |
| `includeTrendingNews` | Top 3 news articles per trend (default on). |
| `maxItems` | Total results cap (0 = no limit). Trending results are saved first, then keyword sets. |
| `hl`, `tz` | Language for labels and timezone offset in minutes (Google convention, 300 = UTC-5). |
| `requestDelayMs`, `maxRetries` | Politeness settings. Defaults: 1.5 s between requests, 4 retries with back-off. |
| `proxyConfiguration` | Optional. Off by default. |

### Output examples

A **keyword set** result (lists shortened):

```json
{
    "type": "keywords",
    "id": "7cea30744fd71a9b",
    "searchTerms": ["chatgpt", "gemini", "claude"],
    "geo": "US",
    "timeRange": "today 3-m",
    "timeRangeResolved": "2026-07-28 2026-10-28",
    "category": 0,
    "property": "web",
    "interestOverTime": [
        { "date": "2026-07-28T00:00:00.000Z", "timestamp": 1785196800, "formattedTime": "Jul 28, 2026", "values": [71, 24, 22], "hasData": [true, true, true], "isPartial": false }
    ],
    "averages": [{ "term": "chatgpt", "average": 69 }, { "term": "gemini", "average": 28 }, { "term": "claude", "average": 19 }],
    "timeResolution": "DAY",
    "interestByRegion": [
        { "geoCode": "US-CA", "geoName": "California", "coordinates": null, "values": [58, 25, 17], "hasData": [true, true, true] }
    ],
    "regionResolution": "REGION",
    "relatedQueries": [
        {
            "term": "chatgpt",
            "top": [{ "query": "chatgpt ai", "value": 100, "formattedValue": "100", "link": "https://trends.google.com/trends/explore?q=chatgpt+ai&date=today+3-m&geo=US" }],
            "rising": [{ "query": "sam altman chatgpt water usage", "value": 8500, "formattedValue": "Breakout", "link": "https://trends.google.com/trends/explore?q=sam+altman+chatgpt+water+usage&date=today+3-m&geo=US" }]
        }
    ],
    "relatedTopics": null,
    "trendsUrl": "https://trends.google.com/trends/explore?q=chatgpt%2Cgemini%2Cclaude&date=today+3-m&geo=US",
    "warnings": [],
    "scrapedAt": "2026-10-28T19:42:23.060Z"
}
```

A **trending** result:

```json
{
    "type": "trending",
    "id": "675c417f4dd0a298",
    "term": "trail blazers vs lakers",
    "geo": "US",
    "hours": 24,
    "rank": 2,
    "searchVolume": 200000,
    "increasePercentage": 1000,
    "startedAt": "2026-10-28T02:00:00.000Z",
    "endedAt": null,
    "isActive": true,
    "relatedSearches": ["lakers", "lakers vs trail blazers", "damian lillard"],
    "categories": [{ "id": 17, "name": "Sports" }],
    "newsArticleCount": 63,
    "news": [
        { "title": "Game Recap: Trail Blazers 136, Lakers 129", "url": "https://www.nba.com/watch/video/game-recap-trail-blazers-136-lakers-129", "source": "NBA.com", "publishedAt": "2026-10-28T07:54:45.000Z", "picture": "https://encrypted-tbn0.gstatic.com/images?q=..." }
    ],
    "trendsUrl": "https://trends.google.com/trending?geo=US&hours=24",
    "exploreUrl": "https://trends.google.com/trends/explore?q=trail+blazers+vs+lakers&date=now+1-d&geo=US",
    "scrapedAt": "2026-10-28T19:42:01.678Z"
}
```

#### Field notes

| Field | Description |
|---|---|
| `type` | `keywords` or `trending`. The dataset has a view for each. |
| `values` | 0 to 100, relative to the highest point in the chart, one number per compared term, in the order of `searchTerms`. |
| `hasData`, `isPartial` | Google's "not enough data" flag per term, and whether the last point is still being collected. |
| `averages` | Average interest per term over the range. |
| `timeResolution` | `MINUTE`, `HOUR`, `DAY`, `WEEK` or `MONTH`, chosen by Google from the range. |
| `interestByRegion` | Sorted by the first term, highest first. City results include coordinates. |
| `relatedQueries[].rising` | `value` is the growth percentage; `formattedValue` is `Breakout` above 5,000%. |
| `searchVolume`, `increasePercentage` | Google's approximate searches (for example 200000 = "200K+") and growth. |
| `newsArticleCount`, `news` | How many articles Google links to the trend, and the top 3. |
| `warnings` | Anything Google did not return for that search, for example a chart with no data. |

#### Run summary (key-value store `OUTPUT`)

Results saved, keyword sets and trending locations requested and saved (with the error for any that failed), input errors, rate limit back-offs and HTTP stats.

### Pricing

**Pay per event: $0.002 per result saved** ($2.00 per 1,000). One result is one keyword set (all its charts for up to 5 terms) or one trending search. You are not charged for failed searches, invalid input lines or results removed by filters. The only other charge is the tiny platform run-start fee every pay-per-event Actor has.

| Run | Results | Price |
|---|---|---|
| Compare 3 brands, 12 months, US | 1 | $0.002 |
| 100 keywords for SEO research | 100 | $0.20 |
| Top 25 daily trends in 10 countries | 250 | $0.50 |
| All trends in the US for 7 days | often 500 to 1,000 | $1 to $2 |

Set **Maximum cost per run** in the run options to cap spending. The Actor stops cleanly at the cap and still writes the run summary.

### Limits and good to know

- **Google rate limits.** Google Trends limits how fast any one IP can request data and sometimes answers with HTTP 429 or a "sorry" page. The Actor never tries to solve captchas. It waits (5 s, 10 s, 20 s... up to 60 s) with a fresh session and retries, and after repeated blocks it stops starting new searches and saves what it has. Large keyword lists take about 5 to 10 seconds per search. If a run reports many back-offs, try again later or turn on Apify datacenter proxy.
- **Related topics** are off by default: Google currently returns that chart empty for automated requests. If you turn it on, an empty result is marked in `warnings`. Related queries work normally.
- A trending location Google does not support (for example `ZZ`) is reported as failed in the run summary and costs nothing.
- Values are relative (0 to 100), not absolute search counts, the same as on the website. Results for one keyword set are only comparable inside that set.
- Trending Now volumes are Google's rounded buckets (for example 20K+, 200K+).
- Default memory is 256 MB, which is plenty.

### FAQ

**Do I need an API key or a proxy?**
No. The Actor uses the same public endpoints as the Google Trends website. A proxy option exists for heavy use.

**How do I compare more than 5 terms?**
Google allows 5 per chart. Put one common anchor term in every line (for example `bitcoin, ethereum, solana, dogecoin, xrp` and `bitcoin, cardano, litecoin...`) and rescale on the anchor.

**What is the difference between 4 hours and 24 hours trending?**
4 hours is Google's realtime view; 24 hours is the classic daily trending searches list. 48 hours and 7 days look further back.

**Can I get data in another language?**
Set `hl` (for example `de` or `ja`) for labels and region names, and use the matching `geo`.

### Legal note

This Actor reads publicly available, aggregated Google Trends data. It does not log in, bypass access controls or break captchas, and it does not collect personal data. News articles are returned as headline, publisher, time and link only. You are responsible for making sure your use complies with Google's Terms of Service and applicable law. Google Trends is a trademark of Google LLC. This Actor is not affiliated with or endorsed by Google.

### Support

Something not working, or want another field? Open an issue on the Actor's **Issues** tab with your input. Contact: joesimo@mail.grokbot.com

# Actor input Schema

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

One search per line. To compare terms on the same 0 to 100 scale, put up to 5 on one line separated by commas, for example <code>bitcoin, ethereum</code>. Each line is one result. Topic IDs such as <code>/m/05p0rrx</code> also work.

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

Country code such as <code>US</code>, <code>GB</code> or <code>DE</code>, a region such as <code>US-CA</code>, or a metro such as <code>US-CA-807</code>. Leave empty for worldwide.

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

One of <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>, <code>today 5-y</code>, <code>all</code> (since 2004), or a custom range <code>YYYY-MM-DD YYYY-MM-DD</code>.

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

Google Trends category number to narrow ambiguous terms, for example 7 for Finance, 5 for Computers and Electronics, 71 for Food and Drink. 0 means all categories.

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

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

## `dataTypes` (type: `array`):

Which charts to fetch for each search. Fewer charts means fewer requests and faster runs. Related topics is off by default because Google currently returns it empty for automated requests.

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

Level for Interest by region. Auto uses countries for worldwide and states or provinces inside a country. Metro (DMA) is US only.

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

Also list regions with too little search volume to score (they come back as 0).

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

Countries to get trending searches for, for example <code>US</code>, <code>GB</code>, <code>IN</code>. Regions such as <code>US-NY</code> also work.

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

Trends from the last 4 hours (realtime), 24 hours (daily), 48 hours or 168 hours (7 days). Other values are rejected.

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

Google lists up to several hundred trends per country. 0 means all of them. You pay per saved trend.

## `trendingSortBy` (type: `string`):

Order of saved trends: Google's relevance order, highest search volume first, or most recently started first.

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

Skip trends Google marks as ended.

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

Keep only trends in these categories. Empty means all.

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

Attach the top 3 news articles (headline, URL, source, time) Google links to each saved trend. One small extra request per trend.

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

Maximum number of results to save in total (keyword sets plus trends). 0 means no limit.

## `hl` (type: `string`):

Language for labels, region names and trending data, for example <code>en-US</code>, <code>de</code>, <code>fr</code>.

## `tz` (type: `integer`):

Offset from UTC in minutes as Google expects it, for example 0 for UTC, 300 for US Eastern standard time, -60 for Central Europe. Affects day boundaries of hourly and daily data.

## `requestDelayMs` (type: `integer`):

Pause between requests to Google. Lower is faster but more likely to be rate limited.

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

On HTTP 429 the Actor waits 5, 10, 20, 40 seconds and so on with a fresh session before each retry.

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

Optional. Google Trends often rate limits shared IPs. If your runs report many rate limit backoffs, try Apify datacenter proxy first.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "iphone, galaxy, pixel"
  ],
  "geo": "US",
  "timeRange": "today 3-m",
  "category": 0,
  "property": "web",
  "dataTypes": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "regionResolution": "auto",
  "includeLowVolumeRegions": false,
  "trendingGeos": [
    "US",
    "GB"
  ],
  "trendingHours": 24,
  "maxTrendingPerGeo": 25,
  "trendingSortBy": "relevance",
  "trendingActiveOnly": false,
  "includeTrendingNews": true,
  "maxItems": 0,
  "hl": "en-US",
  "tz": 0,
  "requestDelayMs": 1500,
  "maxRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per keyword comparison set (interest over time, by region, related queries and topics) and one per trending search.

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

JSON summary with results saved, per keyword set and location status, and rate limiting stats.

# 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": [
        "chatgpt, gemini, claude"
    ],
    "geo": "US",
    "timeRange": "today 3-m",
    "trendingGeos": [
        "US"
    ],
    "maxTrendingPerGeo": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("joesimo/google-trends").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": ["chatgpt, gemini, claude"],
    "geo": "US",
    "timeRange": "today 3-m",
    "trendingGeos": ["US"],
    "maxTrendingPerGeo": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("joesimo/google-trends").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": [
    "chatgpt, gemini, claude"
  ],
  "geo": "US",
  "timeRange": "today 3-m",
  "trendingGeos": [
    "US"
  ],
  "maxTrendingPerGeo": 25
}' |
apify call joesimo/google-trends --silent --output-dataset

```

## MCP server setup

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

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/b0IOBrFHgAcFCwAQc/builds/jGFclyJyXKivZmoml/openapi.json
