# Google Trends Scraper: Bulk Keyword Interest & Queries (`ensorcelling_melilot/google-trends`) Actor

Google Trends for many keywords in one run: average, latest and peak interest, trend change, full timeline, top and rising related queries and topics, regions. Web, news, YouTube, shopping, back to 2004. No-data keywords are free. $5 per 1,000 keywords.

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

## Pricing

$5.00 / 1,000 keyword analyzeds

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 Interest, Related Queries

Look up Google Trends for hundreds of keywords in one run and get clean rows instead of one chart at a time:

- **Interest over time**: the full timeline plus average, latest, peak and a trend-change percentage
- **Related queries**: top and rising searches for each keyword
- **Related topics**: top and rising topics for each keyword
- **Interest by region**: countries, states or cities, depending on the location
- **Web, News, YouTube, Image and Shopping search**, any period from the past hour to 2004

No Google account, no proxies and no blocks to deal with. You pay only for keywords returned.

### Input

| Field | What to put |
|---|---|
| **Keywords** | Up to 500, one per line. Each becomes one row |
| **Compare keywords** | Off (default): each keyword is scaled 0-100 on its own, like a single-term search on trends.google.com. On: groups of five are scaled against each other |
| **Location / Language** | Country or region in English (empty = worldwide) and an optional language code |
| **Search type** | Web, News, YouTube, Image or Google Shopping |
| **Time range / From and To dates** | Past hour up to 5 years, or a custom period with a From date |
| **Result types** | Interest over time, related queries, related topics, regions |

### Output

One row per keyword:

| keyword | average | latest | peak | peakPeriod | trendChangePercent |
|---|---|---|---|---|---|
| electric bike | 31.1 | 15 | 100 | 2026-04-12 | 16.7 |

Each row also has `timeline` (period start and end, value, and whether the period is still running), `relatedQueries` and `relatedTopics` (`top` and `rising`), `regions`, `location`, `period` and `checkUrl` (the same chart on trends.google.com). Download as CSV, Excel or JSON, or schedule weekly runs and send them to Google Sheets with an integration.

- **Values are relative, 0 to 100.** 100 is the peak for that keyword and period, not a search count. Use the *Compare* switch to compare keywords with each other.
- **trendChangePercent** compares the average of the last quarter of the period with the first quarter. Periods still running (this week, say) are left out of average, latest, peak and the trend change.
- **Rising** values are percent growth; a very large number means the term was new or "breakout".
- If Google has too little data for a keyword, you get a row with a note and are **not charged**.

### Pricing

Pay per keyword row returned. Keywords with no data and lookups that fail are not charged. The run stops cleanly at your *Maximum cost per run*.

### Where the data comes from

Results come from [DataForSEO](https://dataforseo.com/)'s Google Trends API, which returns what the Google Trends Explore page shows. Lookups run in a queue and usually finish within a minute; a run that waits more than 10 minutes stops and does not charge for unfinished keywords. Google Trends is a sampled index, so the same keyword can differ slightly between runs.

### FAQ

**Why can't I get related queries in compare mode?** In compare mode five keywords share one chart, and Google's related lists then belong to the group, not to a single keyword. Run without compare mode to get them per keyword.

**Can I schedule it?** Yes. Use an Apify schedule to run the same keywords weekly and compare the `latest` and `trendChangePercent` columns.

# Actor input Schema

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

Search terms to look up, one per line (up to 500). Each keyword becomes one result row.

## `compareKeywords` (type: `boolean`):

Off: every keyword is scaled 0-100 on its own, like a single-term search on trends.google.com. On: keywords are looked up in groups of five and scaled against each other, so values are comparable inside a group. Related queries and topics are not available when on.

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

Country or region in English, e.g. United States, Germany, California,United States. Leave empty for worldwide.

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

Two-letter language code such as en, de or fr. Leave empty to use the location's default.

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

Which Google search the interest is measured on.

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

Period to measure. Ignored when you set a From date.

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

Start of a custom period as YYYY-MM-DD, e.g. 2020-01-01. Google Trends data goes back to 2004.

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

End of a custom period as YYYY-MM-DD. Leave empty for today. Only used together with a From date.

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

Add the full timeline (one point per day, week or month) and the summary numbers: average, latest, peak and trend change.

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

Add the top and rising related search queries for each keyword.

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

Add the top and rising related topics for each keyword.

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

Add interest by region (countries, states or cities depending on the location).

## Actor input object example

```json
{
  "keywords": [
    "electric bike",
    "standing desk"
  ],
  "compareKeywords": false,
  "location": "United States",
  "searchType": "web",
  "timeRange": "past_12_months",
  "includeTimeline": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "includeRegions": false
}
```

# Actor output Schema

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

One row per keyword: summary numbers, timeline, related queries and topics, regions.

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

How many keywords were saved, how many had no data or failed, and whether the run stopped at your cost limit.

# 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": [
        "electric bike",
        "standing desk"
    ],
    "location": "United States"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ensorcelling_melilot/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 = {
    "keywords": [
        "electric bike",
        "standing desk",
    ],
    "location": "United States",
}

# Run the Actor and wait for it to finish
run = client.actor("ensorcelling_melilot/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 '{
  "keywords": [
    "electric bike",
    "standing desk"
  ],
  "location": "United States"
}' |
apify call ensorcelling_melilot/google-trends --silent --output-dataset

```

## MCP server setup

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