# Google Trends Scraper — Interest, Related & Rising (`haketa/google-trends-scraper`) Actor

Scrape Google Trends for any keyword, country and timeframe: interest over time, top & rising related queries, regional interest, and trending-now searches with traffic and news. Keyless, with 429 retry and residential proxy rotation. Export JSON, CSV, Excel.

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

## Pricing

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

## Google Trends Scraper — Interest, Related & Rising

Pull **Google Trends** data for any keyword, country and timeframe — as clean JSON/CSV/Excel. For each keyword you get **interest over time**, the **top & rising related queries and topics**, **regional interest**, and you can also grab the **trending-now searches** for a country with traffic estimates and related news.

**Keyless** and built for scale, with automatic **429 retry and proxy rotation** so runs stay reliable against Google's rate limits.

***

### What this Actor does

Google Trends is a goldmine for SEO, market research and content planning — but it has no official API and the site is painful to pull at scale. This Actor does it for you.

Give it keywords and it returns, for each one:

- **Interest over time** — the full 0–100 search-interest series, plus a summary (latest, average, peak value and peak date).
- **Top related queries** — what else people search alongside your keyword (demand you can target).
- **Rising related queries** — the fast-growing, breakout searches (where demand is heading).
- **Regional interest** — which countries/regions search for it most (optional).

And separately:

- **Trending now** — the current trending searches for a country, with approximate traffic and related news headlines.

***

### Why use it

- **SEO & content ideas on tap.** Top and rising queries are exactly the keywords and angles to build content and campaigns around — including breakout terms before they get competitive.
- **Market & trend research.** Compare interest across time and regions to see what's growing, what's seasonal and where demand lives.
- **Keyless and reliable.** No API key, no Google account. Built-in 429 handling and proxy rotation keep large runs from getting blocked.
- **Any keyword, country and timeframe.** Worldwide or a single country/region; the past day to the past 5 years (or all time).
- **Clean, structured output.** One tidy row per keyword, with the full timeline available as JSON when you want it.
- **Trending-now built in.** Track what a country is searching for right now, with traffic and news context.

***

### Who it's for

- **SEO & content teams** doing keyword research, content planning and demand discovery.
- **Marketers & agencies** sizing interest, spotting breakout trends and timing campaigns.
- **Analysts & researchers** measuring attention to brands, products, people or topics over time and geography.
- **PR & newsrooms** tracking what's trending now and the stories behind it.
- **Product & e-commerce teams** validating demand and seasonality before launches.

***

### Quick start

#### Run it in the console (no code)

1. In **Keywords / search terms**, add one keyword per line:

   ```
   bitcoin
   electric cars
   taylor swift
   ```

2. Set **Country / region** (e.g. `US`, `GB`, `DE`, or empty for worldwide) and **Time range** (e.g. *Past 12 months*).

3. *(Optional)* Turn on **Include related & rising topics**, **Include regional interest**, or **Trending now**.

4. Keep **Proxy** on (default) so Google doesn't rate-limit you, click **Start**, and export as **JSON, CSV, Excel or HTML**.

Leave the keywords empty to run a **built-in demo** and see the output shape.

#### Run it via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "keywords": ["bitcoin", "electric cars"],
    "geo": "US",
    "timeRange": "today 12-m",
    "includeRelatedQueries": True,
}

run = client.actor("YOUR_USERNAME/google-trends-scraper").call(run_input=run_input)

for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["keyword"], "peak", row["peakValue"], "→ rising:", row["relatedRisingQueries"])
```

#### Run it via API (JavaScript)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('YOUR_USERNAME/google-trends-scraper').call({
    keywords: ['bitcoin', 'electric cars'],
    geo: 'US',
    timeRange: 'today 12-m',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((r) => console.log(r.keyword, r.averageValue, r.relatedTopQueries));
```

***

### Input

