# Google Trends for AI Agents: Interest, Related, Trending (`henrycrawl/google-trends-llm`) Actor

Google Trends as clean, LLM-ready JSON: interest over time with ready-made stats (average, peak, % change, rising / falling), related queries (top + rising), interest by region and Trending now for any country. Compare up to 5 keywords. Pay per keyword.

- **URL**: https://apify.com/henrycrawl/google-trends-llm.md
- **Developed by:** [Henry Crawl](https://apify.com/henrycrawl) (community)
- **Categories:** AI, SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 keyword analyseds

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 for AI Agents: Interest, Related, Trending

Google Trends data as clean JSON that an LLM or AI agent can reason about **without doing maths**: every keyword comes with its full timeline **and** ready-made stats: average, latest, peak (and when), first vs last quarter, **% change** and a plain `direction` (`rising`, `falling`, `stable`).

- **Interest over time** for any keyword, country / region, period (past hour to 2004), category and search type (Web, YouTube, News, Images, Shopping).
- **Compare** up to 5 keywords on one shared scale.
- **Related queries**: top and rising (with `Breakout` / `+2,250%`).
- **Interest by region**: where people search it most.
- **Trending now**: what a country is searching right now, with approximate traffic and the news behind it.

No API key, no login. Errors come back as **free** rows with a clear `status`.

### Example output (one keyword)

```json
{
  "type": "keyword",
  "status": "OK",
  "keyword": "bitcoin",
  "geo": "US",
  "timeframe": "past-90-days",
  "resolution": "DAY",
  "stats": {"average": 47.7, "latest": 55, "peak": 100, "peakDate": "2026-08-21T00:00:00+00:00",
            "firstQuarterAverage": 58.8, "lastQuarterAverage": 43.9, "changePercent": -25.4, "direction": "falling"},
  "timeline": [{"date": "2026-08-16T00:00:00+00:00", "label": "Aug 16, 2026", "value": 61, "hasData": true, "isPartial": false}],
  "relatedQueries": {"top": [{"query": "bitcoin price", "value": 100}],
                     "rising": [{"query": "british man recovers lost bitcoin", "formattedValue": "Breakout"}]},
  "interestByRegion": [{"geoCode": "US-ID", "geoName": "Idaho", "value": 93}],
  "valuesAreRelativeTo": "this keyword alone (100 = its own peak)"
}
```

Trending now row:

```json
{"type": "trending-search", "geo": "MX", "rank": 1, "title": "selección de fútbol de costa rica",
 "approxTraffic": "5000+", "approxTrafficMin": 5000, "startedAt": "2026-11-14T12:50:00+00:00",
 "news": [{"title": "...", "url": "https://...", "source": "ESPN"}]}
```

### Input

```json
{
  "keywords": ["bitcoin", "ethereum"],
  "compareKeywords": true,
  "geo": "US",
  "timeframe": "past-90-days",
  "searchProperty": "web",
  "trendingNowCountries": ["US", "MX", "DE"]
}
```

### Pricing (pay per event)

| Event | Price |
|---|---|
| `keyword` | **$2 / 1,000 keywords** (timeline + stats + related queries + regions in one row) |
| `trending-search` | **$0.80 / 1,000** trending searches |

Residential proxy included. Error rows are free.

### FAQ

**What do the numbers mean?** Google Trends values are relative (0-100), not search counts. 100 is the peak for the keyword (or for the whole comparison when `compareKeywords` is on). The field `valuesAreRelativeTo` says which.

**Why is there no data for my keyword?** Very rare searches have no Trends data; you get a free `NO_DATA` row.

**Rate limits?** Google limits automated traffic. The actor paces requests and retries from a new IP with back-off. If Google still refuses, you get a free `RATE_LIMITED` row.

### Related actors

- [YouTube Transcript for LLM & RAG](https://apify.com/henrycrawl/youtube-transcript-llm)

# Actor input Schema

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

Search terms to analyse. One output row per keyword.

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

2-letter country code (US, MX, DE...) or region code (US-CA). Empty = worldwide.

## `timeframe` (type: `string`):

Period to analyse. Short ranges give hourly / daily points, long ranges weekly / monthly.

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

On: keywords are compared in groups of 5 on one shared 0-100 scale (like the Compare box on Google Trends). Off: each keyword is scaled on its own.

## `searchProperty` (type: `string`):

Web search, YouTube, News, Images or Google Shopping searches.

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

Google Trends category number (0 = all categories, e.g. 7 = Finance, 18 = Shopping, 958 = Jobs).

## `includeRelated` (type: `boolean`):

Top and rising related searches (rising shows 'Breakout' or +% growth).

## `includeRegions` (type: `boolean`):

Where the keyword is searched the most.

## `maxRegions` (type: `integer`):

How many top regions to return per keyword (1-250).

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

2-letter country codes for Google's 'Trending now' list (what people search right now, with traffic and news).

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

Language of region names and related queries, e.g. en-US, es-419, de.

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

Google rate-limits datacenter IPs. Default: Apify residential proxy (included in the price).

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "geo": "",
  "timeframe": "past-12-months",
  "compareKeywords": false,
  "searchProperty": "web",
  "category": 0,
  "includeRelated": true,
  "includeRegions": true,
  "maxRegions": 20,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Keyword rows, trending searches and free error rows.

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

Counts for this run (SUMMARY record).

# 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": [
        "artificial intelligence"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("henrycrawl/google-trends-llm").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": ["artificial intelligence"] }

# Run the Actor and wait for it to finish
run = client.actor("henrycrawl/google-trends-llm").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": [
    "artificial intelligence"
  ]
}' |
apify call henrycrawl/google-trends-llm --silent --output-dataset

```

## MCP server setup

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

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/DB0sKlhNff2idsayn/builds/dEbfRLZeMUKgdJZBW/openapi.json
