# Google Trends Scraper & API: Bulk Keywords, Rising Queries (`moonweil/google-trends-scraper`) Actor

Google Trends API for many keywords at once: interest over time, interest by region, top and rising queries, and trending searches. Ranks any number of keywords on one comparable scale and reports new rising queries between runs. Pay only for results: empty or failed lookups are free.

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

## Pricing

from $3.00 / 1,000 keyword reports

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: Bulk Keyword Comparison & Monitor

Get Google Trends data for many keywords in one run, rank them on one comparable scale, and see which rising queries are new since your last run.

### What you get

For each keyword and region:

- **Interest over time**, with the average, latest and peak values
- **Trend direction**: rising, falling or flat, with the percentage change
- **Interest by region**
- **Top and rising related queries**, including breakouts
- **A link** to the same query on the Google Trends website

You can also add **trending searches** for any country, with estimated traffic and related news.

### Why use it

**Compare any number of keywords.** Google compares only 5 terms at a time and scores each lookup against its own peak, so numbers from separate lookups can't be compared. This Actor links lookups together through a shared keyword and gives every keyword a score on one scale, with the top keyword at 100. A `comparison` row lists the full ranking.

**See what's new.** Give your run a monitor name and schedule it. Each keyword row then lists the rising queries that have appeared since the previous run, and trending results include only searches you haven't seen.

**Pay only for results.** Keywords with no data and failed lookups are free. Every failed lookup still gets a row that says why, so nothing goes missing without notice.

### Input example

```json
{
  "keywords": ["coffee maker", "espresso machine", "french press"],
  "geos": ["US", "DE"],
  "timeframe": "today 12-m",
  "sameScale": true,
  "trendingCountries": ["US"],
  "monitorName": "coffee-weekly"
}
```

Leave `geos` empty for worldwide. Each keyword is looked up in each region, so the example above produces 6 reports.

### Output example

```json
{
  "type": "keyword",
  "keyword": "espresso machine",
  "geo": "US",
  "timeframe": "today 12-m",
  "hasData": true,
  "averageInterest": 52.31,
  "latestInterest": 61,
  "peakInterest": 100,
  "peakDate": "2025-11-23T00:00:00.000Z",
  "trend": "rising",
  "changePercent": 18.4,
  "comparableScore": 100,
  "comparableConfidence": "high",
  "timeline": [{ "date": "2025-11-02T00:00:00.000Z", "label": "Nov 2 – 8, 2025", "value": 48, "isPartial": false }],
  "regions": [{ "geoCode": "US-WA", "geoName": "Washington", "value": 100 }],
  "topQueries": [{ "query": "best espresso machine", "value": 100 }],
  "risingQueries": [{ "query": "example rising query", "growthPercent": 450, "breakout": false }],
  "newRisingQueries": [],
  "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&q=espresso+machine&geo=US"
}
```

The values above are illustrative. The dataset also has a `comparison` row per region with the full ranking, a `trending` row per trending search, and a `failed` row for each lookup that couldn't be completed. Check the `type` field to tell them apart.

### Pricing

Simple pay-per-result pricing. There's no start fee, no monthly rental, and keywords with no data or failed lookups are free.

| You get | Price | Per 1,000 |
| --- | --- | --- |
| Keyword report (one keyword in one region) | $0.003 | $3 |
| Keyword placed on the shared scale (optional) | $0.001 | $1 |
| Trending search | $0.0005 | $0.50 |

**Examples**

- 100 keywords in one country, compared on one scale: 100 × ($0.003 + $0.001) = **$0.40**
- 20 keywords checked weekly for new rising queries: 20 × $0.003 = **$0.06 per run**
- Daily trending searches for 5 countries (about 10 each): about **$0.025 per day**, less in monitor mode, which charges only new searches

To skip the comparison charge, turn off **Compare keywords on one scale**. You can also set a maximum cost per run in the run options, and the Actor stops cleanly when it's reached.

### Good to know