| Field | Type | Description |
|---|---|---|
| **Keywords / search terms** | array | One keyword or phrase per line. Empty = demo. |
| **Country / region (geo code)** | string | `US`, `GB`, `DE`, `TR`, `US-CA`… Empty = worldwide. |
| **Time range** | select | Past day / 7 days / month / 3 months / 12 months / 5 years / all time. |
| **Category ID** | integer | Google Trends category to narrow results. 0 = all. (e.g. 7 Finance, 5 Computers, 71 Food, 20 Sports). |
| **Search property** | select | Web, News, Image, YouTube or Google Shopping search. |
| **Include related & rising queries** | boolean | Top + rising related search queries. Default on. |
| **Include regional interest** | boolean | Interest broken down by country/region. Default off. |
| **Include full timeline** | boolean | Full interest-over-time series as JSON (not just the summary). Default on. |
| **Trending now** | boolean | Current trending searches for the country, with traffic + news. Default off. |
| **Speed (parallel keywords)** | integer | Keep low (3–5) — Google rate-limits aggressively. Default 4. |
| **Proxy configuration** | object | Apify Proxy. ON by default and strongly recommended. |

#### Time range values

`now 1-d` (past day), `now 7-d` (past 7 days), `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all` (2004–now).

***

### Output

One record per keyword (`type: "keyword"`) — example:

```json
{
  "type": "keyword",
  "keyword": "electric cars",
  "geo": "US",
  "timeRange": "today 12-m",
  "category": "0",
  "searchProperty": "web",
  "latestValue": "33",
  "averageValue": "54",
  "peakValue": "100",
  "peakDate": "Apr 5 – 11, 2026",
  "relatedTopQueries": "electric car; best electric cars; toyota electric cars; ...",
  "relatedRisingQueries": "byd electric car; new ev tax credit; ...",
  "topRegions": "Wyoming:100; Vermont:61; Kansas:48; ...",
  "dataPoints": "53",
  "timeline": "[{\"t\":\"Oct 20 – 26, 2025\",\"v\":48}, ...]",
  "scrapedAt": "2026-10-08T13:00:00.000Z"
}
```

One record per trending search (`type: "trending"`) — example:

```json
{
  "type": "trending",
  "keyword": "ohio state basketball",
  "geo": "US",
  "rank": "3",
  "approxTraffic": "1000+",
  "relatedNews": "CareSource Invitational brings college basketball to...; ...",
  "scrapedAt": "2026-10-08T13:00:00.000Z"
}
```

| Field | Description |
|---|---|
| `type` | `keyword` or `trending`. |
| `keyword` | The keyword or trending term. |
| `geo` / `timeRange` / `category` / `searchProperty` | The query parameters used. |
| `latestValue` / `averageValue` / `peakValue` / `peakDate` | Interest-over-time summary (0–100). |
| `relatedTopQueries` / `relatedRisingQueries` | Top and rising related search queries. |
| `topRegions` | Top regions by interest (`region:value; …`). |
| `dataPoints` / `timeline` | Number of points and the full series as JSON. |
| `rank` / `approxTraffic` / `relatedNews` | Trending-now rank, traffic estimate and news headlines. |
| `scrapedAt` | ISO timestamp. |

***

### Tips & notes

- **Keep proxy on and concurrency low.** Google Trends rate-limits by IP. The Actor retries 429s and rotates IPs, but 3–5 parallel keywords is the sweet spot for large lists.
- **Interest is relative, not absolute.** Google Trends values are 0–100 *relative to the series* — 100 is the peak within your keyword/time/geo, not a raw search count. That's how Google Trends itself works.
- **Rising = breakout demand.** Rising queries are the fastest-growing related searches — the best early signal for SEO and content.
- **Compare over time and geography.** Change the time range and geo to spot seasonality and regional differences.
- **Use categories to disambiguate.** "Mercury" the planet vs the car vs the element — a category ID narrows it down.

***

### Frequently asked questions

**Do I need a Google account or API key?**
No. The Actor uses Google Trends' public endpoints — no key, no login.

**Why are the interest values 0–100 and not search counts?**
That's how Google Trends reports data: interest is normalized to a 0–100 scale relative to the peak in your selected keyword, timeframe and region. Absolute search volumes are not published by Google.

**Why should I keep the proxy on?**
Google Trends rate-limits aggressively by IP — its datacenter ranges get throttled hard. The Actor uses **rotating residential proxy by default**, each keyword on its own sticky IP + cookie, which is what keeps runs reliable at scale.

