# Google Trends Scraper – Pay Per Result, No Browser (`murmuring_headlamp/google-trends-fast`) Actor

Returns Google Trends data as JSON: interest over time, interest by region and related queries and topics for each search term, or for a comparison of up to 5 terms. Input: searchTerms, geo, timeRange, category. From $1 per 1,000 results, no browser.

- **URL**: https://apify.com/murmuring_headlamp/google-trends-fast.md
- **Developed by:** [Ivan Alexeev](https://apify.com/murmuring_headlamp) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.
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?

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

### What does Google Trends Scraper do?

It pulls Google Trends data through the same JSON API the Trends website uses, with no browser involved. For each search term, or for one comparison of up to 5 terms, you get a single clean dataset item with:

- **Interest over time**: every point has an ISO date, a value from 0 to 100 and an `isPartial` flag
- **Interest by region**: countries, or subregions when you set a country
- **Related queries**: top and rising, including "Breakout" terms
- **Related topics**: top and rising, when Google returns them

Every Google Trends option is supported: location (country or subregion), preset or custom time range, category, and search type (web, images, news, Google Shopping, YouTube).

### Google Trends API alternative without a browser

Google has no official Trends API, and the Python library pytrends breaks whenever Google changes its endpoints. This scraper is a maintained pytrends alternative that runs on Apify: it calls the Trends JSON endpoints directly, retries rate limits with a fresh proxy session and returns typed JSON you can load into pandas, Google Sheets or a database without reshaping.

- **Fast.** A typical term finishes in a few seconds, not minutes, at 256 MB of memory.
- **Built for rate limits.** When Google answers 429, the term is retried with a fresh residential session and backoff.
- **Pay only for results.** Terms that fail or have no data are not charged, and there is no start fee beyond $0.00005.
- **Honest failures.** If every term fails because of errors, the run fails, so a scheduled job can't quietly return nothing.

### Input

| Field | Description |
|---|---|
| `searchTerms` | Keywords to look up (up to 500). Each term becomes one result, or all terms become one comparison. |
| `compareTerms` | Put all terms (max 5) into one comparison, like adding several terms in the Google Trends UI. |
| `geo` | ISO country code (`US`, `DE`) or subregion (`US-CA`, `GB-ENG`). Empty means worldwide. |
| `timeRange` | Preset period, from the past hour to 2004–present. |
| `customTimeRange` | Exact dates as `YYYY-MM-DD YYYY-MM-DD`; overrides `timeRange`. |
| `category` | Google Trends category ID (0 = all). |
| `property` | Web, image, news, Google Shopping or YouTube search. |
| `maxConcurrency`, `maxRetries` | Parallelism (1–5) and attempts per term (1–3). |

```json
{
  "searchTerms": ["bitcoin", "ethereum", "solana"],
  "compareTerms": true,
  "geo": "US",
  "timeRange": "today 12-m"
}
```

### Output fields

| Field | Description |
|---|---|
| `query`, `searchTerms` | The term, or `"bitcoin vs ethereum"` plus the list of compared terms |
| `geo`, `timeRange`, `category`, `property` | The options the result was fetched with |
| `interestOverTime` | List of `{date, formattedTime, values: {term: 0–100}, isPartial}` |
| `interestBySubregion` | List of `{geoCode, geoName, values}`; regions without data are dropped |
| `relatedQueries` | Per term: `top` and `rising` lists of `{query, value, formattedValue}` |
| `relatedTopics` | Per term: `top` and `rising` lists of `{topic, topicType, mid, value}` |
| `scrapedAt` | ISO 8601 UTC timestamp |

```json
{
  "query": "bitcoin vs ethereum",
  "searchTerms": ["bitcoin", "ethereum"],
  "geo": "US",
  "timeRange": "today 12-m",
  "interestOverTime": [
    {"date": "2026-10-25T00:00:00Z", "formattedTime": "Oct 25 – 31, 2026", "values": {"bitcoin": 21, "ethereum": 3}, "isPartial": true}
  ],
  "interestBySubregion": [{"geoCode": "US-NV", "geoName": "Nevada", "values": {"bitcoin": 87, "ethereum": 13}}],
  "relatedQueries": {"bitcoin": {"top": [{"query": "bitcoin price", "value": 100, "formattedValue": "100"}], "rising": []}},
  "scrapedAt": "2026-10-28T12:00:00Z"
}
```

### How much does it cost to scrape Google Trends?

You pay per result: one dataset item per term, or one per comparison. Platform usage (compute and proxy) is included in the price.

| Plan | Price per 1,000 results |
|---|---|
| Free | $2.00 |
| Starter (Bronze) | $1.50 |
| Scale (Silver) | $1.20 |
| Business (Gold) | $1.00 |

Each run also charges $0.00005 for the start. Example: 100 terms on the Starter plan cost $0.15. Set a maximum total charge on the run and the scraper stops once that budget is used up. Terms that fail or have no data cost nothing.

### Use Google Trends data in Python or Google Sheets

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("murmuring_headlamp/google-trends-fast").call(run_input={"searchTerms": ["coffee"], "geo": "US"})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

In Google Sheets, use the Apify integration or export the dataset as CSV from the run's Export tab. Dates are ISO 8601 UTC and values are keyed by term, so no reshaping is needed.

### Tips

- In comparison mode Google scales all terms against each other, so the values are comparable. Separate terms are each scaled 0–100 on their own.
- Keep `maxConcurrency` at 2–3 for large lists: slower, but far fewer rate limits.
- Leave the default residential proxy on. Google rate-limits datacenter IPs heavily.

### FAQ

**Why do related queries contain unrelated terms like "how to bake a cake"?** Google itself returns them for automated access, so every Google Trends scraper, browser-based ones included, gets the same entries. Filter rising queries by your search term downstream.

**A term came back without data.** Rare terms have no interest-over-time data in Google Trends. The run reports them as "without data" in its status message, nothing is pushed for them, and they are not charged.

**Related topics are empty?** Google currently leaves related topics out for many queries and regions. The field is still there, so your schema stays stable.

**Is scraping Google Trends legal?** Google Trends shows public, aggregated, anonymous data. This scraper collects no personal data. You're responsible for how you use the results.

### Related scrapers

- [Google Jobs Scraper](https://apify.com/murmuring_headlamp/google-jobs-fast): job postings with salaries, descriptions and apply links.

*This Actor is not affiliated with Google.*

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to look up. Each term becomes one result, or all terms become one comparison when "Compare terms" is on.

## `compareTerms` (type: `boolean`):

Put all search terms (max 5) into one comparison, like adding several terms in the Google Trends UI.

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

ISO country code (US, DE, GB) or subregion code (US-CA, GB-ENG). Empty = worldwide.

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

Period of the data. Ignored when Custom time range is set.

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

Exact dates as "YYYY-MM-DD YYYY-MM-DD", e.g. "2024-01-01 2024-12-31". Overrides Time range.

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

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

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

Which Google search to measure.

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

Interface language for formatted labels, e.g. en-US, de, fr.

## `maxConcurrency` (type: `integer`):

Terms scraped in parallel. Higher is faster but gets rate-limited more.

## `maxRetries` (type: `integer`):

Attempts per term, each with a fresh proxy session. Terms without data are not retried.

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

Google rate-limits datacenter IPs; residential proxy is the reliable default.

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping"
  ],
  "compareTerms": false,
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "language": "en-US",
  "maxConcurrency": 2,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "searchTerms": [
        "web scraping"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("murmuring_headlamp/google-trends-fast").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 = {
    "searchTerms": ["web scraping"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("murmuring_headlamp/google-trends-fast").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 '{
  "searchTerms": [
    "web scraping"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call murmuring_headlamp/google-trends-fast --silent --output-dataset

```

## MCP server setup

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

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/Yjn5GCBYM9SzkmbRE/builds/S80qLGbJxmd9RnZ4k/openapi.json
