# Google Trends Scraper — Unlimited Keyword Comparison (`alluring_tamarack/google-trends`) Actor

Google Trends data without pytrends 429 errors: interest over time, by region (country/state/city/metro), related & rising queries. Compare 50+ keywords on one shared 0–100 scale.

- **URL**: https://apify.com/alluring\_tamarack/google-trends.md
- **Developed by:** [Oleksandr Aleksandrov](https://apify.com/alluring_tamarack) (community)
- **Categories:** SEO tools, Marketing, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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 Scraper — Unlimited Keyword Comparison

Get Google Trends data through a simple API — no pytrends, no `429 Too Many Requests`, no 5-keyword limit.

### What makes it different

**Compare 50+ keywords on one shared 0–100 scale.** Google Trends only compares 5 terms at a time, so results from separate searches can't be compared. This Actor chains batches through a common anchor term and rescales them onto one scale. Validated against Google's own direct comparison: the stitched values differ by **0.4–2.4%**.

| Keyword | Direct Google comparison (vs "gold") | This Actor, stitched from 3 batches | Difference |
|---|---|---|---|
| nvidia | 0.1580 | 0.1586 | 0.4% |
| dow jones | 0.1296 | 0.1288 | 0.7% |
| oil price | 0.0791 | 0.0786 | 0.6% |
| solana | 0.0208 | 0.0213 | 2.4% |

**Built for reliability.** Session rotation, fresh cookies and exponential backoff on rate limits. Partial results are always saved.

### What you get

- **Interest over time**: full timeline per keyword, plus average, peak date and a partial-period flag.
- **Interest by region**: country, state, city (with coordinates) or US metro (DMA).
- **Related queries**: top and rising queries, with "Breakout" flagged.

Filter by location, time range (past hour to 2004–present), category and search property (Web, Images, News, Shopping, YouTube).

### Input example

```json
{
  "keywords": ["bitcoin", "gold", "nasdaq", "ethereum", "silver", "nvidia", "solana"],
  "geo": "US",
  "timeRange": "today 12-m",
  "dataTypes": ["interestOverTime", "relatedQueries"]
}
```

### Output example

```json
{
  "type": "interestOverTime",
  "keyword": "nvidia",
  "geo": "US",
  "timeRange": "today 12-m",
  "sharedScale": true,
  "anchorKeyword": null,
  "average": 9.57,
  "peak": "2025-11-16T00:00:00.000Z",
  "points": [
    {
      "timestamp": 1759017600,
      "date": "2025-09-28T00:00:00.000Z",
      "value": 8,
      "isPartial": false
    }
  ]
}
```

```json
{
  "type": "relatedQueries",
  "keyword": "gold",
  "top": [{ "query": "gold price", "value": 100, "formattedValue": "100", "isBreakout": false }],
  "rising": [{ "query": "$10 million belgium gold stash", "value": 16450, "formattedValue": "Breakout", "isBreakout": true }]
}
```

### Tips

- **Many keywords?** Set `anchorKeyword` to a moderately popular term that sits near the middle of your list. A tiny anchor next to huge terms reduces precision, and the Actor warns you when that happens.
- **Use cases**: SEO keyword prioritisation, content calendars, product and market research, brand vs. competitor tracking, and alternative data for trading research.
- **Values are relative** (0–100), like on trends.google.com. They are not absolute search volumes.

### Limitations

- Related *topics* are not supported: Google currently returns them empty for automated access.
- Data comes from Google's public Trends website and can change when Google changes it.

# Actor input Schema

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

Search terms. No 5-keyword limit: with more than 5, all keywords are put on one shared 0–100 scale via an anchor term.

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

Which Google Trends data to return.

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

Country or region code (e.g. US, GB, ES, US-CA). Empty = worldwide.

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

Time window for the data.

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

Google Trends category ID (0 = all categories; e.g. 7 = Finance, 71 = Food & Drink).

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

Which Google search to measure.

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

Granularity for 'Interest by region'. CITY and DMA (US metro) work for country-level locations.

## `includeLowVolumeRegions` (type: `boolean`):

Also return regions where Google reports too little data.

## `anchorKeyword` (type: `string`):

Term included in every comparison batch to stitch results onto one scale. Pick a moderately popular term. Default: the first keyword.

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

Interface language for topic names, e.g. en-US, es-ES, de-DE.

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

Google rate-limits aggressively. Apify Proxy is recommended.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "gold",
    "nasdaq"
  ],
  "dataTypes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "includeLowVolumeRegions": false,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Interest over time, interest by region and related queries — one item per keyword and data type.

# 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",
        "gold",
        "nasdaq"
    ],
    "dataTypes": [
        "interestOverTime",
        "relatedQueries"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alluring_tamarack/google-trends").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",
        "gold",
        "nasdaq",
    ],
    "dataTypes": [
        "interestOverTime",
        "relatedQueries",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("alluring_tamarack/google-trends").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",
    "gold",
    "nasdaq"
  ],
  "dataTypes": [
    "interestOverTime",
    "relatedQueries"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call alluring_tamarack/google-trends --silent --output-dataset

```

## MCP server setup

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

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/Tc0388Ylrt6XdzRhV/builds/Ou5B8MDP3C37FQe5A/openapi.json
