# Google Trends Explorer (`outstanding_vegetable/google-trends-explorer`) Actor

Google Trends data for up to 5 keywords: interest over time, interest by region, and top/rising related queries and topics. Any country, any time range, web/YouTube/news/images/shopping. No cookies, no browser.

- **URL**: https://apify.com/outstanding\_vegetable/google-trends-explorer.md
- **Developed by:** [Peter Skotte](https://apify.com/outstanding_vegetable) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 records

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Trends Scraper — interest over time, by region, related queries & topics

Pull Google Trends data for up to five keywords at once: **interest over time**, **interest by
region**, and **top and rising related queries and topics**. Any country or region, any time range
from the past day to 2004–present, and any Google property (web, YouTube, news, images, shopping).

No cookies, no login, no browser. Residential proxy is included by default — Google rate-limits
datacenter IPs on the first request.

### Input

| Field | Default | Notes |
|---|---|---|
| `keywords` | `["python"]` | Up to 5 terms, compared on the same 0–100 scale |
| `geo` | `US` | Country code, region code (`US-TX`), or empty for worldwide |
| `timeRange` | `today 12-m` | `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all` |
| `category` | `0` | Google Trends category ID |
| `searchType` | `web` | `web`, `images`, `news`, `youtube`, `froogle` |
| `dataTypes` | time + related queries | Any of `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics` |
| `maxItems` | `100` | Cap on records |

### Output

One record per data point, tagged by `dataType`:

```json
{ "dataType": "interestOverTime", "keyword": "python", "date": "Sep 7 – 13, 2025", "timestamp": 1757203200, "value": 78, "formattedValue": "78", "isPartial": false, "geo": "US", "timeRange": "today 12-m", "searchType": "web" }
{ "dataType": "interestByRegion", "keyword": "python", "geoCode": "US-CA", "geoName": "California", "value": 100 }
{ "dataType": "relatedQueries", "keyword": "python", "rankType": "rising", "rank": 1, "query": "python 3.14", "value": 2350, "formattedValue": "Breakout", "link": "https://trends.google.com/trends/explore?q=python+3.14&date=today+12-m&geo=US" }
{ "dataType": "relatedTopics", "keyword": "python", "rankType": "top", "rank": 1, "topic": "Python", "topicType": "Programming language", "value": 100 }
```

Values are Google's relative 0–100 index. Rising items with `formattedValue: "Breakout"` grew more
than 5000%.

### Use cases

Keyword and content research, product-demand tracking, seasonality analysis, brand monitoring
across regions, and feeding forecasting models with search-interest signals.

### Notes

- Google compares at most 5 keywords per query; run the actor multiple times for more.
- Interest by region skips regions with no data.

# Actor input Schema

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

Up to 5 search terms to compare (Google's limit per query).

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

ISO country code (US, GB, DE…), a region code like US-TX, or empty for worldwide.

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

Google Trends time window.

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

Google Trends category number (0 = all categories).

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

Which Google property to measure.

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

Which Google Trends widgets to return.

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

Cap on records returned (time points + regions + related terms).

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

Residential proxy is required — Google rate-limits datacenter IPs immediately.

## Actor input object example

```json
{
  "keywords": [
    "python"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "web",
  "dataTypes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset of Trends data points (JSON).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("outstanding_vegetable/google-trends-explorer").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("outstanding_vegetable/google-trends-explorer").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 '{}' |
apify call outstanding_vegetable/google-trends-explorer --silent --output-dataset

```

## MCP server setup

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

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/tuthQiXMfHkAf18Zl/builds/YEPAxfqcquwchVAHK/openapi.json
