# Google Trends API: Interest Over Time, Regions, Related Queries (`siftwright_data/google-trends-api`) Actor

Reliable Google Trends data for any keyword: interest over time with a ready summary, interest by country, state or city, rising and top related queries, and today's trending searches. Auto-retries rate limits; failed keywords are free.

- **URL**: https://apify.com/siftwright_data/google-trends-api.md
- **Developed by:** [Siftwright Data](https://apify.com/siftwright_data) (community)
- **Categories:** SEO tools, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 keyword analyzeds

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, Regions, Related Queries

Get **Google Trends data for any keyword** as clean JSON, CSV or Excel: interest over time, interest by country, state or city, rising and top related queries, and today's trending searches with news links.

Built to **finish reliably**. Google Trends rate-limits hard, so this actor paces its requests, backs off and retries automatically, and **never charges for a keyword it couldn't fetch**. In our tests, 25 keywords plus trending searches for 3 countries finished in about 3 minutes with zero failures.

### What you get per keyword

| Field | What it is |
|---|---|
| `interestOverTime` | Timeline of interest (0-100) for the chosen period |
| `summary` | Average interest, peak date, latest value and the change from the first to the last quarter of the period, so you can rank keywords without a spreadsheet |
| `interestByRegion` | Interest per country, or per state, city or US metro when you set a location |
| `relatedQueries` | Top and rising related searches, with "Breakout" flags |
| `relatedTopics` | Top and rising related topics (optional; Google returns these only for some keywords) |

Plus, optionally, **Trending now**: today's top trending searches for any countries you list, with approximate traffic, start time and the news stories behind each one.

### Use cases

- **SEO and content planning:** find rising queries before they peak, and compare topics on one 0-100 scale.
- **Product and market research:** seasonality, regional demand, and whether a category is growing or shrinking.
- **Investing and e-commerce signals:** track brand, product or ticker interest daily on a schedule.
- **Newsrooms and social media:** pull trending searches every hour with the stories behind them.
- **AI agents and dashboards:** compact, stable JSON with a ready-made summary per keyword.

### Input

```json
{
  "keywords": ["air fryer", "pressure cooker", "slow cooker"],
  "compare": true,
  "geo": "US",
  "timeRange": "today 5-y",
  "includeInterestByRegion": true,
  "regionResolution": "REGION",
  "trendingNowGeos": ["US", "GB"]
}
```

- **Keywords:** any search terms. Each one gets its own result, or turn on **Compare** to put up to 5 on the same scale (more are compared in groups of 5).
- **Location:** a country or region code such as `US`, `GB`, `DE` or `US-CA`. Empty means worldwide.
- **Time range:** past hour to 2004-present. A custom range like `2024-01-01 2024-12-31` works through the API.
- **Category and search type:** narrow to a Google Trends category, or measure Image, News, Shopping or YouTube search instead of web search.

### Output example

```json
{
  "type": "keyword",
  "keyword": "bitcoin",
  "geo": "US",
  "timeRange": "today 12-m",
  "summary": { "averageInterest": 34.1, "peakDate": "2026-02-01", "latestValue": 15, "changeFirstToLastQuarterPct": -48 },
  "interestOverTime": [{ "date": "2025-10-12", "time": 1760227200, "value": 41 }],
  "interestByRegion": [{ "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 }],
  "relatedQueries": {
    "top": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100" }],
    "rising": [{ "query": "how to buy bitcoin safely", "value": 10050, "formattedValue": "Breakout" }]
  },
  "scrapedAt": "2026-10-14T13:06:05.921Z"
}
```

Trending searches come as separate items with `type: "trendingNow"`, `rank`, `title`, `approxTraffic`, `startedAt` and `news`.

### Pricing

- **$4 per 1,000 keywords** analyzed (all selected data for that keyword is included).
- **$1 per 1,000 trending searches.**
- Keywords that fail are free. Set a maximum cost per run and the actor stops cleanly at the limit.

### Tips

- Google Trends values are relative (0-100 within your query), not search volumes. Compare keywords in one run to see them on the same scale.
- Short periods (past hour, past day) are noisier; past 12 months or 5 years suits seasonality.
- Schedule a daily run with the same keywords to build your own history.
- A keyword with too little search interest returns an empty timeline; that's Google's data, not an error.

### FAQ

**Is this legal?** It reads the same public, aggregated, anonymous data that anyone sees on trends.google.com. No personal data is collected.

**Why do some runs start slower?** Google sometimes rate-limits the first request. The actor waits and retries rather than failing.

**Missing a feature?** Request it in the Issues tab.

### About Siftwright

Siftwright is a small data-tools studio. Tools are built and maintained with AI-powered tooling and monitored daily.

# Actor input Schema

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

Search terms to analyze. Each keyword gets its own result.

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

Put up to 5 keywords on the same 0-100 scale, like the compare view on Google Trends. More than 5 are compared in groups of 5.

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

Country or region code, e.g. US, GB, DE, US-CA. Leave empty for worldwide.

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

Period to cover. For a custom range use 'YYYY-MM-DD YYYY-MM-DD' in the API.

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

Google Trends category id, e.g. 0 = all, 71 = food & drink, 958 = jobs.

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

Which Google search to measure.

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

Timeline of interest (0-100) plus a summary: average, peak date, latest value and trend.

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

Interest per country, or per region/city when a location is set.

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

Breakdown level for interest by region.

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

Top and rising related searches.

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

Top and rising related topics. Google only returns these for some keywords; when it returns none, the field is left out.

## `trendingNowGeos` (type: `array`):

Country codes (e.g. US, GB, IN) to also fetch today's trending searches with traffic estimates and news links.

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

Language for topic and region names.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "remote jobs"
  ],
  "compare": false,
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "trendingNowGeos": [],
  "language": "en-US"
}
```

# Actor output Schema

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

All items saved by the run.

# 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": [
        "chatgpt",
        "remote jobs"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("siftwright_data/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": [
        "chatgpt",
        "remote jobs",
    ] }

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

```

## MCP server setup

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