# Google Trends API: Interest, Regions & Queries (`deepmine/google-trends-api`) Actor

Google Trends scraper and API: interest over time (by the minute, back to 2004), interest by country, region, US metro and city, top and rising related queries, up to 5 terms compared, YouTube, News, Images and Shopping search, any category or date range. No login, no browser.

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

## Pricing

from $0.19 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 API: Interest, Regions & Queries

Google Trends API and scraper: type keywords or paste Google Trends links, and get each term's interest over time, interest by country, region, US metro area and city, and its top and rising related queries, one clean row per term.

| 🔍 Keyword | 📍 Location | ⛰️ Peak | 📅 Peak week | 📊 Average | 📈 Latest | 🔝 Top related queries |
|---|---|---|---|---|---|---|
| bitcoin | United States | 100 | 2026-02-01 | 35 | 17 | bitcoin price, bitcoin today, bitcoin stock |
| taylor swift | United States | 100 | 2025-09-28 | 26 | 36 | taylor swift lyrics, taylor swift wedding, travis kelce |
| air fryer | United States | 100 | 2026-04-12 | 64 | 53 | air fryer chicken, air fryer ninja, ninja |

<sub>Collected 2026-10-03 from the prefilled run of this Actor (past 12 months, United States).</sub>

**$0.59 per 1,000 search terms on Starter** ($1.19 Free, $0.29 Scale, $0.19 Business). The prefilled run (3 terms: bitcoin, taylor swift, air fryer) costs about $0.002. Terms Google has no data for are free, and there's no start fee.

### What you get for each search term

- **Interest over time**: every point Google draws (0-100), by the minute for the past hour up to by the month since 2004, with the date in ISO format, whether Google had data, and whether the point is still being counted.
- **Summary numbers**: peak value and date, average, latest value, and the change from the previous point in %.
- **Interest by place**: countries (worldwide searches), regions/states (a country), US metro areas (DMA codes), and cities with coordinates (on request). Every place Google lists is kept, sorted by interest; a place with too little search volume has `hasData: false`.
- **Related queries**: the top 25 and rising 25, with Google's values ("+250%", "Breakout"), a Breakout flag and a link to each on Google Trends. `topQueries` and `risingQueries` hold just the text for spreadsheets.
- **Related topics**: asked for on every single-term search. Google currently sends none to signed-out traffic (its answer is an empty list, even for a real browser and even from a home internet connection), so `relatedTopicsStatus` says `notProvidedByGoogle`; the rows fill in on their own if Google sends them.
- **Compare up to 5 terms on one scale** (like the Compare box on Google Trends): turn on *Compare terms* and put `coca cola, pepsi` on one line. Each term is still its own row, with `compareGroup`, `comparedWith` and Google's averages.
- **Search type**: web, YouTube, Google News, Images or Shopping searches. **Categories**: all 1,100+ Google Trends categories. **Any date range** from 2004 on.
- A link to the same view on Google Trends, the input line the row came from, and when it was read.

### Use cases

- **SEO and content planning**: find which related queries are rising before you write, and where a topic is searched most.
- **Product and market research**: compare up to 5 brands or products on one scale, by state or metro, over 5 years or since 2004.
- **Trading and finance signals**: watch search interest for tickers, coins or companies by the hour or minute.
- **Dashboards and reports**: schedule a run and get one tidy row per term (plus an optional flat CSV) for Sheets, Looker Studio or BI tools.

### How to use it

1. Put your keywords in **Search terms**, one per line. You can also paste Google Trends explore links (`https://trends.google.com/trends/explore?q=bitcoin&geo=US`); the link's own location, time range, category and search type are used.
2. Pick a **Location** (worldwide, a country or a state/region), a **Time range** and, if you like, a **Search type** and **Category**.
3. Run it, then download the results as JSON, CSV or Excel, or call it from the API, Make, Zapier or n8n.

Repeated terms are read once and charged once. Terms are delivered in the order you gave them, as soon as each one is ready.

### Output

One row per search term with data. Overview columns: keyword, location, time range, peak, peak date, average, latest, change %, top and rising queries, and the Google Trends link. A Stats view lists every number, a Rising queries view puts each rising query on its own line (with its growth and a Breakout flag), and a Regions view lists each region's interest.

Fields, in row order: `keyword`, `geo`, `geoName`, `timeframe`, `startDate`, `endDate`, `granularity`, `category`, `categoryName`, `property`, `compareGroup`, `comparedWith`, `peakValue`, `peakDate`, `averageValue`, `latestValue`, `latestIsPartial`, `changePercent`, `topQueries`, `risingQueries`, `interestOverTime`, `interestByCountry`, `interestByRegion`, `interestByMetro`, `interestByCity`, `relatedQueriesTop`, `relatedQueriesRising`, `relatedTopicsTop`, `relatedTopicsRising`, `relatedTopicsStatus`, `trendsUrl`, `inputUrlOrTerm`, `scrapedAt`, plus `flatTimelineUrl` when *Also save a flat timeline* is on. Places in the country, region, metro and city lists carry `hasData` (false where Google has too little volume). Empty means Google sent nothing for it (`null`, never an empty string).