**Why are some "rising" queries unrelated to my keyword?**
Rising queries come straight from Google Trends. For high-interest terms (brands, products, people) they're spot-on breakout searches. For very broad or stable terms where Google has little breakout signal, Google itself surfaces general breakout searches — that's Google's data, not a parsing issue. Lean on the **top** queries and each term's value to judge relevance.

**Can I compare multiple keywords?**
Yes — add as many keywords as you like; each is measured on the same scale for your chosen geo and timeframe.

**What time ranges and regions are supported?**
From the past day to the past 5 years (or all time back to 2004), worldwide or for any country/region geo code.

**Can I track what's trending right now?**
Yes — turn on **Trending now** to pull the current trending searches for a country, with approximate traffic and related news headlines.

***

### Export & integrate

Results are available as **JSON, CSV, Excel, HTML** and via the **Apify API**. Push them to **Google Sheets**, a **webhook**, **Make**, **Zapier**, or your database — and **schedule** runs to track interest and trends over time.

# Actor input Schema

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

One keyword or phrase per line — e.g. `bitcoin`, `electric cars`, `taylor swift`. Each is looked up on Google Trends for interest over time plus related & rising queries. Leave empty (and turn on **Trending now**, or just run) to see a demo.

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

Two-letter country code (e.g. `US`, `GB`, `DE`, `TR`) or a region like `US-CA`. Leave empty for worldwide.

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

How far back to pull interest over time.

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

Google Trends category ID to narrow results. 0 = all categories. Examples: 7 = Finance, 5 = Computers & Electronics, 71 = Food & Drink, 20 = Sports.

## `searchProperty` (type: `string`):

Which Google surface to measure interest on.

## `includeRelatedQueries` (type: `boolean`):

Pull the top and rising related search queries for each keyword — great for SEO and content ideas.

## `includeRegionalInterest` (type: `boolean`):

Also pull interest broken down by country/region (top locations searching for the keyword).

## `includeTimeline` (type: `boolean`):

Include the full interest-over-time series (every data point) as JSON, not just the summary (latest / average / peak).

## `trendingNow` (type: `boolean`):

Also fetch the current trending searches for the selected country — with approximate traffic and related news headlines. Works with or without keywords.

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

How many keywords to process at once. Google Trends rate-limits aggressively — keep this low (3–5) to avoid 429s.

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

Apify Proxy. Strongly recommended and ON by default — Google Trends rate-limits by IP, so rotation is what keeps runs reliable.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "artificial intelligence",
    "electric cars"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "includeRelatedQueries": true,
  "includeRegionalInterest": false,
  "includeTimeline": true,
  "trendingNow": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

keyword / trending

## `keyword` (type: `string`):

The keyword or trending term

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

Country/region

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

Timeframe

## `category` (type: `string`):

Category ID

## `searchProperty` (type: `string`):

Web/news/images/youtube/shopping

## `latestValue` (type: `string`):

Latest interest value (0-100)

## `averageValue` (type: `string`):

Average interest over the period

## `peakValue` (type: `string`):

Peak interest value

## `peakDate` (type: `string`):

When interest peaked

## `relatedTopQueries` (type: `string`):

Top related search queries

## `relatedRisingQueries` (type: `string`):

Rising related search queries

## `topRegions` (type: `string`):

Top regions by interest

## `dataPoints` (type: `string`):

Number of timeline points

## `timeline` (type: `string`):

Full interest-over-time series (JSON)

## `rank` (type: `string`):

Trending rank

## `approxTraffic` (type: `string`):

Approximate searches (trending)

## `relatedNews` (type: `string`):

Related news headlines (trending)

## `error` (type: `string`):

Error note if any

## `scrapedAt` (type: `string`):

Timestamp

# 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",
        "artificial intelligence",
        "electric cars"
    ],
    "maxConcurrency": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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",
        "artificial intelligence",
        "electric cars",
    ],
    "maxConcurrency": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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",
    "artificial intelligence",
    "electric cars"
  ],
  "maxConcurrency": 4
}' |
apify call haketa/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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