# Google Trends Scraper API | $3/1K Keywords (`beacondata/google-trends-scraper`) Actor

Interest-over-time for any keywords from Google Trends — clean JSON, no browser. Pay only for keywords that deliver data; failures are free.

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

## Pricing

$3.00 / 1,000 keyword trend delivereds

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

Get **interest-over-time data from Google Trends** for any list of keywords — clean JSON, no browser, no Google account. Built for reliability: automatic session handling and rotating retries where other Trends scrapers time out or return empty.

**You only pay for keywords that deliver data.** A keyword Google has no data for, or a temporary block that retries can't clear, costs you $0 and is reported as a typed error.

### Input

```json
{
    "keywords": ["bitcoin", "silver price", "ai agents"],
    "geo": "US",
    "time": "today 12-m",
    "property": ""
}
```

- `keywords` — each keyword is fetched independently on its own 0–100 scale. Duplicates are removed.
- `geo` — two-letter country (`US`, `GB`, `DE`, …), a subregion (`US-CA`), or empty for worldwide.
- `time` — `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, or `all` (2004–now).
- `property` — Web Search (default), `images`, `news`, `youtube`, or `froogle` (Shopping).

### Output per keyword

```json
{
    "keyword": "silver price",
    "geo": "US",
    "timeRange": "today 12-m",
    "averageValue": 58.5,
    "points": [
        { "time": 1759017600, "date": "Sep 21 – Sep 27, 2026", "value": 64, "isPartial": false }
    ]
}
```

`points` carries the full timeline (hourly, daily, or weekly depending on the range — same as Google shows). `isPartial` marks the still-open last bucket so your pipeline can skip it. Failed keywords return `{ keyword, error, errorType }` (`NO_DATA`, `INVALID_REQUEST`, `BLOCKED`) and are **not charged**.

### What people use it for

- Market and niche research (compare demand before building)
- Content planning and SEO seasonality
- Finance signals (retail attention on tickers and commodities)
- Monitoring brand or competitor search interest on a schedule

### Use it from code

```bash
curl -s -X POST "https://api.apify.com/v2/acts/beacondata~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["bitcoin"], "geo": "US", "time": "today 3-m"}'
```

Works everywhere Apify does: REST API, scheduled runs, webhooks, the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) (AI agents can call it as a tool), n8n, Make, Zapier.

### Honest limitations

- Values are Google's relative 0–100 index per keyword and range, not absolute search volumes.
- Each keyword is scaled independently; this actor does not do Google's 5-keyword comparative normalization.
- Related queries / regional breakdown are not included yet — open an issue if you need them and they'll be prioritized.

### Support

Found a bug or need a field added? Open an issue on the Issues tab — it's read daily and answered.

# Actor input Schema

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

The search terms to get interest-over-time for. Each keyword is fetched independently on its own 0–100 scale (this is NOT Google's 5-keyword comparison — every term is measured on its own). Duplicates are removed. Required.

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

Two-letter country code (US, GB, DE) or a subregion like US-CA. Leave empty for worldwide. Changes which audience's search interest you measure. Default empty (worldwide).

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

The window Google Trends should cover. Shorter ranges return finer-grained points (hourly/daily); longer ranges return weekly/monthly. Default is the past 12 months, which gives weekly points and a full year of seasonality.

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

Which Google surface to measure interest on. Default is Web Search; pick YouTube for video demand or Google Shopping (froogle) for buying intent.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "silver price"
  ],
  "geo": "",
  "time": "today 12-m",
  "property": ""
}
```

# Actor output Schema

## `trends` (type: `string`):

One item per keyword: keyword, geo, timeRange, points \[{time, date, value, isPartial}], averageValue. Failed keywords carry error + errorType and are not charged.

# 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": [
        "bitcoin",
        "silver price"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("beacondata/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 = { "keywords": [
        "bitcoin",
        "silver price",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("beacondata/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 '{
  "keywords": [
    "bitcoin",
    "silver price"
  ]
}' |
apify call beacondata/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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