# Google Trends Scraper – Tube Atlas & Search Interest (`utils/google-trends-actor`) Actor

Scrape Google Trends at scale: interest-over-time for up to 200 keywords, regional breakdown, custom date ranges and 5 search types (Web, Images, News, YouTube, Shopping), plus live Trending Searches by country. Fully automated — add keywords, get clean JSON straight to your dataset.

- **URL**: https://apify.com/utils/google-trends-actor.md
- **Developed by:** [Oliver Queen](https://apify.com/utils) (community)
- **Categories:** Automation, E-commerce, SEO tools
- **Stats:** 2 total users, 2 monthly users, 66.7% runs succeeded, 2 bookmarks
- **User rating**: 4.50 out of 5 stars

## Pricing

from $1.50 / 1,000 keyword analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, Trending Now & Regional Data

Scrape Google Trends at scale: interest-over-time series for any keyword, daily trending searches per country, and regional interest breakdown - clean JSON straight to your dataset. Built for SEO research, content planning, market intelligence and brand monitoring.

### What it does

- **Interest over time** for any keyword - 0-100 popularity score per day/hour/week
- **Daily trending searches** per country (US, VN, GB, IN, JP, ...) with traffic estimates
- **5 search types** - Web, Images, News, YouTube, Google Shopping
- **Regional breakdown** by state and city for each keyword
- **Flexible time windows** - preset (past hour to all time) or exact custom range from 2004-01-01 to today
- **Bulk keyword queries** - up to 200 keywords per run
- **Live trending** - perfect for content discovery and competitor monitoring

### Quick start (keyword mode)

1. Pick **Mode = keyword**
2. Paste up to 200 keywords
3. Choose country, time range and search property (Web is recommended)
4. (Optional) tick *Fetch regional data* for state-level interest
5. Run

Each successful keyword produces one clean JSON row in your dataset - ready to export to CSV, push to a webhook, or feed into your analytics pipeline.

#### Custom date range

Fill *Custom time range* to override the preset window, e.g. `2022-11-01 2022-12-18`.

Rules: valid calendar dates, start on or before end, start on or after 2004-01-01, end not in the future. Invalid ranges fail the run immediately with a clear error message instead of producing empty data.

> Note on News Search: Google Trends has limited historical coverage for news. For older date ranges many keywords legitimately return no news volume even on Google's own UI. For historical research prefer Web Search.

### Quick start (trending mode)

1. Pick **Mode = trending**
2. Choose country, time period (4 / 24 / 48 / 168 hours) and category filter
3. Run

Get the top trending searches right now, sorted by search volume, recency or alphabetical - great for content ideas, news monitoring, and spotting emerging stories.

### Sample output

#### Keyword mode

```json
{
  "keyword": "bitcoin",
  "success": true,
  "points": [48, 52, 61, 58],
  "geo": "US",
  "time": "2022-11-02 2022-12-18",
  "regions": [
    {"region": "California", "value": 100},
    {"region": "New New York", "value": 74}
  ]
}
```

| Scenario | What you get |
|---|---|
| Keyword has search volume | `success: true`, `points` filled (0-100 scale per day/hour) |
| Nobody searched this term in the window | `success: true`, `points` all `0` |
| Temporary fetch issue | `success: false` + `error` field |

Interest values are relative (0-100), exactly like trends.google.com: 100 = peak popularity within the selected window.

#### Trending mode

```json
{
  "keyword": "super bowl",
  "traffic": "200K+",
  "country": "US",
  "fetchedAt": "2026-08-23T10:15:00Z"
}
```

### Use cases

- **SEO keyword research** - validate search demand before writing content
- **Content calendar planning** - ride trending topics in real time
- **Market research** - compare brand or product interest across 50+ countries
- **Competitor monitoring** - track competitor search volume over time
- **Seasonal pattern analysis** - custom date ranges back to 2004 reveal year-over-year trends
- **Journalism & academic research** - historical interest in a topic
- **Affiliate & e-commerce** - validate product demand before launch

### Pricing

Pay per event, no platform usage charge on top:

| Event | FREE | Business (Gold) |
|---|---|---|
| Keyword analyzed (per success) | $0.005 | $0.0015 |
| Trending topic | $0.0012 | $0.0006 |

Headline: **from $1.50 per 1,000 keywords** at Business plan, **$5.00 per 1,000 keywords** at FREE plan. Failed keywords cost nothing - you only pay when real data is delivered. See the Pricing tab on Store for the full tier breakdown.

### Why this scraper instead of others?

- **Per-keyword pricing, not per-result** - one fee per keyword regardless of how many data points it returns; full daily series included
- **Regional data included free** - no extra charge for interest by state/city
- **No data, no fee** - a keyword with zero search volume still costs you; a keyword that returned nothing due to a network error does not
- **Pure HTTP/2** - no headless browser, runs fast and cheap
- **Back to 2004** - longer custom date range than most competitors
- **5 search properties** - Web, Images, News, YouTube, Shopping

### FAQ

**Q: How is "Keyword analyzed" counted?**
A: Each keyword row pushed to the dataset with `success: true` counts as one event. Failed keywords (`success: false`) are not charged.

**Q: Do I pay for keywords that return all zeros?**
A: Yes - those are real, valid responses from Google. You only avoid paying when the keyword fetch itself failed.

**Q: What happens if a keyword returns no regional data?**
A: Regional arrays are simply omitted from that keyword's output row. No extra charge.

**Q: Can I scrape news or YouTube trends?**
A: Yes - pick the *Search property* in the input form. Note that News Search has limited historical coverage.

**Q: Why is my run slower for some keywords?**
A: Google occasionally throttles or blocks IPs. We retry across multiple public proxies and accept the first successful response.

**Q: How do I export the data?**
A: From the Apify dataset tab - download as JSON, CSV, Excel, or push to a webhook, API, or cloud storage.

**Q: Can I run this on a schedule?**
A: Yes - use Apify Schedules or the API. Each scheduled run counts as its own paid run.

### Tips

- For best results, keep time windows short - longer historical ranges mean fewer data points per point.
- Fetching regional data roughly doubles the API calls per keyword; skip it if not needed.
- The FREE plan is fine for occasional small runs. For heavier use, consider Starter, Scale or Business plan for automatic volume discounts.

### Data source

Trends data is sourced from publicly available Google Trends pages via the same endpoints the website itself uses. Values are relative (0-100) within the selected window, exactly as shown on trends.google.com.

***

Built by [apify-solutions](https://apify.com) for SEO, marketing, and research teams that need reliable Google Trends data at scale.

# Actor input Schema

## `mode` (type: `string`):

keyword: scrape interest-over-time for each keyword. trending: scrape Google's live Trending Now searches (no keywords needed).

## `trendingGeo` (type: `string`):

Country code to fetch trending searches for.

## `trendingHours` (type: `string`):

How far back to look.

## `trendingSort` (type: `string`):

Ordering of results.

## `trendingCategory` (type: `string`):

Filter trending searches by topic.

## `trendingMaxItems` (type: `integer`):

Keep the top N items per geo (1-500).

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

Keywords to query (max 200).

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

Country code. Also used by trending mode when its Country is unset.

## `time` (type: `string`):

Keyword mode: Google Trends time parameter.

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

Keyword mode: optional exact historical window. When filled, it replaces Time range above. Format: YYYY-MM-DD YYYY-MM-DD, e.g. "2022-11-01 2022-12-18". Constraints: valid calendar dates, start on/before end, start on/after 2004-01-01, end not in the future. Invalid ranges fail the run immediately with a clear error instead of returning 400s from Google.

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

Google Trends search property. Note: News Search has limited historical coverage — for custom date ranges far in the past, many keywords legitimately return no data (empty on Google's own UI too). Web Search is recommended for historical research.

## `fetchRegional` (type: `boolean`):

Include interest by region (state/city) breakdown for each keyword. Adds ~1 extra API call per batch.

## Actor input object example

```json
{
  "mode": "keyword",
  "trendingGeo": "US",
  "trendingHours": "24",
  "trendingSort": "relevance",
  "trendingCategory": "all",
  "trendingMaxItems": 20,
  "keywords": [
    "artificial intelligence"
  ],
  "geo": "US",
  "time": "today 12-m",
  "property": "",
  "fetchRegional": false
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("utils/google-trends-actor").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("utils/google-trends-actor").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 utils/google-trends-actor --silent --output-dataset

```

## MCP server setup

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

```

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/Sv1WetfGh5QcHP5l0/builds/L75ufBP48Q41bOp80/openapi.json
