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

Scrape Google Trends: interest over time, interest by region, related queries and Trending now searches. Compare up to 5 terms, any country or region, any time range. No login, no API key.

- **URL**: https://apify.com/giiwinthrop/google-trends-scraper.md
- **Developed by:** [Gii Winthrop](https://apify.com/giiwinthrop) (community)
- **Categories:** SEO tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 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/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 without a login or an API key: **interest over time, interest by region, related queries and the Trending now list**. Compare up to 5 terms on the same scale, for any country or region, any time range from the past hour to 2004, and for Web, Image, News, Shopping or YouTube search. Export to JSON, CSV, Excel, or use the API.

### What can it do?

- **Interest over time**: Google's 0-100 timeline for each term (hourly, daily, weekly or monthly points, depending on the time range), plus the average interest per term.
- **Compare terms**: put up to 5 terms on one line (`coffee, tea`) and they share one scale, exactly as on the Google Trends page.
- **Interest by region**: countries, regions/states, cities, or US metro areas (DMA).
- **Related queries**: the *Top* and *Rising* searches for each term, with "Breakout" flagged.
- **Trending now**: the current trending searches in any country from Google's public feed, with approximate search volume, start time and related news links.
- **Many locations at once**: every term is scraped for every location you list (`US`, `GB`, `CA-ON`, ...).
- **Any period**: presets (past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, since 2004) or your own dates.

### Who is it for?

- **SEO and content teams** choosing keywords and timing content to seasonal peaks.
- **Marketers and brands** comparing brand interest against competitors, by country and region.
- **E-commerce sellers** spotting rising products and seasonal demand before stocking up.
- **Analysts and researchers** who need clean time series for dashboards, models or reports.
- **Newsrooms and social media teams** following what is trending right now, country by country.

### How to use it

1. Enter one or more **search terms**. One line = one query; separate terms with commas to compare them.
2. Add **locations** (country or region codes) or leave empty for worldwide.
3. Pick a **time range** and the data you want.
4. Optionally add countries under **Trending now**.
5. Click **Start**. The input form is prefilled, so the first run works with one click.

#### Input example

```json
{
  "searchTerms": ["coffee", "coffee, tea"],
  "geos": ["US"],
  "timeRange": "today 12-m",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "trendingNowCountries": ["US"]
}
```

#### Main input fields

| Field | What it does |
|---|---|
| `searchTerms` | One query per line. Up to 5 comma-separated terms per line are compared on one scale. |
| `geos` | Country or region codes (`US`, `GB`, `US-CA`, `CA-ON`). Empty = worldwide. |
| `timeRange` | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m` (default), `today 5-y`, `all`, or `custom`. |
| `customTimeRange` | With `custom`: `"2024-01-01 2024-06-30"`. |
| `category` | Google Trends category ID (the `cat` number in a Trends URL), e.g. 71 = Food & Drink. 0 = all. |
| `searchProperty` | `web` (default), `images`, `news`, `shopping` or `youtube`. |
| `includeInterestOverTime`, `includeInterestByRegion`, `includeRelatedQueries` | Choose which data to collect (all on by default). |
| `regionResolution` | Countries, regions, cities or US metro areas for Interest by region. |
| `trendingNowCountries` | Country codes for the Trending now list. |
| `timezoneOffset` | Minutes behind UTC, as Google Trends expects (0 = UTC, 300 = US Eastern). |

### Output example

One item per query and location (shortened):

```json
{
  "type": "trends",
  "query": "coffee, tea",
  "searchTerms": ["coffee", "tea"],
  "geo": "US",
  "timeRange": "today 12-m",
  "startDate": "2025-12-05",
  "endDate": "2026-12-05",
  "timeResolution": "WEEK",
  "trendsUrl": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=coffee%2Ctea&hl=en-US",
  "interestOverTime": [
    { "date": "2025-11-30T00:00:00.000Z", "timestamp": 1764460800, "formattedTime": "Nov 30 – Dec 6, 2025", "values": { "coffee": 71, "tea": 37 }, "hasData": true, "isPartial": false }
  ],
  "averages": { "coffee": 78, "tea": 37 },
  "averagesSource": "google",
  "regionResolution": "REGION",
  "interestByRegionMode": "share",
  "interestByRegion": [
    { "geoCode": "US-WY", "geoName": "Wyoming", "values": { "coffee": 68, "tea": 32 }, "hasData": true }
  ],
  "relatedQueries": [
    {
      "keyword": "coffee",
      "top": [{ "query": "coffee shop", "value": 100, "formattedValue": "100", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=coffee+shop&date=today+12-m&geo=US" }],
      "rising": [{ "query": "coffee shops nearby", "value": 4350, "formattedValue": "+4,350%", "isBreakout": false, "link": "https://trends.google.com/trends/explore?q=coffee+shops+nearby&date=today+12-m&geo=US" }]
    }
  ],
  "warnings": [],
  "scrapedAt": "2026-12-05T02:50:18.146Z"
}
```

One item per trending search:

```json
{
  "type": "trendingNow",
  "country": "US",
  "rank": 4,
  "title": "kraken vs ducks",
  "approxTraffic": 2000,
  "approxTrafficText": "2000+",
  "publishedAt": "2026-12-05T02:10:00.000Z",
  "imageUrl": "https://encrypted-tbn1.gstatic.com/images?q=...",
  "news": [{ "title": "...", "url": "https://...", "source": "The New York Times", "imageUrl": "https://..." }],
  "trendsUrl": "https://trends.google.com/trending?geo=US",
  "scrapedAt": "2026-12-05T02:50:16.651Z"
}
```

#### How to read the numbers

- **Interest over time** is Google's relative scale: 100 is the peak for the chosen terms, place and period; 50 is half as popular. It is not a search count. Values are only comparable within one query, which is why comparisons share one line.
- `isPartial: true` marks the latest point while it is still incomplete.
- `averages` come from Google for comparisons. For a single term Google gives none, so the Actor computes the mean of the complete points (`averagesSource: "computed"`).
- **Interest by region**: for a single term, 0-100 relative to the top region (`interestByRegionMode: "relative"`). For comparisons, each term's share of the combined interest in that region, in % (`"share"`), as Google shows it.
- **Rising** values are percent growth against the previous period. "Breakout" means more than +5000%.

Bad inputs (an unknown location code, more than 5 terms on a line, a wrong date format) come back as items with `type: "error"` and an explanation. They are free.

### Pricing

Pay per result: **$0.003 per result** ($3 per 1,000), plus Apify's tiny per-run start fee.

- A *result* is one query for one location, with all the data you selected (timeline, regions, related queries), or one Trending now search.
- Error items are free.
- Example: 50 keywords in 2 countries = 100 results = $0.30.

You can set a maximum cost per run in the run options. The Actor stops cleanly when it is reached.

### FAQ

**Is this the official Google Trends API?**
No. It reads the same public data the Google Trends website shows, without logging in. Google's official Trends API is in limited alpha and needs an application.

**Why does Google rate-limit me?**
Google Trends allows few requests per IP. The Actor uses Apify Proxy (on by default) and moves to another IP with a back-off when that happens. Without a proxy it stops at the first rate limit, to protect your own IP.

**Why do some queries have zeros or empty sections?**
Google shows no data when search volume is too low (rare terms, small regions, short periods, News or Shopping search). The item then has a `warnings` entry explaining which part is empty.

**Can I get absolute search volumes?**
No. Google Trends only publishes relative interest (0-100). Trending now gives Google's approximate volume (e.g. "20K+").

**Why are the numbers slightly different from the website?**
Google samples the data, so values for the same query can vary by a point or two between requests, on the website too.

**Can I schedule it?**
Yes. Use Apify Schedules to collect the same queries daily or weekly and build your own history.

### Limits

- Up to 5 terms per comparison (Google's limit).
- Related topics are not included by default: Google currently returns that list empty to automated requests. You can switch it on to try (`includeRelatedTopics`). An empty list costs nothing extra but is not an error.
- Trending now comes from Google's public feed and holds the current top searches for a country (usually 10-20), not the full list on the website.
- Data is what Google Trends publishes: relative, sampled and rounded.

# Actor input Schema

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

One query per line. Each line gives one result with all the data you select below. To compare up to 5 terms on the same 0-100 scale, put them on one line separated by commas, e.g. "coffee, tea".

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

Country or region codes, e.g. US, GB, CA, US-CA, CA-ON. Leave empty for worldwide. Each search term is scraped once per location.

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

Period to look at. Choose "Custom" to enter your own dates below.

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

Used only when Time range is "Custom". Format: "YYYY-MM-DD YYYY-MM-DD", e.g. "2024-01-01 2024-06-30". Google picks daily, weekly or monthly points depending on the length.

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

Google Trends category ID to narrow results, e.g. 71 = Food & Drink, 5 = Computers & Electronics, 7 = Finance. 0 = all categories. The ID is the "cat" number in a Google Trends URL.

## `searchProperty` (type: `string`):

Which Google search to measure.

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

The 0-100 timeline for the period, plus the average per term.

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

Interest per country, region, city or metro area.

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

Top and rising related searches for each term.

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

Top and rising related topics (single-term queries only). Note: Google currently returns this list empty to automated requests, so it is off by default. Turn it on to try; an empty list is not an error.

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

Level of detail for Interest by region. Default: countries for worldwide, regions (states, provinces) for a country. Metro areas (DMA) exist for the US only.

## `includeLowVolumeRegions` (type: `boolean`):

Also list regions where search volume is too low for a value (value null).

## `trendingNowCountries` (type: `array`):

Two-letter country codes, e.g. US, GB, CA. For each, saves the current "Trending now" searches from Google's public feed: title, approximate search volume, start time and related news links. Each trending search is one result.

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

Language for region names and formatted dates, e.g. en-US, de, fr, es.

## `timezoneOffset` (type: `integer`):

Minutes behind UTC, as Google Trends expects it. 0 = UTC, 300 = US Eastern (UTC-5), -60 = Central Europe (UTC+1). Affects hourly and daily points.

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

How many queries run in parallel. Google Trends rate-limits hard, so higher values do not always mean faster runs.

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

Google Trends rate-limits by IP. Apify Proxy rotates IPs when that happens. Without a proxy the run stops at the first rate limit.

## `debugSaveResponses` (type: `boolean`):

Save up to 10 raw Google responses to the key-value store. Only needed for troubleshooting.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee",
    "coffee, tea"
  ],
  "geos": [
    "US"
  ],
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "regionResolution": "",
  "includeLowVolumeRegions": false,
  "language": "en-US",
  "timezoneOffset": 0,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debugSaveResponses": false
}
```

# Actor output Schema

## `results` (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": [
        "coffee",
        "coffee, tea"
    ],
    "geos": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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