# Google Trends data scraper (`data_dino/google-trends-scraper`) Actor

Collect Google Trends search interest, regional breakdowns, related queries/topics, and daily trending searches from Google's own Trend endpoints — no API key, no login.

- **URL**: https://apify.com/data_dino/google-trends-scraper.md
- **Developed by:** [Data Dino](https://apify.com/data_dino) (community)
- **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 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 data scraper

Pull search-interest and trending data from Google Trends in one Apify run — no API key, no login. Compare up to five search terms on a shared interest scale, drill into regional popularity, pull related queries and topics, or collect the day's trending searches with their news articles. Results come back as structured records ready for JSON, CSV, or Excel export.

### Why use this actor?

- **Compare search terms** — see the relative popularity of 1–5 keywords (e.g. `ChatGPT`, `Gemini`, `Copilot`) over time on a 0–100 scale.
- **Region and city insight** — interest by country, DMA/metro area, or city for any keyword.
- **Related queries & topics** — grab the top and rising related searches beside your keyword.
- **Daily trending searches** — the latest trending searches for a country, each with related queries and linked news articles.
- **Flexible inputs** — country, time frame or custom date range, Google property (web/news/images/YouTube/Shopping), category, and a row cap.
- **Resilient collection** — managed rotating-proxy support and automatic retries keep runs stable under Google's per-IP request limits.

### Input

All fields are optional; defaults compare `ChatGPT` in the US over the last 12 months and return interest-over-time rows.

| Field | Type | Default | Description |
|---|---|---:|---|
| `keywords` | string array | `["ChatGPT"]` | 1–5 search terms to compare on one 0–100 scale. |
| `geo` | string | `US` | 2-letter country code, or empty for worldwide. |
| `timeframe` | enum | `today 12-m` | Preset window (`now 1-H` … `all`). |
| `customTimeRange` | string | *(empty)* | Exact range `YYYY-MM-DD YYYY-MM-DD`, overrides `timeframe`. |
| `property` | enum | `web` | Google property: web, news, images, youtube, shopping. |
| `category` | integer | `0` | Google Trends category id (0 = all). |
| `dataTypes` | string array | `["interest_over_time"]` | Which datasets to collect: interest_over_time, interest_by_region, related_queries, related_topics, trending_searches. |
| `trendingSearchesGeo` | string | *(empty)* | Country for trending searches (defaults to `geo`). |
| `resolution` | enum | `REGION` | Granularity for regional rows: REGION, DMA, CITY. |
| `maxResults` | integer | `10` | Stop after this many rows. |
| `useProxy` | boolean | `true` | Managed rotating-proxy support. Disable only for exploratory calls. |
| `delay` | number | `0.8` | Seconds between requests. |

#### Example input

```json
{
  "keywords": ["ChatGPT"],
  "geo": "US",
  "timeframe": "today 12-m",
  "dataTypes": ["interest_over_time"],
  "maxResults": 10,
  "useProxy": true
}
```

### Output

The actor pushes **one dataset item per explore request** — matching the official
`apify/google-trends-scraper` output shape. Each item carries metadata (`inputUrlOrTerm`,
`searchTerm`, `geo`, `timeframe`, `category`, `property`, `scraped_at`, `source_url`) plus
nested arrays for the requested data types:

- `interestOverTime_timelineData` — dated time-series entries; `value` / `hasData` /
  `formattedValue` are arrays across the compared terms, plus `interestOverTime_averages`.
- `interestBySubregion` (or `interestByDma` / `interestByCity`) — region code, name, value,
  formatted value, data-availability (per compared term).
- `relatedQueries_top` / `relatedQueries_rising` — query, value, formatted value,
  data-availability, link.
- `relatedTopics_top` / `relatedTopics_rising` — topic (mid/title/type), value, formatted
  value, link. Empty for anonymous sessions; requires signed-in Google cookies to unlock.
- **trending_search** items are yielded per trending search: title, traffic, country, date,
  related queries, and linked news articles.

A representative item (interest over time + by region + related queries):

```json
{
  "inputUrlOrTerm": "ChatGPT",
  "searchTerm": "ChatGPT",
  "geo": "US",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "web",
  "scraped_at": "2026-11-09T08:32:24+00:00",
  "source_url": "https://trends.google.com/trends/explore?q=ChatGPT&geo=US&date=today%2012-m",
  "interestOverTime_timelineData": [
    { "time": "1762646400", "formattedTime": "Nov 9 – 15, 2025",
      "formattedAxisTime": "Nov 9, 2025", "value": [100],
      "hasData": [true], "formattedValue": ["100"] }
  ],
  "interestOverTime_averages": [],
  "interestBySubregion": [
    { "geoCode": "US-CA", "geoName": "California", "value": [100],
      "formattedValue": ["100"], "maxValueIndex": 0, "hasData": [true] }
  ],
  "relatedQueries_top": [
    { "query": "ai chatgpt", "value": 100, "formattedValue": "100",
      "hasData": true, "link": "/trends/explore?q=ai+chatgpt&date=today+12-m&geo=US" }
  ],
  "relatedQueries_rising": []
}
```

### Practical limitations

- Results reflect Google Trends at run time and may change as Google updates its data.
- Google enforces a per-IP request budget (roughly 40–60 API calls, then a temporary 429). The managed proxy option rotates the exit IP to stay under it; without it, only a handful of requests will succeed.
- `related_topics` is not available to anonymous sessions and returns empty arrays unless
  signed-in Google cookies are supplied.
- Use collected information in accordance with Google's terms and applicable privacy and data-use requirements.

# Actor input Schema

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

1–5 search terms compared on one 0–100 scale. Only used by the non-trending data types.

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

2-letter country code (e.g. US, GB, DE). Leave empty for worldwide.

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

Preset window for the trend data.

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

Exact range 'YYYY-MM-DD YYYY-MM-DD'. Overrides time frame.

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

Which Google search property the trends come from.

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

Google Trends category id (0 = all categories).

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

Which trend datasets to collect. Trending searches needs no keyword; the others use the keyword list.

## `trendingSearchesGeo` (type: `string`):

Country for trending_searches. Defaults to the country (geo) field.

## `resolution` (type: `string`):

Granularity for interest_by_region rows.

## `maxResults` (type: `integer`):

Stop after this many rows across all requested data types.

## `useProxy` (type: `boolean`):

Use a rotating residential proxy to stay under Google's per-IP request budget. Disable only for a couple of exploratory calls.

## `delay` (type: `number`):

Seconds between requests.

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

UI locale, e.g. en-US.

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

Timezone offset in minutes from UTC.

## Actor input object example

```json
{
  "keywords": [
    "ChatGPT"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "customTimeRange": "",
  "property": "web",
  "category": 0,
  "dataTypes": [
    "interest_over_time"
  ],
  "trendingSearchesGeo": "",
  "resolution": "REGION",
  "maxResults": 10,
  "useProxy": true,
  "delay": 0.8,
  "hl": "en-US",
  "tz": 0
}
```

# Actor output Schema

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

All scraped Google Trends items. Each explore item carries inputUrlOrTerm, searchTerm, geo, timeframe, category, property, scraped_at, source_url, plus nested arrays for the requested data types: interestOverTime_timelineData / interestOverTime_averages, interestBySubregion / interestByDma / interestByCity, relatedQueries_top / relatedQueries_rising, and relatedTopics_top / relatedTopics_rising. Trending items carry type=trending_search with title, traffic, geo, date, related_queries, and articles.

# 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("data_dino/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 = {}

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

```

## MCP server setup

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