# Google Trends Scraper & API: interest, regions, related queries (`innocent_archipelago/google-trends`) Actor

Scrape Google Trends for any keyword or a comparison of up to 5: interest over time, interest by region, top and rising related queries, in any country, time range, category or Google property. Plus Trending Now searches by country, with their news. $2 per 1,000 terms.

- **URL**: https://apify.com/innocent\_archipelago/google-trends.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/innocent_archipelago) (community)
- **Categories:** SEO tools, Marketing, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/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 & API

Get everything Google Trends shows for a search term in one result:

- **Interest over time:** hourly, daily, weekly or monthly, depending on the time range.
- **Interest by region:** states, provinces or countries.
- **Related queries:** both the top ones and the rising ones, for example "+2,300%" or
  "Breakout".

Put up to five terms on one line to **compare** them. You then get their interest side by side,
and related queries for each.

Any country or region, any time range from the past hour to 2004, custom date ranges,
categories, and web, image, news, shopping or YouTube search are all supported.

It also gets **trending now**: today's trending searches in any country, with approximate
traffic and the news behind them.

It costs **$2 per 1,000 search terms**, and trending searches are **$0.50 per 1,000**.

### What people use it for

- **SEO and content:** find rising queries before they peak and pick topics with growing
  demand.
- **Market research:** compare brands, products or competitors by region and over time.
- **E-commerce:** seasonality from Google Shopping interest.
- **Newsrooms and social media:** what is trending right now, and why.
- **Data science:** Trends time series as a feature for forecasting.

### How to use it

```json
{
  "searchTerms": ["bitcoin", "chatgpt, gemini, claude"],
  "geo": "US",
  "timeRange": "today 3-m",
  "trendingNow": ["US", "GB"]
}
```

`timeRange` takes `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`,
`today 12-m`, `today 5-y` or `all`. For exact dates, use `customTimeRange`, for example
`2025-01-01 2025-06-30`.

### Output

A comparison:

```json
{
  "type": "search",
  "searchTerm": "chatgpt, gemini, claude",
  "geo": "US",
  "timeRange": "today 3-m",
  "category": 0,
  "property": "web",
  "interestOverTime": [
    {"date": "2026-09-25", "chatgpt": 62, "gemini": 29, "claude": 17, "isPartial": false},
    {"date": "2026-09-26", "chatgpt": 49, "gemini": 23, "claude": 13, "isPartial": true}
  ],
  "interestByRegion": [
    {"geoCode": "US-CA", "region": "California", "chatgpt": 56, "gemini": 24, "claude": 20}
  ],
  "related": [
    {
      "term": "claude",
      "topQueries": [{"query": "claude ai", "value": 100}, {"query": "claude code", "value": 67}],
      "risingQueries": [{"query": "kimi k3", "increase": "Breakout"}],
      "topTopics": [],
      "risingTopics": []
    }
  ]
}
```

A trending search:

```json
{
  "type": "trending",
  "geo": "GB",
  "title": "police service of northern ireland",
  "approxTraffic": "500+",
  "startedAt": "2026-09-26T09:50:00+00:00",
  "news": [{"title": "Police Federation welcomes ‘sensible precautionary measure’ …", "source": "The Irish News", "url": "https://www.irishnews.com/…"}]
}
```

### Use it as an API

One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a
run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n
integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/innocent_archipelago~google-trends/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["bitcoin", "chatgpt, gemini"], "geo": "US", "timeRange": "today 3-m", "trendingNow": ["US"]}'
```

### Pricing

You pay **$0.002 per search term or comparison**, which is $2 per 1,000. Trending searches cost
$0.0005 each. A term Google refuses comes back with an `error` field and costs nothing. Runs that go
through Apify's residential proxy also pay its traffic, $0.0012 per 100 KB. There are no monthly
fees.

### Good to know

- Values are Google's relative interest, from 0 to 100, and not search volumes.
- Related topics come back empty: Google's Trends API gave none for any term we tried
  (September 2026). The fields stay, in case it serves them again.
- Google rate-limits Trends hard. When it refuses the run's IP, the actor switches to Apify
  residential proxy by itself and retries, with its traffic charged as above. After two terms in
  a row are refused, the run skips the rest.

# Actor input Schema

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

One term per line. Put up to 5 terms on one line, separated by commas, to compare them: chatgpt, gemini, claude.

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

Country code (US, GB, DE...) or region code (US-CA, GB-SCT). Empty for worldwide.

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

The period to look at.

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

Two dates, start and end, in place of the time range: 2025-01-01 2025-06-30.

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

Google Trends category ID, 0 for all. Examples: 7 Finance, 5 Computers & Electronics, 71 Food & Drink, 18 Shopping.

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

Which Google search to measure.

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

Language of region and topic names: en-US, de, fr...

## `trendingNow` (type: `array`):

Country codes to get today's trending searches for, with their traffic and news: US, GB, IN...

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

Not needed to start. If Google refuses the run, the actor switches to Apify residential proxy by itself.

## Actor input object example

```json
{
  "searchTerms": [
    "chatgpt, gemini"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "category": 0,
  "property": "",
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `trending` (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": [
        "chatgpt, gemini"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("innocent_archipelago/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 = { "searchTerms": ["chatgpt, gemini"] }

# Run the Actor and wait for it to finish
run = client.actor("innocent_archipelago/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 '{
  "searchTerms": [
    "chatgpt, gemini"
  ]
}' |
apify call innocent_archipelago/google-trends --silent --output-dataset

```

## MCP server setup

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