# Google Trends Scraper — Fast & Cheap (`librevlad/google-trends-scraper-fast-cheap`) Actor

Google Trends data without login: interest over time, by region, related queries and topics. Pay per search term: $3 per 1,000 terms.

- **URL**: https://apify.com/librevlad/google-trends-scraper-fast-cheap.md
- **Developed by:** [Владислав Новік](https://apify.com/librevlad) (community)
- **Categories:** SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 search terms

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/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 — Fast & Cheap

**Pricing:** $3.00 per 1,000 search terms, however many rows a term returns. Failed terms are free.

Apify actor that pulls data from the public Google Trends endpoints — the
same ones the trends.google.com page itself calls in a browser — and returns
clean, row-based results. You pay per search term, not per row.

### Who is it for

Marketers, SEO and content teams, researchers and developers who need Trends
numbers for reporting, keyword research, trend monitoring or data pipelines
and do not want to maintain their own Trends client. Run it on a schedule to
append fresh data to the same dataset, or call it from your code via the
Apify API.

### What it does

For every search term group the actor:

1. Fetches the Trends homepage first so the requests carry the `NID`
   cookie, the way the website itself works. The actor identifies itself
   honestly and does not pretend to be a browser.
2. Calls `GET /trends/api/explore` to obtain the widgets and tokens.
3. Calls the public widgetdata endpoints the page uses:
   `/trends/api/widgetdata/multiline` (interest over time),
   `/trends/api/widgetdata/comparedgeo` (interest by region) and
   `/trends/api/widgetdata/relatedsearches` (related queries and topics).
4. Strips the `)]}'` guard from each response and emits one dataset row per
   data point.

The requests go through Apify Proxy (residential by default, included in the
price). On an HTTP 429 the actor pauses, retries with a fresh proxy
address (at most twice) and only reports an error row if it still fails. The
actor does **not** log into any account, solve captchas, or bypass bot
checks; if Google asks for a login or a bot check, the run pushes an error
row instead.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `searchTerms` | array | `["artificial intelligence"]` | **Required.** Each element is a separate comparison group. To compare up to 5 terms inside one group, separate them with commas, e.g. `"python, rust"`. |
| `geo` | string | `""` | ISO country code, e.g. `US`. Leave empty for the whole world. |
| `timeRange` | string | `today 12-m` | One of `now 1-H`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`. |
| `category` | integer | `0` | Google Trends category ID; `0` = all categories. |
| `property` | string | `""` | `""` (web search), `youtube`, `news`, `images` or `froogle` (Google Shopping). |
| `outputs` | array | all four | Any subset of `interestOverTime`, `interestByRegion`, `relatedQueries`, `relatedTopics`. |
| `proxyConfiguration` | object | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` | Apify proxy settings. Residential by default: Google answers 429 to shared datacenter addresses. Proxy traffic is included in the price. |

### Example run

```json
{
    "searchTerms": ["artificial intelligence"],
    "geo": "US",
    "timeRange": "today 12-m",
    "category": 0,
    "property": "",
    "outputs": ["interestOverTime", "interestByRegion", "relatedQueries", "relatedTopics"],
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### Example output

Every row carries a `type` field that tells you which output it belongs to.

```json
[
    {
        "type": "interestOverTime",
        "term": "artificial intelligence",
        "date": "2025-01-05T00:00:00+00:00",
        "value": 47,
        "isPartial": false
    },
    {
        "type": "interestByRegion",
        "term": "artificial intelligence",
        "geoCode": "US-CA",
        "geoName": "California",
        "value": 100
    },
    {
        "type": "relatedQueries",
        "term": "artificial intelligence",
        "kind": "top",
        "query": "artificial general intelligence",
        "value": 100,
        "link": "https://trends.google.com/trends/explore?q=artificial%20general%20intelligence"
    },
    {
        "type": "relatedTopics",
        "term": "artificial intelligence",
        "kind": "rising",
        "topic": "Large language model",
        "value": 3150,
        "link": "https://trends.google.com/trends/explore?q=%2Fg%2F11ld0twq7h"
    }
]
```

Failed requests are recorded as rows of their own:

```json
{
    "type": "error",
    "status": "error",
    "errorType": "rate_limit",
    "message": "Group [artificial intelligence]: Google Trends returned HTTP 429 (too many requests) for /trends/api/explore"
}
```

### Pricing

**$3.00 per 1,000 search terms** — that is $0.003 per term.

You pay once per search term, however many rows it returns: the whole
timeline, all regions and the related queries and topics of a term cost the
same $0.003. One term with all four outputs for `today 12-m` is usually
about 150–200 rows. A comparison group of 3 terms costs 3 × $0.003.

Error rows are free. If your spending limit for the run is reached, the actor
stops before handing out data it cannot charge for.

### Limitations

- Google Trends values are relative (0–100 inside each timeseries, per region
  and per related list), not absolute search counts.
- A comparison group holds at most 5 terms — this is a Google Trends limit.
- `isPartial: true` marks the last timeseries point of the requested range;
  it can still change as more data comes in.
- Rising related queries/topics: `value` is the percentage growth; entries
  Google labels "Breakout" may come back with a null `value`.
- `relatedTopics` can come back empty: in November 2026 Google often returns
  no related topics to requests without a login, while related queries
  work. Empty outputs do not change the price of a term.
- Related queries/topics are served per term, so a group with several terms
  makes one extra explore request per term for those outputs.
- The actor uses public unauthenticated endpoints. It does not log in, does
  not solve captchas and does not bypass bot checks; heavy usage of free
  datacenter proxies get HTTP 429 from Google, so the actor uses the Apify
  residential proxy by default. It retries twice with a fresh proxy address,
  then reports an error row for that group (free).
- The actor is not affiliated with Google; endpoints are undocumented and can
  change, which would surface as error rows or a failed run.

### FAQ

**Why are values 0–100 instead of search counts?**
That is how Google Trends works: every point is relative to the highest point
of the same series, per region, per time range and per comparison group.

**Why do the values of my terms change when I run different term groups?**
Trends normalizes values within the group that is compared together. Groups
are separate requests, so their scales are independent.

**How many terms can I scrape in one run?**
Each element of `searchTerms` is one group (up to 5 comma-separated terms).
The number of groups per run is not limited, but Google rate-limits bursts:
spread big batches over several runs.

**Why do I get error rows with `errorType: "rate_limit"`?**
Google answered HTTP 429 three times in a row for that group (initial request
plus two retries with fresh proxies). Re-run those terms later; nothing was
charged for them.

**Can I get hourly or daily data?**
Yes — pick `now 1-H` or `now 7-d` for hourly points, and longer ranges return
daily or weekly points, exactly like the website does.

**What exactly am I charged for?**
One `term` event per search term that returned data. Rows are grouped by
term and pushed after the charge, so you never pay twice for a term.

### Disclaimer

Use responsibly and check the site's terms for your use case.

### More actors from the same developer

Pay only for results, no logins:

- [App Store Scraper](https://apify.com/librevlad/app-store-scraper) — app details, keyword search positions and reviews from Apple's public API.
- [Threads Scraper](https://apify.com/librevlad/threads-scraper) — public Threads posts and profiles without login.
- [Website Crawler to Markdown](https://apify.com/librevlad/website-crawler-markdown) — crawl a website or docs section into clean Markdown for RAG and LLMs.
- [Website to Markdown](https://apify.com/librevlad/website-to-markdown) — turn a list of pages and PDFs into clean Markdown or text.
- [Website Screenshot & PDF](https://apify.com/librevlad/page-screenshot-pdf) — full-page and mobile screenshots, URL to PDF.
- [YouTube Transcript Scraper](https://apify.com/librevlad/youtube-transcripts-fast) — transcripts as plain text, timestamped segments or SRT.
- [YouTube Search & Channel Videos](https://apify.com/librevlad/youtube-search-channel-videos) — search results and every video of a channel.
- [YouTube Shorts Scraper](https://apify.com/librevlad/youtube-shorts-scraper-fast) — Shorts from keyword search and from channels' Shorts tab.

# Actor input Schema

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

Required. Each element is a separate comparison group sent to Google Trends. To compare up to 5 terms inside one group, separate them with commas, e.g. "python, rust". Example: \["artificial intelligence"].

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

ISO country code, e.g. US, GB, CZ. Leave empty to request the whole world.

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

Time range passed to Google Trends, same values as the website uses.

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

Google Trends category ID, 0 means all categories. IDs can be picked on https://trends.google.com/trends/explore in the category selector.

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

Search type to measure: web search (empty), YouTube, News, Images or Google Shopping.

## `outputs` (type: `array`):

Which outputs to scrape, any subset of: interestOverTime, interestByRegion, relatedQueries, relatedTopics. Keep the default to get all of them.

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

Apify residential proxy by default: Google Trends answers 429 to shared datacenter addresses. A fresh address is used for every group and retry; traffic is small (about 60 KB per search term).

## Actor input object example

```json
{
  "searchTerms": [
    "artificial intelligence"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "outputs": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "relatedTopics"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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": [
        "artificial intelligence"
    ],
    "outputs": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries",
        "relatedTopics"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("librevlad/google-trends-scraper-fast-cheap").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": ["artificial intelligence"],
    "outputs": [
        "interestOverTime",
        "interestByRegion",
        "relatedQueries",
        "relatedTopics",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("librevlad/google-trends-scraper-fast-cheap").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": [
    "artificial intelligence"
  ],
  "outputs": [
    "interestOverTime",
    "interestByRegion",
    "relatedQueries",
    "relatedTopics"
  ]
}' |
apify call librevlad/google-trends-scraper-fast-cheap --silent --output-dataset

```

## MCP server setup

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

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/SSoPaRf4NuOcaSOTi/builds/qOpbpPGRgPR1CYKWr/openapi.json