- **Trends values are relative.** They show interest compared with the peak in that lookup, not search volume. Google also samples its data, so numbers can shift slightly between runs.
- **Comparable scores are estimates.** Scores rely on Google's whole-number values, so `comparableConfidence` is `low` when a value was too small to measure precisely.
- **Very large gaps can't be measured.** If a keyword is over about 200 times more popular than every other keyword, it stays unranked with a `null` score and no comparison charge. Add a mid-sized keyword to connect them.
- **Regions match the Trends website, quirks included.** For example, Wyoming currently tops the US region list for many keywords on Google Trends itself, and the data here shows the same.
- **The latest period may be incomplete.** It is marked `isPartial` and is left out of the averages.
- **Related topics aren't included.** Google currently returns them empty for automated requests.
- **Trending traffic is Google's rounded estimate**, such as `1000+`.

### FAQ

**How many keywords can I run?** There's no fixed limit. If a run reaches its timeout or your spending limit, it stops cleanly and lists the skipped keywords in the run summary.

**Does it use a browser or need a login?** No to both.

**Is this an official Google product?** No. This Actor is independent and isn't affiliated with or endorsed by Google.

# Actor input Schema

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

Search terms, as many as you need. Duplicates are removed. Each keyword gets its own row with interest over time, regions, top and rising queries. You can also use a Google topic ID such as /m/0dl567.

## `geos` (type: `array`):

Country or subdivision codes such as US, DE or US-CA. Every keyword is looked up in every region, and each combination is one report. Leave empty for worldwide.

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

The period to look at. You can also type a custom range as YYYY-MM-DD YYYY-MM-DD, for example 2025-01-01 2025-06-30.

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

Google Trends category ID to narrow the results, for example 71 for Food & Drink. 0 means all categories. The ID is the cat= value in a Trends website link.

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

Which Google search to measure.

## `sameScale` (type: `boolean`):

Google scores each lookup against its own peak, so two separate reports can't be compared. This ranks all your keywords on one 0-100 scale, per region, however many there are, and adds a comparison row. Charged per keyword placed on the scale.

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

Optional. One of your keywords to compare first. Pick a mid-sized term if your keywords vary a lot in popularity, because very large gaps can't be measured.

## `includeRegions` (type: `boolean`):

Adds the regions where each keyword is most popular.

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

Adds the related searches Google lists for each keyword: the most common ones, and the ones growing fastest.

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

Language for region names and dates, such as en-US or de. It doesn't change which searches are counted.

## `trendingCountries` (type: `array`):

Country codes such as US or GB. Adds what is trending there now, with estimated traffic and related news. Charged per trending search returned.

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

Set a name and schedule this Actor to see what changed between runs. Keyword rows then list the rising queries that are new since last time, and trending results include only new searches. Re-use the same name on each run. The history is saved to a key-value store on your account.

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

Keywords looked up at the same time. Higher is faster, but Google may block more often.

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

Google blocks requests without a proxy. The default works for most runs. If Google keeps blocking, the Actor switches to residential proxies by itself.

## Actor input object example

```json
{
  "keywords": [
    "coffee maker",
    "espresso machine",
    "french press"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m",
  "category": 0,
  "searchType": "web",
  "sameScale": true,
  "includeRegions": true,
  "includeRelatedQueries": true,
  "language": "en-US",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per keyword and region: interest over time, average, latest and peak interest, trend direction, regions, top and rising queries, and the score on the shared scale.

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

One row per trending search: title, country, estimated traffic, start time and related news.

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

Counts of keywords with data, without data and failed, skipped inputs, charged events and proxy statistics.

# 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": [
        "coffee maker",
        "espresso machine",
        "french press"
    ],
    "geos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moonweil/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": [
        "coffee maker",
        "espresso machine",
        "french press",
    ],
    "geos": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("moonweil/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": [
    "coffee maker",
    "espresso machine",
    "french press"
  ],
  "geos": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call moonweil/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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