# Google Trends API – Interest, Regions & Related Queries (`glidepath/google-trends-scraper`) Actor

Google Trends without a browser. Input: up to 5 keywords per comparison, country, time range. Output: interest over time, by region, related queries & topics, plus daily trending searches. $3.50/1k results.

- **URL**: https://apify.com/glidepath/google-trends-scraper.md
- **Developed by:** [Glidepath](https://apify.com/glidepath) (community)
- **Categories:** SEO tools, Marketing, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 result rows

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

Get Google Trends data as clean JSON without a browser: **interest over time**, **interest by region**, **related queries** and **related topics** (top and rising) for up to 5 compared keywords per search, plus today's **trending searches** for any country.

One result row per keyword, with every section you asked for inside it, so a 3-keyword comparison is 3 rows. The same 0-100 scale as trends.google.com.

### Who uses it

- **SEO and content teams**: find rising queries before they peak, and compare topic ideas.
- **Marketers and product managers**: seasonality, launch timing, and which regions care most about a product.
- **Analysts and data scientists**: weekly or monthly interest series as a feature in forecasting models.
- **Newsrooms and social teams**: what a country is searching for right now, with the related headlines.

### How to use it

1. Enter one search per line in **Search terms**. Separate up to 5 terms with commas to compare them (`python, javascript`).
2. Pick a **country or region** (empty = worldwide), a **time range**, and optionally the **search type** (web, images, news, Shopping, YouTube).
3. Run it, and download the results as JSON, CSV or Excel, or call it from the API, Make, Zapier, n8n or an AI agent (MCP).

Add country codes to **Daily trending searches** to also get today's trending searches for those countries.

### Input example

```json
{
  "searchTerms": ["python, javascript", "coffee"],
  "geo": "US",
  "timeRange": "today 12-m",
  "include": ["interestOverTime", "interestByRegion", "relatedQueries", "relatedTopics"],
  "trendingCountries": ["US"],
  "maxTrendingPerCountry": 10
}
```

### Output example

A keyword row (arrays shortened):

```json
{
  "type": "keyword",
  "keyword": "python",
  "comparedWith": ["javascript"],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "averageInterest": 63,
  "interestOverTime": [
    {"date": "2025-09-21T00:00:00Z", "formattedTime": "Sep 21 – 27, 2025", "value": 68, "hasData": true, "isPartial": false}
  ],
  "interestByRegion": [{"geoCode": "US-WY", "geoName": "Wyoming", "value": 100}],
  "relatedQueries": {
    "top": [{"query": "what is python", "value": 100, "formattedValue": "100"}],
    "rising": [{"query": "python 3.14", "value": 13000, "formattedValue": "Breakout"}]
  },
  "relatedTopics": {"top": [], "rising": []},
  "trendsUrl": "https://trends.google.com/trends/explore?q=python%2Cjavascript&date=today+12-m&geo=US",
  "scrapedAt": "2026-09-26T08:00:00Z"
}
```

A trending-search row:

```json
{
  "type": "trendingSearch",
  "keyword": "hotel",
  "approxTraffic": "200+",
  "approxTrafficMin": 200,
  "startedAt": "2026-09-26T07:20:00Z",
  "newsItems": [{"title": "…", "url": "https://…", "source": "USA Today"}],
  "geo": "US",
  "trendsUrl": "https://trends.google.com/trending?geo=US",
  "scrapedAt": "2026-09-26T08:00:00Z"
}
```

| Field | Type | Description |
|---|---|---|
| `type` | string | `keyword` or `trendingSearch` |
| `keyword` | string | The search term, or the trending search |
| `comparedWith` | array | Other terms in the same comparison (same 0-100 scale) |
| `geo` | string | Country/region code, or `WORLDWIDE` |
| `timeRange` | string | Period analysed |
| `category` | integer | Google Trends category id (0 = all) |
| `searchType` | string | web, images, news, shopping or youtube |
| `averageInterest` | integer | Average interest for the period (0-100): Google's own average, or the mean of the points when Google gives none |
| `interestOverTime` | array | `date` (ISO UTC), `formattedTime`, `value` 0-100, `hasData`, `isPartial` |
| `interestByRegion` | array | `geoCode`, `geoName`, `value` 0-100 |
| `relatedQueries` | object | `top` and `rising`: `query`, `value`, `formattedValue` ("Breakout" = +5000% or more) |
| `relatedTopics` | object | `top` and `rising`: `title`, `type`, `mid`, `value`, `formattedValue` |
| `approxTraffic` | string | Trending searches: approximate searches, e.g. `200K+` |
| `approxTrafficMin` | integer | `approxTraffic` as a number (lower bound) |
| `startedAt` | string | Trending searches: when the trend started (ISO UTC) |
| `newsItems` | array | Trending searches: related news `title`, `url`, `source` |
| `trendsUrl` | string | The same view on trends.google.com |
| `scrapedAt` | string | ISO 8601 UTC |

A run summary (per search: rows saved, notes, errors) is saved as `SUMMARY` in the run's key-value store.

### Pricing

Pay per result: **$3.50 per 1,000 result rows**, the same price on every Apify plan. A row is one keyword of one search (with every section you selected) or one trending search. Keywords for which Google has no data are not saved and not charged.

- Weekly check of 250 keywords in one country → about 1,000 rows/month → **$3.50/month**.
- One-off research on 2,000 keywords → **$7.00**.
- 10,000 keyword rows → **$35.00**.

A small start fee of $0.00005 per run applies. Set a maximum cost per run in Apify and the Actor stops cleanly when it is reached.

### Limits and notes

- Values are relative (0-100), exactly as Google Trends shows them, not absolute search volumes. Terms are only comparable within the same search.
- Up to 5 terms per comparison (a Google limit). Put unrelated terms on separate lines.
- Related topics: Google currently often returns no related topics for automated requests. The field is then empty (`top: []`); it is never filled with made-up data.
- Daily trending searches come from Google Trends' public RSS feed (usually 10-25 per country).
- Google occasionally rate-limits requests. The Actor retries politely and, if needed, switches to an Apify datacenter proxy. If Google still refuses, the search is reported in `SUMMARY` and not charged.
- Only Google Trends' public JSON and RSS endpoints are read. No login, no cookies from any account, no CAPTCHA solving.

### FAQ

**Is it legal to use?** The Actor reads public, aggregated and anonymised Google Trends statistics through the same public endpoints trends.google.com uses, and it respects Google's robots.txt. It collects no personal data. You are responsible for how you use the data; if in doubt, ask a lawyer.

**Why do my numbers differ slightly from the website?** Google samples Trends data, so repeated requests can differ by a few points, especially for small regions or short periods.

**Can I get absolute search volumes?** No. Google Trends only publishes relative interest (0-100).

**How do I monitor keywords every week?** Save the input as a Task in Apify and add a schedule. Each run returns fresh rows.

**Can an AI agent use it?** Yes. The Actor works as an MCP tool, and the input is plain keywords, a country code and a time range.

### Changelog

See [CHANGELOG.md](CHANGELOG.md).

### Support

Found a problem or need a field? Open an issue on the Actor's Issues tab. We read every one and usually reply within 2 business days.

# Changelog

This Actor's version history is a separate document: https://apify.com/glidepath/google-trends-scraper/changelog.md

# Actor input Schema

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

One search per line. Separate up to 5 terms with commas to compare them on one 0-100 scale (e.g. 'python, javascript'). Each term becomes one result row.

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

ISO country code like 'US', 'DE', 'GB' or a region like 'US-CA'. Leave empty for worldwide.

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

Period to analyse. Google picks the resolution (minutes, hours, days, weeks or months).

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

Optional exact period 'YYYY-MM-DD YYYY-MM-DD' (e.g. '2025-01-01 2025-06-30'). Overrides Time range.

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

Optional Google Trends category id (0 = all categories, e.g. 13 = Internet & Telecom).

## `searchType` (type: `string`):

Which Google search property to analyse.

## `include` (type: `array`):

Fewer sections = faster runs. Price is per result row, not per section.

## `trendingCountries` (type: `array`):

Country codes (e.g. 'US', 'GB', 'IN') to also fetch today's trending searches from Google Trends' public RSS feed. One row per trending search.

## `maxTrendingPerCountry` (type: `integer`):

Leave empty for all (usually 10-25).

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

Stop after this many rows. Leave empty for no limit (your maximum cost per run still applies).

## Actor input object example

```json
{
  "searchTerms": [
    "python, javascript",
    "coffee"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "include": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "relatedTopics"
  ]
}
```

# Actor output Schema

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

No description

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

No description

# 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": [
        "python, javascript",
        "coffee"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("glidepath/google-trends-scraper").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": [
        "python, javascript",
        "coffee",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("glidepath/google-trends-scraper").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": [
    "python, javascript",
    "coffee"
  ]
}' |
apify call glidepath/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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

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/xJ390XedVvS03buYh/builds/T2Bxu4IZb93SVU7vr/openapi.json