Example row (lists cut to 2 entries):

```json
{
  "keyword": "bitcoin",
  "geo": "US",
  "geoName": "United States",
  "timeframe": "today 12-m",
  "startDate": "2025-09-28T00:00:00Z",
  "endDate": "2026-09-27T00:00:00Z",
  "granularity": "week",
  "category": 0,
  "categoryName": "All categories",
  "property": "web",
  "compareGroup": null,
  "comparedWith": null,
  "peakValue": 100,
  "peakDate": "2026-02-01T00:00:00Z",
  "averageValue": 35,
  "latestValue": 17,
  "latestIsPartial": true,
  "changePercent": 10.5,
  "topQueries": [
    "bitcoin price",
    "bitcoin today",
    "…"
  ],
  "risingQueries": [
    "spcx stock",
    "spcx stock price",
    "…"
  ],
  "interestOverTime": [
    {
      "date": "2025-09-28T00:00:00Z",
      "timestamp": 1759017600,
      "formattedTime": "Sep 28 – Oct 4, 2025",
      "formattedAxisTime": "Sep 28, 2025",
      "value": 29,
      "hasData": true,
      "isPartial": false
    },
    {
      "date": "2025-10-05T00:00:00Z",
      "timestamp": 1759622400,
      "formattedTime": "Oct 5 – 11, 2025",
      "formattedAxisTime": "Oct 5, 2025",
      "value": 37,
      "hasData": true,
      "isPartial": false
    },
    "…"
  ],
  "interestByCountry": null,
  "interestByRegion": [
    {
      "geoCode": "US-WY",
      "geoName": "Wyoming",
      "value": 100,
      "formattedValue": "100",
      "hasData": true
    },
    {
      "geoCode": "US-KS",
      "geoName": "Kansas",
      "value": 47,
      "formattedValue": "47",
      "hasData": true
    },
    "…"
  ],
  "interestByMetro": [
    {
      "geoCode": "759",
      "geoName": "Cheyenne WY-Scottsbluff NE",
      "value": 100,
      "formattedValue": "100",
      "hasData": true
    },
    {
      "geoCode": "678",
      "geoName": "Wichita-Hutchinson KS",
      "value": 55,
      "formattedValue": "55",
      "hasData": true
    },
    "…"
  ],
  "interestByCity": null,
  "relatedQueriesTop": [
    {
      "query": "bitcoin price",
      "value": 100,
      "formattedValue": "100",
      "isBreakout": false,
      "trendsUrl": "https://trends.google.com/trends/explore?q=bitcoin+price&date=today+12-m&geo=US"
    },
    {
      "query": "bitcoin today",
      "value": 18,
      "formattedValue": "18",
      "isBreakout": false,
      "trendsUrl": "https://trends.google.com/trends/explore?q=bitcoin+today&date=today+12-m&geo=US"
    },
    "…"
  ],
  "relatedQueriesRising": [
    {
      "query": "spcx stock",
      "value": 13950,
      "formattedValue": "Breakout",
      "isBreakout": true,
      "trendsUrl": "https://trends.google.com/trends/explore?q=spcx+stock&date=today+12-m&geo=US"
    },
    {
      "query": "spcx stock price",
      "value": 12350,
      "formattedValue": "Breakout",
      "isBreakout": true,
      "trendsUrl": "https://trends.google.com/trends/explore?q=spcx+stock+price&date=today+12-m&geo=US"
    },
    "…"
  ],
  "relatedTopicsTop": null,
  "relatedTopicsRising": null,
  "relatedTopicsStatus": "notProvidedByGoogle",
  "trendsUrl": "https://trends.google.com/trends/explore?q=bitcoin&date=today%2012-m&geo=US&hl=en-US",
  "inputUrlOrTerm": "bitcoin",
  "scrapedAt": "2026-10-03T16:14:52Z"
}
```

Free extras:

- **Issues**: one row per term that got no data row, with the reason: `noData` (Google has too little search volume for that term, place and time range), `invalid` (Google refused the request), `blocked` or `failed`. Never charged.
- **Flat timeline CSV** (when *Also save a flat timeline* is on): one line per term and date (`keyword`, `compareGroup`, `geo`, `timeframe`, `date`, `value`, `hasData`, `isPartial`) in one file per run (`TIMELINE.csv` in the run's key-value store, linked from the Output tab and from each row's `flatTimelineUrl`), ready for charts and spreadsheets. Never charged.

The run summary (`OUTPUT` in the key-value store) lists each input's result, the calls made and the time to the first row.

### Reliability

Google Trends answers a fresh datacenter IP with "429 Too Many Requests" until it has a cookie, and refuses a share of calls in bursts. This Actor gets the cookie with one small call per IP, spreads the data calls over several IPs, retries any refused call on another IP at once, and replaces an IP that's refused twice. A run never ends empty without saying why: terms without data go to the Issues dataset, a term Google keeps refusing is listed there as `blocked`, and if Google refuses everything the run fails with a clear message. A restarted run never charges a row twice.

