# Google Trends Scraper: Reliable, Pay Only for Results (`green_trousers/google-trends-reliable`) Actor

The dependable Google Trends scraper. Interest over time with rising/falling momentum, interest by region, top and rising related queries, and trending-now searches. Self-healing retries, clean finishes inside your time limit, and failed keywords are free.

- **URL**: https://apify.com/green_trousers/google-trends-reliable.md
- **Developed by:** [Omar Prime](https://apify.com/green_trousers) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 keyword reports

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 Scraper: Reliable, Pay Only for Results

**The Google Trends scraper built to finish the job.** Google rate-limits automated Trends traffic, and that's where most scrapers break: runs crash, time out, or come back empty while still charging you. This one was engineered around those limits from day one.

### Why it's the better choice

| | This Actor |
|---|---|
| **Finishes inside its time limit** | When Google pushes back, the run pauses, refreshes its session and resumes on its own, and it always stops cleanly before the run's time limit. Anything it truly can't get is listed with the reason. |
| **Pay only for data you get** | A keyword that fails is **free**. You're only charged for keyword reports that come back with data. |
| **Ready-made insights** | Every keyword includes a trend summary: average, peak and date, latest value, and **momentum** (rising / steady / falling) so you don't have to crunch the chart yourself. |
| **Everything in one report** | Interest over time, interest by region (country, state, metro or city), top and rising related queries, all in one tidy item per keyword. |
| **Trending now, too** | Today's trending searches for any country, with approximate search volume and the news stories behind them. |
| **Survives restarts** | Progress is checkpointed, so a platform migration never re-runs or re-charges finished keywords. |
| **You control the wait** | Set how long the run may wait out Google's limits. It always ends on time. |

### Input

| Field | Example |
|---|---|
| Keywords | `air fryer`, `pumpkin spice` |
| Compare keywords against each other | `true` puts up to 5 on one 0–100 scale |
| Country or region | `US`, `CA`, `GB`, `US-CA`; empty = worldwide |
| Time range | Past hour to 2004–present, or custom `2025-01-01 2025-06-30` |
| Category / Search type | Food & Drink, Shopping...; Web, YouTube, News, Images, Google Shopping |
| Data to include | Interest over time, by region, related queries |
| Trending now: countries | `US`, `CA` |

### Output

```json
{
  "type": "keyword",
  "keywords": ["pumpkin spice"],
  "geo": "US",
  "status": "ok",
  "interestOverTime": [{
    "keyword": "pumpkin spice",
    "summary": { "average": 31, "peakValue": 100, "peakDate": "2026-08-26", "latestValue": 26, "momentumPercent": 13, "trend": "rising" },
    "series": [{ "date": "2026-07-22", "label": "Jul 22, 2026", "value": 18, "isPartial": false }]
  }],
  "interestByRegion": [{ "geoCode": "US-WV", "name": "West Virginia", "values": { "pumpkin spice": 100 } }],
  "relatedQueries": {
    "top": [{ "query": "pumpkin spice latte", "value": 100, "label": "100" }],
    "rising": [{ "query": "dunkin free pumpkin spice latte", "value": 82400, "label": "Breakout" }]
  }
}
```

```json
{ "type": "trending", "geo": "CA", "rank": 1, "query": "wild vs oilers", "approxSearches": "1000+", "news": [{ "title": "...", "source": "Sportsnet", "url": "..." }] }
```

Every item has a `status`: `ok`, `partial` (some sections missing, listed in `errors`) or `failed` (not charged).

### Pricing

- **$2.50 per 1,000 keyword reports**, charged only when data comes back
- **$0.50 per 1,000 trending searches**

### Good to know

- Google limits how fast anyone can pull Trends data. Big jobs run steadily rather than in one burst; set *Max time to wait out Google limits* to fit your schedule.
- Values are Google's relative 0–100 interest scores, exactly as on trends.google.com.
- Uses Google's public Trends pages and official trending RSS feed. Not affiliated with Google.

### Use cases

SEO keyword research, seasonal product planning, content calendars, market and investment research, daily trend alerts to Slack or Sheets via Apify schedules and integrations, and feeding AI agents fresh demand signals.

# Actor input Schema

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

Search terms to look up. Each keyword gets its own report.

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

Put keywords on the same 0-100 scale, in groups of up to 5 (like typing them together on Google Trends).

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

ISO code like US, CA, GB, or a region like US-CA. Empty = worldwide.

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

Period to analyze.

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

Overrides the time range, e.g. 2025-01-01 2025-06-30.

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

Google Trends category number (0 = all categories, 71 = Food & Drink, 18 = Shopping...).

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

Which Google search to measure.

## `sections` (type: `array`):

Pick what each keyword report contains.

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

Breakdown level for interest by region. Auto picks Google's default.

## `trendingGeos` (type: `array`):

Also collect what is trending right now in these countries (e.g. US, CA, GB).

## `maxTrendingPerGeo` (type: `integer`):

Maximum trending searches to return per country.

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

Language for labels, e.g. en-US, fr-CA, es-MX.

## `maxWaitMinutes` (type: `integer`):

If Google rate-limits the run, we pause and resume automatically. After this many minutes of total waiting, any remaining keywords are returned as failed and are not charged.

## Actor input object example

```json
{
  "keywords": [
    "air fryer",
    "pumpkin spice"
  ],
  "compareKeywords": false,
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchType": "",
  "sections": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries"
  ],
  "regionResolution": "",
  "trendingGeos": [],
  "maxTrendingPerGeo": 25,
  "language": "en-US",
  "maxWaitMinutes": 10
}
```

# Actor output Schema

## `results` (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 = {
    "keywords": [
        "air fryer",
        "pumpkin spice"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("green_trousers/google-trends-reliable").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": [
        "air fryer",
        "pumpkin spice",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("green_trousers/google-trends-reliable").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": [
    "air fryer",
    "pumpkin spice"
  ]
}' |
apify call green_trousers/google-trends-reliable --silent --output-dataset

```

## MCP server setup

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

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/CYKL7cPfuZce4zAZI/builds/TcMhWKgdhVeG5FuTw/openapi.json
