# Google Trends Scraper (`night111/google-trends-scraper`) Actor

Google Trends as JSON: interest over time, interest by region, related queries, and the live Trending now list for any country. Compare terms. No API key. $3 per 1,000 reports.

- **URL**: https://apify.com/night111/google-trends-scraper.md
- **Developed by:** [ng. night](https://apify.com/night111) (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 search term 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

Get Google Trends data as JSON. You don't need an API key, a Google login or a browser. The Actor does two jobs:

- **Search term reports.** Enter keywords. Each one comes back as a row with interest over time, interest by country or region, and the top and rising related queries.
- **Trending now.** Enter countries. Each one comes back as a list of what people there are searching for right now, with search volume, growth, start time, categories and related searches. A large country has several hundred of these in 24 hours.

The numbers are the ones you see on trends.google.com. The Actor reads the same data the website loads.

### Input

| Field | What it does |
|---|---|
| Search terms | One report per term. Up to 500 terms per run, 100 characters each. |
| Country or region | `US`, `GB`, `DE`, `JP`, `IN`, `BR` and so on, or a state such as `US-CA`. Empty means worldwide. |
| Time range | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, or 2004 to now. |
| Custom time range | Two dates, for example `2023-01-01 2023-12-31`. Replaces the time range when filled in. |
| Search type | Web, image, news, YouTube or Google Shopping search. |
| Category ID | 0 for all. Main IDs are listed in the field help (7 Finance, 5 Computers & Electronics, 20 Sports and so on). |
| Compare terms on one scale | Sends up to 5 terms to Google as one comparison, so you can see which is bigger. Off: each term gets its own 0 to 100 scale. |
| Interest over time, Interest by region, Related queries | Switch a part off to get smaller rows. |
| Region detail | Countries, states or regions, cities, or US metro areas. Automatic by default. |
| Language | Language of the Google Trends page, for example `en-US`, `de`, `ja`. It sets the language of related queries and trending searches. |
| Trending now: countries | Country or region codes. Leave empty to skip the trending list. |
| Trending now: period | Past 4 hours, 24 hours, 48 hours or 7 days. |
| Trending now: category, still rising only, order, max rows | Filter and sort the list before it is saved. The default is 25 rows per country. |
| Proxy | Leave Apify Proxy on. Google limits requests per IP address, and the proxy gives each request a fresh one. |

Example input:

```json
{
  "searchTerms": ["pickleball", "padel"],
  "geo": "US",
  "timeRange": "today 12-m",
  "compareTerms": true,
  "trendingNowGeos": ["US", "GB"],
  "maxTrendingPerGeo": 50
}
```

### Example output

A search term report. The timeline, regions and queries are shortened here:

```json
{
  "type": "interest",
  "searchTerm": "pickleball",
  "geo": "worldwide",
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "comparedWith": [],
  "averageInterest": 72.5,
  "peak": { "date": "2026-04-12", "value": 100 },
  "timeline": [
    { "date": "2025-11-09", "value": 64 },
    { "date": "2025-11-16", "value": 62 }
  ],
  "regions": [
    { "geoCode": "PH", "geoName": "Philippines", "value": 100 },
    { "geoCode": "SG", "geoName": "Singapore", "value": 66 }
  ],
  "relatedQueries": {
    "top": [
      { "query": "pickleball paddle", "value": 100 },
      { "query": "paddle", "value": 96 }
    ],
    "rising": [
      { "query": "best pickleball paddles 2026", "value": 2700, "label": "+2,700%" },
      { "query": "rpm pickleball paddle", "value": 1050, "label": "+1,050%" }
    ]
  },
  "exploreUrl": "https://trends.google.com/trends/explore?q=pickleball&date=today%2012-m",
  "scrapedAt": "2026-11-13T06:14:42.632Z"
}
```

A trending search:

```json
{
  "type": "trending",
  "geo": "US",
  "geoName": "United States",
  "keyword": "microsoft outage",
  "searchVolume": 10000000,
  "searchVolumeLabel": "10M+",
  "growthPercent": 1000,
  "startedAt": "2026-11-12T17:50:00Z",
  "endedAt": null,
  "isActive": true,
  "categories": ["Technology"],
  "relatedSearches": ["outlook outage", "is outlook still down", "outlook"],
  "newsArticleCount": 151,
  "windowHours": 24,
  "exploreUrl": "https://trends.google.com/trends/explore?q=microsoft%20outage&geo=US&date=now%201-d",
  "scrapedAt": "2026-11-13T06:13:04.182Z",
  "rank": 1
}
```

A row that failed looks like this and is not charged:

```json
{
  "type": "error",
  "searchTerm": "qzxwv plmokn 8841",
  "errorCode": "NO_DATA",
  "error": "Google Trends has no data for this term, country and time range (search volume too low)."
}
```

Error codes: `NO_DATA`, `BAD_REQUEST`, `RATE_LIMITED`, `NO_TRENDS`, `NO_MATCHES`, `INVALID_INPUT`, `NETWORK`, `HTTP_ERROR`, `BAD_RESPONSE`. The run also saves a `SUMMARY` record with the counts.

### Price

- $3 per 1,000 search term reports ($0.003 each).
- $0.50 per 1,000 trending searches ($0.0005 each).
- A start fee of $0.00004 per run.

Terms without data and error rows are free. If you set a maximum cost per run, the Actor stops when it is reached.

### How to read the numbers

- Interest values are Google's index from 0 to 100, not search counts. 100 is the highest point of that term in that place and period. With "Compare terms on one scale", 100 belongs to the biggest term and the others are relative to it.
- Point size depends on the range: hourly for 7 days, daily for 30 and 90 days, weekly for 12 months and 5 years (dated by the Sunday that starts the week), monthly for 2004 to now.
- The last point of a timeline can be incomplete. It then has `"isPartial": true`.
- `searchVolume` in the trending list is the lower bound Google shows, so `10M+` is saved as 10000000 with the label next to it. `growthPercent` is Google's rounded figure and goes up to 1000.

### Limits

- Google samples its data, so the same search run on two days can differ by a few points.
- A term with too little search volume returns `NO_DATA`.
- Related topics are not included. Google sent an empty list for them in every test.
- Rising queries come straight from Google. For some terms they include queries that look unrelated.
- Google limits requests per IP address. The Actor retries up to 4 times with a new IP. In a test with 30 search terms in one run, all 30 reports came back in 57 seconds. If you see `RATE_LIMITED`, run again with fewer terms.
- The trending list is a snapshot from the moment of the run. It has no history.
- This Actor is not affiliated with Google.

### Run it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/night111~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["pickleball"], "geo": "US"}'
```

### Questions

Open an issue in the Issues tab of this Actor with your input and the error code you got.

# Actor input Schema

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

One report is created per term. Google Trends shows each term on its own 0 to 100 scale unless you turn on "Compare terms on one scale".

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

Two-letter country code such as US, GB, DE, JP, IN or BR, or a region code such as US-CA or GB-ENG. Leave empty for worldwide.

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

The period to cover. The shortest ranges give minute or hourly points, longer ones give daily, weekly or monthly points.

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

Two dates separated by a space, for example 2023-01-01 2023-12-31. For hourly points inside one week, add the hour: 2024-03-01T00 2024-03-03T23. When filled in, this replaces the time range above.

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

Which Google search the numbers come from.

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

0 means all categories. Main categories: 3 Arts & Entertainment, 47 Autos & Vehicles, 44 Beauty & Fitness, 22 Books & Literature, 12 Business & Industrial, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 8 Games, 45 Health, 65 Hobbies & Leisure, 11 Home & Garden, 13 Internet & Telecom, 958 Jobs & Education, 19 Law & Government, 16 News, 299 Online Communities, 14 People & Society, 66 Pets & Animals, 29 Real Estate, 533 Reference, 174 Science, 18 Shopping, 20 Sports, 67 Travel.

## `compareTerms` (type: `boolean`):

Sends up to 5 terms at a time to Google as one comparison, so the values show which term is bigger. With more than 5 terms, each group of 5 is its own comparison. Off: every term gets its own 0 to 100 scale.

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

Adds the timeline: one value from 0 to 100 per date.

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

Adds the list of countries (worldwide) or states and regions (inside a country) with their 0 to 100 value.

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

How finely regions are split. Automatic uses countries for worldwide and states or regions for a single country.

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

Adds the top and the rising related search queries.

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

Language of the Google Trends page, for example en-US, de, fr, ja. It changes the language of related queries and of trending searches.

## `trendingNowGeos` (type: `array`):

Optional. Country or region codes (US, GB, DE, JP, US-CA...). Each one returns the searches that are spiking right now, with search volume and growth. Leave empty to skip.

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

How far back the trending list looks.

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

Optional. Keep only trending searches that Google puts in this category.

## `trendingActiveOnly` (type: `boolean`):

Skips trends that have already ended.

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

Google's own order, biggest search volume first, or newest first.

## `maxTrendingPerGeo` (type: `integer`):

A country can have several hundred trending searches in 24 hours. Each row is charged.

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

Google Trends limits the number of requests per IP address. Keep Apify Proxy on so each request can use a fresh one.

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping"
  ],
  "geo": "",
  "timeRange": "today 12-m",
  "property": "web",
  "category": 0,
  "compareTerms": false,
  "includeTimeline": true,
  "includeRegions": true,
  "regionResolution": "auto",
  "includeRelatedQueries": true,
  "language": "en-US",
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "trendingSortBy": "relevance",
  "maxTrendingPerGeo": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per search term with timeline, regions and related queries.

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

One row per trending search.

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

How many rows were delivered and failed, with error codes.

# 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": [
        "web scraping"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("night111/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 = {
    "searchTerms": ["web scraping"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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