No browser and no residential proxy: at the default 256 MB the first row usually comes 1-3 seconds after the container starts, and up to about 7 seconds when Google refuses a burst of calls and the Actor retries them on other IPs (measured 2026-10-06, 4 runs: 1.2-2.8 s). Measured runs at 256 MB (2026-10-03):

| Run | Rows | Run time | Peak memory |
|---|---|---|---|
| Prefill: 3 terms, US, 12 months | 3 | 6 s | 68 MB |
| 40 terms, US, 5 years | 40 | 36 s | 87 MB |
| 3 compare groups + a Trends link, worldwide since 2004, cities and flat CSV on | 14 | 13 s | 83 MB |

100 terms take about a minute at 256 MB and about 40 seconds at 512 MB (Run options → Memory); the price per term is the same.

### FAQ

**What do the numbers mean?** Google Trends values are relative: 100 is the term's peak in the chosen place and time range, 50 is half as popular. They aren't search counts. Compared terms share one scale.

**Why is a term in the Issues dataset?** Google shows "not enough data" for it in that place and time range. Try a wider range or Worldwide. You aren't charged for it.

**Can I get daily data for a whole year?** Google picks the step from the range: daily up to ~9 months, weekly up to 5 years, monthly beyond. Run several shorter custom ranges for daily points.

**Trending searches?** Use our [Google Trending Now API](https://apify.com/deepmine/google-trending-now-api) for the live list of what's trending in any country or US state.

### Feedback

Questions, a missing field or a bug? Open an issue on the Issues tab; we answer within 48 hours. If the Actor saves you time, a review on its Store page helps a lot.

# Actor input Schema

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

Keywords to look up, one per line: words (bitcoin), phrases ("electric car"), topic ids (/m/05p0rrx) or Google Trends explore links (trends.google.com/trends/explore?q=...; the link's own location, time range, category and search type are used). You pay per term that has data; terms without data are free.

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

On: each line can hold up to 5 terms separated by commas (coca cola, pepsi), and Google scores them on one scale, like the Compare box on Google Trends. Each term is still its own row.

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

Worldwide, a country or a region (state, province). US locations also get interest by metro area (DMA).

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

How far back to look. Past hour and past 4 hours come by the minute, past day and 7 days by the hour, up to 9 months by the day, then by the week or month. For any other range, set dates under Custom date range.

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

Which Google search to measure: web search, YouTube, Google News, Google Images or Google Shopping.

## `category` (type: `string`):

Narrow the data to searches in one Google Trends category (e.g. 'jaguar' in Autos & Vehicles).

## `startDate` (type: `string`):

First day (YYYY-MM-DD).

## `endDate` (type: `string`):

Last day (YYYY-MM-DD). Empty = today.

## `sections` (type: `array`):

What each row holds. City data is off by default (long lists of small places). Fewer parts = faster runs.

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

Also list places with little search volume (Google's own checkbox).

## `includeFlatTimeline` (type: `boolean`):

Also saves every term's interest over time as one CSV file per run (keyword, date, value), ready for spreadsheets and charts. Find it in the Output tab; each row links to it in flatTimelineUrl. Free: you pay per term, not per data point.

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

Language of place names and dates (e.g. en-US, de, ja).

## `timezoneOffsetMinutes` (type: `integer`):

Minutes BEHIND UTC, as Google Trends counts them: 0 = UTC, 300 = New York (EST), -60 = Berlin (CET). Timestamps in the rows are always UTC.

## `maxItems` (type: `integer`):

Stop after this many rows, e.g. 50. Each search term with data is one row. Empty = all terms.

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

How many terms are read at once.

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

Leave as is: Google Trends answers Apify's datacenter proxy (no proxy traffic for you). A residential pick is switched to datacenter.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin",
    "taylor swift",
    "air fryer"
  ],
  "compareTerms": false,
  "geo": "US",
  "timeframe": "today 12-m",
  "property": "web",
  "category": "0",
  "sections": [
    "interestOverTime",
    "interestByRegion",
    "interestByMetro",
    "relatedQueries",
    "relatedTopics"
  ],
  "includeLowVolumeRegions": false,
  "includeFlatTimeline": false,
  "language": "en-US",
  "timezoneOffsetMinutes": 0,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `issues` (type: `string`):

No description

## `timeline` (type: `string`):

No description

## `summary` (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": [
        "bitcoin",
        "taylor swift",
        "air fryer"
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/google-trends-api").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": [
        "bitcoin",
        "taylor swift",
        "air fryer",
    ],
    "geo": "US",
    "timeframe": "today 12-m",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/google-trends-api").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": [
    "bitcoin",
    "taylor swift",
    "air fryer"
  ],
  "geo": "US",
  "timeframe": "today 12-m",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call deepmine/google-trends-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/google-trends-api"
        }
    }
}
```

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/hBGzLMkgpQusdfNhW/builds/8wiCl3Fe893Ab5i70/openapi.json
