# Google Trends Scraper: Interest, Regions, Related Queries (`shipsatnight/google-trends-scraper`) Actor

Google Trends interest over time, interest by region, related queries and topics, plus daily trending searches. Retries with IP rotation. $0.0006 per result, no start fee. Partial rows (some data blocks missing) are charged the full $0.0006; failed and no-data keywords are not charged.

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

## Pricing

$0.60 / 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: interest, regions, related queries, trending

Pull Google Trends data for any list of keywords, or today's trending searches by country.

### What you get

**Keyword mode**: one result per keyword (up to 1000 keywords per run). Google scores each keyword from 0 to 100 against its own peak for the selected time and place. The Google Trends website comparison view uses one shared scale and accepts up to 5 keywords together. This actor requests each keyword separately. Each result includes:

- interest over time (timeline with dates and 0 to 100 values), plus average and peak date
- interest by region
- top and rising related queries
- top and rising related topics (when Google publishes them for the query; often empty for broad terms)
- a link to open the same view in Google Trends

**Trending now mode**: one result per trending search, with approximate traffic, start time and linked news stories.

### How it handles errors

- Every request retries up to 6 times with jittered exponential backoff.
- On a rate limit (HTTP 429) or network error the IP session is retired and a new Apify Proxy IP is used.
- Each data block is fetched separately. If one block fails, you still get the rest and the result is marked `partial: true` with the reason in `errors`.
- A keyword that fails completely is never charged. It is listed in the `RUN_SUMMARY` record with the error.
- Bad input fails fast with a plain explanation.

Testing so far is small: 20 runs (about 210 results) on the developer's account. One 25-keyword run hit Google rate limits and recovered every keyword through retries and IP rotation. Larger volumes have not been tested yet.

### Pricing

| Item | Price |
|---|---|
| Per result (row) | $0.0006 |
| Actor start fee | None |
| Partial rows | Charged as results |
| Failed or noData items | Not charged |

$0.0006 per result. Platform usage is included. No start fee. Partial results (`partial: true`, some data blocks missing) are charged the full $0.0006. Failed keywords and keywords where Google has no data (too little search volume) are delivered with `noData: true` or listed in `RUN_SUMMARY` and are not charged.
The run stops cleanly when your max charge limit is reached.

Check the Store pricing tab for the current price.

### Input example

```json
{ "mode": "keywords", "keywords": ["chatgpt", "gemini"], "geo": "US", "timeRange": "today 12-m" }
```

```json
{ "mode": "trendingNow", "trendingGeos": ["US", "GB", "DE"] }
```

Time ranges: `now 1-H`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all`, or `2024-01-01 2024-12-31`.

### Output example

```json
{
  "type": "keyword",
  "keyword": "bitcoin",
  "geo": "US",
  "timeRange": "today 12-m",
  "interestOverTime": [{ "date": "2025-11-02T00:00:00.000Z", "formattedTime": "Nov 2 - 8, 2025", "value": 40, "isPartial": false }],
  "interestByRegion": [{ "geoCode": "US-WY", "geoName": "Wyoming", "value": 100 }],
  "relatedQueriesTop": [{ "query": "bitcoin price", "value": 100, "formattedValue": "100" }],
  "averageInterest": 38.2,
  "peakDate": "2026-01-11T00:00:00.000Z",
  "partial": false,
  "errors": []
}
```

### FAQ

#### Does Google Trends have an official API?

Google has an alpha Trends API with limited access. This Actor gives you Trends data now, with no API key or approval needed.

#### Is there a free way to get Google Trends data?

The Google Trends website is free to browse. This Actor charges $0.0006 per result returned, with no start fee, and Apify's free plan credits cover small runs.

#### What data can I get?

Interest over time, interest by region (country, state, or city, depending on the `geo` code you set), related queries and related topics (top and rising), and daily trending searches by country.

#### Does Google Trends show search volume?

No. Google Trends shows relative interest on a 0 to 100 scale, where 100 is peak interest for the chosen time and place. The Actor returns those same values.

#### What is the difference between related queries and related topics?

Related queries are exact search phrases people also used. Related topics are broader entities grouped across languages and spellings.

#### How do I use Google Trends for keyword research?

Compare candidate keywords over time, check where demand is highest by region, then mine rising related queries for new content ideas. Each keyword in a run is scored on its own 0 to 100 scale, and a run accepts up to 1000 keywords. The public Tasks below preset each step.

#### Can I get trending searches every day?

Yes. Run the trending searches Task on an Apify schedule and send results to Google Sheets, Slack, or a webhook.

#### Am I charged if a run fails?

Failed and noData items are not charged. Partial rows are charged at $0.0006 each.

#### Can I call it from code?

Yes. Use the Apify API or the apify-client libraries for JavaScript and Python. See https://docs.apify.com/api/v2.

### Ready-made Tasks

- [Compare keywords on Google Trends interest over time](https://apify.com/shipsatnight/google-trends-scraper/examples/compare-keywords-google-trends-interest-over-time)
- [Get Google Trends related queries for a keyword](https://apify.com/shipsatnight/google-trends-scraper/examples/google-trends-related-queries-for-keyword)
- [See today's Google trending searches by country](https://apify.com/shipsatnight/google-trends-scraper/examples/google-trending-searches-by-country)
- [Google Trends interest by region for a keyword](https://apify.com/shipsatnight/google-trends-scraper/examples/google-trends-interest-by-region)

### Related actors

- [Bulk domain WHOIS, DNS, SSL, and tech stack in one call](https://apify.com/shipsatnight/domain-intelligence-suite): WHOIS, DNS, SSL, and tech stack for the domains behind a brand.
- [Subdomain Monitoring](https://apify.com/shipsatnight/subdomain-monitoring): watch new subdomains for brands you track.

### Development

```bash
npm install
bun test
npx tsc --noEmit
```

Values are relative (0 to 100) as published by Google Trends. This actor uses only publicly available Trends pages.

# Actor input Schema

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

"keywords" returns interest over time, by region, related queries and related topics for each keyword. "trendingNow" returns today's trending searches for each country.

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

Search terms to look up. One result per keyword.

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

ISO country or region code such as US, GB or US-CA. Leave empty for worldwide.

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

Google Trends time range: "now 1-H", "now 7-d", "today 1-m", "today 3-m", "today 12-m", "today 5-y", "all", or "YYYY-MM-DD YYYY-MM-DD".

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

Google Trends category id. 0 means all categories.

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

Which Google search to measure.

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

Language code used for region and topic names, for example en-US or de.

## `includeInterestOverTime` (type: `boolean`):

Include the timeline.

## `includeInterestByRegion` (type: `boolean`):

Include the regional breakdown.

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

Include top and rising related queries.

## `includeRelatedTopics` (type: `boolean`):

Include top and rising related topics.

## `trendingGeos` (type: `array`):

Two-letter country codes for trendingNow mode.

## `maxResults` (type: `integer`):

Stop after this many results.

## `useApifyProxy` (type: `boolean`):

Rotate IPs through Apify Proxy when Google rate-limits. Recommended.

## Actor input object example

```json
{
  "mode": "keywords",
  "keywords": [
    "bitcoin",
    "taylor swift"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "language": "en-US",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "trendingGeos": [
    "US"
  ],
  "maxResults": 1000,
  "useApifyProxy": true
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "keywords": [
        "bitcoin",
        "taylor swift"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("shipsatnight/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",
        "taylor swift",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("shipsatnight/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",
    "taylor swift"
  ]
}' |
apify call shipsatnight/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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