# Google Trends Scraper: Interest Over Time, Regions & Queries (`tablewise/google-trends-scraper`) Actor

Scrape Google Trends for any keyword, or compare up to 5: interest over time, interest by country or region, and top and rising related queries. Any country, time range, category and search type: web, news, images, YouTube or Shopping. Export to JSON, CSV or Excel, or use the API.

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

## Pricing

from $5.00 / 1,000 searches

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

### What is Google Trends Scraper?

Google Trends Scraper gets Google Trends data for any keyword, or compares up
to 5 keywords on the same scale: interest over time, interest by country or
region, and the top and rising related queries. Any country, time range,
category and search type (web, news, images, YouTube or Google Shopping).
No API key needed. **USD 5 per 1,000 searches**; searches without data are
free.

### What you can do with it

- **Keyword research:** check whether a topic is growing or fading before
  you write content, launch a product or buy ads.
- **Compare brands, products or ideas** on the same 0–100 scale: up to 5
  terms per line, and a comparison costs the same as a single term.
- **Find where demand is:** interest by country (worldwide) or by state and
  region (when you pick a country).
- **Catch new search ideas** with the rising related queries, including the
  "Breakout" ones.
- **Track trends over time:** run it on a schedule and keep a history.
- Feed trend data to an AI agent through Apify's MCP server.

### Example output

One row per search line. This is a real row (lists shortened here; you get
them in full: 53 weekly points for 12 months, every country, up to 25 top and
25 rising queries per term):

```json
{
  "terms": [
    "coffee",
    "tea",
    "matcha"
  ],
  "is_comparison": true,
  "geo": "worldwide",
  "time_range": "today 12-m",
  "time_range_resolved": "2025-11-14 2026-11-14",
  "resolution": "WEEK",
  "category": 0,
  "property": "web",
  "has_data": true,
  "averages": {
    "coffee": 75,
    "tea": 40,
    "matcha": 8
  },
  "timeline": [
    {
      "date": "2025-11-09T00:00:00Z",
      "label": "Nov 9 – 15, 2025",
      "values": {
        "coffee": 69,
        "tea": 37,
        "matcha": 7
      },
      "partial": false
    },
    {
      "date": "2025-11-16T00:00:00Z",
      "label": "Nov 16 – 22, 2025",
      "values": {
        "coffee": 70,
        "tea": 38,
        "matcha": 7
      },
      "partial": false
    },
    {
      "date": "2026-11-08T00:00:00Z",
      "label": "Nov 8 – 14, 2026",
      "values": {
        "coffee": 57,
        "tea": 31,
        "matcha": 7
      },
      "partial": true
    }
  ],
  "regions": [
    {
      "geo_code": "SG",
      "geo_name": "Singapore",
      "values": {
        "coffee": 54,
        "tea": 38,
        "matcha": 8
      }
    },
    {
      "geo_code": "US",
      "geo_name": "United States",
      "values": {
        "coffee": 65,
        "tea": 30,
        "matcha": 5
      }
    }
  ],
  "related_queries": {
    "coffee": {
      "top": [
        {
          "query": "coffee shop",
          "value": 100
        },
        {
          "query": "coffee table",
          "value": 92
        }
      ],
      "rising": [
        {
          "query": "how to remove coffee stain from carpet",
          "value": 7000,
          "formatted": "Breakout"
        },
        {
          "query": "how to brew pour over coffee",
          "value": 6100,
          "formatted": "Breakout"
        }
      ]
    },
    "matcha": {
      "top": [
        {
          "query": "matcha latte",
          "value": 100
        },
        {
          "query": "the matcha",
          "value": 87
        }
      ],
      "rising": [
        {
          "query": "djarum black matcha",
          "value": 11900,
          "formatted": "Breakout"
        },
        {
          "query": "grind rail",
          "value": 10500,
          "formatted": "Breakout"
        }
      ]
    }
  },
  "missing_parts": [],
  "explore_url": "https://trends.google.com/trends/explore?q=coffee%2Ctea%2Cmatcha&date=today%2012-m",
  "scraped_at": "2026-11-14T15:07:21Z"
}
```

| Field | What it is |
| --- | --- |
| `terms`, `is_comparison` | The term or terms of this line |
| `geo`, `time_range`, `category`, `property` | What was asked: region (`worldwide` if empty), time range, category ID and search type |
| `time_range_resolved`, `resolution` | Exact dates Google used and the step of the timeline (for example `HOUR` for 7 days, `DAY` for 90 days, `WEEK` for 12 months, `MONTH` for 2004–present) |
| `has_data` | `true` when Google has data for the search |
| `averages` | Average interest of each term over the period (Google gives it for comparisons only) |
| `timeline` | One point per hour, day, week or month: `date` (UTC), Google's `label`, `values` (0–100 per term) and `partial` (the last, still incomplete period) |
| `regions` | Interest by country or region. For one term: 0–100. For a comparison: how the searches split between the terms in each region, in % |
| `related_queries` | Per term: `top` (most searched, 0–100) and `rising` (biggest growth: `value` in %, `formatted` as Google shows it, where "Breakout" means more than +5,000%) |
| `missing_parts` | Optional parts that could not be fetched for this row (normally empty) |
| `explore_url` | The same search on the Google Trends website |
| `input` | The search line exactly as you entered it |
| `status` | `ok` for a search with data, or why there is no data (table below) |
| `status_message` | The reason in plain words; empty for `ok` rows |
| `scraped_at` | When the row was produced (UTC) |

All values are relative, as on the Google Trends website: 100 is the peak
of interest in the chosen period and region, not a number of searches.

| `status` | What it means | Charged? |
| --- | --- | --- |
| `ok` | Google Trends data for the search | Yes |
| `no_data` | Google does not have enough data for this search (rare terms, short time ranges, small regions) | No |
| `invalid_input` | More than 5 terms on one line | No |
| `blocked` | Google refused the request (captcha or too many requests); try again later | No |
| `error` | Google answered with an unexpected response | No |

### What it costs

| Event | Price |
| --- | --- |
| Actor start | USD 0.0005 per run |
| Search (one line: one term or a comparison of up to 5) | USD 0.005 |

**Example:** 100 keywords = USD 0.50, plus USD 0.0005 per run. Comparing 5
keywords on one line costs USD 0.005, not 0.025.

You only pay for rows with `status` `ok`. Searches without data, failed
searches and repeated lines are not charged. Use **Maximum searches** to cap
the spend.

#### How many searches can I run with the free plan?

Apify's free plan includes USD 5 of credit every month. Used only for
this Actor, that is about 995 searches: for example, 5 runs of 199 searches =
5 × (0.0005 + 199 × 0.005) = USD 4.98. A comparison of up to 5 keywords counts
as one search.

### How to use it

1. Add your **Search terms**, one per line. To compare terms on the same
   chart, put up to 5 on one line separated by commas: `coffee, tea, matcha`.
2. Pick the **Time range** and, if you want, a **Country or region** code
   (`US`, `GB`, `US-CA`...). Empty means worldwide.
3. Click **Start** and download the results as JSON, CSV or Excel.

With an empty input it runs two sample searches (`python` and `coffee, tea,
matcha`), so you can see the output first. Under **Advanced** you can pick
another **Search type** (news, images, YouTube, shopping), a **Category ID**,
a custom date range like `2024-01-01 2024-12-31`, or leave out regions or
related queries.

#### Input

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `searchTerms` | array | `["python", "coffee, tea, matcha"]` | One search per item; up to 5 comma-separated terms to compare |
| `timeRange` | string | `today 12-m` | Time range, same options as the website (`now 1-H`, `now 7-d`, `today 1-m`, `today 3-m`, `today 5-y`, `all`...) |
| `geo` | string | `""` (worldwide) | Country or region code |
| `searchType` | string | `""` (web) | `images`, `news`, `youtube` or `froogle` (Google Shopping) |
| `category` | integer | 0 | Category ID (`cat` in a Trends URL) |
| `customTimeRange` | string | `""` | Custom range `YYYY-MM-DD YYYY-MM-DD`; overrides `timeRange` |
| `includeRegions` | boolean | `true` | Include interest by region |
| `includeRelatedQueries` | boolean | `true` | Include related queries |
| `language` | string | `en-US` | Language for labels and region names |
| `maxResults` | integer | 100 | Stops after this many searches, so you never pay for more |
| `delayBetweenRequests` | integer | 2 | Seconds between requests to Google |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Off by default: not needed in our tests |

### Use it from the API, n8n or an AI agent

**API.** This call runs the Actor and returns the rows when it finishes (it
waits up to 5 minutes; for longer runs, start the run and read its dataset
when it ends):

```bash
curl -X POST "https://api.apify.com/v2/acts/tablewise~google-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["chatgpt, gemini, claude"], "geo": "US"}'
```

**Python**, with the official client (`pip install "apify-client>=3"`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("tablewise/google-trends-scraper").call(
    run_input={"searchTerms": ["chatgpt, gemini, claude"], "geo": "US"}
)
for row in client.dataset(run.default_dataset_id).iterate_items():
    print(row["status"], row["terms"], row["averages"])
```

**n8n, Make or Zapier.** With the Apify node or app, run the Actor
`tablewise/google-trends-scraper` with `{"searchTerms": [...]}` as the
input, then read the items of its dataset.

**For AI agents (MCP).** Add Apify's MCP server (`https://mcp.apify.com`)
and call the Actor `tablewise/google-trends-scraper`:

- Input: `{"searchTerms": ["<keyword>", "<term 1>, <term 2>"]}`. Every
  other field has a default (past 12 months, worldwide, web search). `{}`
  runs two sample searches.
- Output: one row per line. Rows with `status` `ok` are charged USD 0.005
  each, plus USD 0.0005 per run; the rest are free.
- Rows that are not `ok` say why in `status_message`: `no_data`,
  `invalid_input`, `blocked` or `error`.
- Each search takes about 15 seconds.

### Speed and reliability

Each search takes about 15 seconds: one request for the search plus one per
chart (timeline, regions, and related queries per term), with a pause
between requests so Google does not refuse them. In our 48-hour test on
Apify, 12 of 12 runs succeeded, with no blocks in 240 requests. In a larger
test, 120 searches (60 single terms and 60 comparisons) finished 120 out of
120: 584 of 587 requests were answered on the first try and the other 3 on
a retry. When Google answers "too many requests", the Actor waits and tries
again; if Google shows a captcha three times in a row, the run stops asking
instead of insisting, and nothing is charged for those searches.

### Limits and known issues

- Values are relative (0–100), like on the website. Google does not publish
  search volumes.
- The last point of the timeline covers a period that is not over yet; it
  is marked `partial: true` and its value can still change.
- "Related topics" are not included: Google returned them empty in all our
  tests.
- Rising queries are shown exactly as Google lists them, including the odd
  spam query.
- Data comes from the public Google Trends website. No personal data is
  collected.

### FAQ

#### Is there a Google Trends API?

Google has no public API for Trends data. This Actor gives you the same
numbers you see on trends.google.com as JSON, CSV or Excel, through the
Apify API, without a Google account or API key.

#### Does it give search volumes?

No. Google Trends publishes relative values only (0–100), and so does this
Actor: 100 is the peak of interest in the chosen period and region.

#### How many keywords can I compare?

Up to 5 on one line, separated by commas, as on the website. A comparison
costs the same as a single keyword.

#### Can I get YouTube search trends?

Yes. Set **Search type** to YouTube search (`"searchType": "youtube"`) to
get the YouTube Search data from Google Trends. News, image and Google
Shopping searches work the same way.

#### Is it legal to scrape Google Trends?

This Actor only reads pages that anyone can open without logging in, and it
does not collect personal data. Whether scraping is allowed depends on your
country and on how you use the data, and Google Trends's terms of use may
restrict automated access. If you are not sure, ask a lawyer.

#### Can I schedule it or send the results to other tools?

Yes. You can run it on a schedule, export each run as JSON, CSV or Excel, get
a webhook when it finishes, and connect it to Make, Zapier, n8n, Google
Drive, Slack and other tools through Apify integrations.

### Support

Found a problem? Open an issue on the Actor's **Issues** tab with the run ID
and we'll look into it. If the Actor is useful to you, a rating on its Store
page helps other people find it.

### More Actors from the same developer

- [YouTube Transcript & Subtitles Scraper](https://apify.com/tablewise/youtube-transcript-scraper): the transcript of any YouTube video, Short or channel as text or SRT, with the video details.
- [Semrush Scraper: Authority Score, Traffic & Backlinks](https://apify.com/tablewise/semrush-domain-metrics-scraper): Authority Score, backlinks, referring domains and traffic for any list of domains.
- [Google Hotels Scraper](https://apify.com/tablewise/google-hotels-scraper): hotel prices for your dates, ratings and prices by booking site.
- [Website Email & Contact Scraper](https://apify.com/tablewise/website-email-contact-scraper): emails, phones and social profiles from any list of websites.
- [LinkedIn Company Scraper](https://apify.com/tablewise/linkedin-company-scraper): size, industry, employees, website and offices of any LinkedIn company page.
- [LinkedIn Jobs Scraper](https://apify.com/tablewise/linkedin-jobs-scraper): LinkedIn job postings with full description, salary, seniority and applicants, without login.
- [Workday, Greenhouse, Lever & Ashby Jobs Scraper](https://apify.com/tablewise/workday-greenhouse-lever-jobs-scraper): every open job from company careers sites on those four platforms.
- [AliExpress Search Scraper](https://apify.com/tablewise/aliexpress-search-scraper): prices, discounts, ratings and units sold from any AliExpress search.
- [Amazon Best Sellers Scraper](https://apify.com/tablewise/amazon-bestsellers-scraper): the top 100 of any Amazon.com Best Sellers or Hot New Releases list.
- [Amazon Product Details Scraper](https://apify.com/tablewise/amazon-product-details-scraper): price, Best Sellers Rank, specs and images for any list of ASINs.
- [Tennis Results & Odds Scraper](https://apify.com/tablewise/tennis-results-scraper): ATP, WTA, Challenger and ITF results and fixtures with set scores and betting odds.

# Actor input Schema

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

Enter one search per line. To compare up to 5 terms on the same chart, put them on one line separated by commas, for example: coffee, tea, matcha.

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

Same options as the Google Trends website.

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

Enter a country code (US, GB, AR) or a region code (US-CA, BR-SP). Leave empty for worldwide.

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

Which Google search to measure.

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

Enter the number from the 'cat' parameter of a Trends URL, for example 5 = Computers & Electronics. 0 = all categories.

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

Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-12-31.

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

By country (worldwide) or by subregion (when a country is set). One more request per search.

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

Top and rising related queries for each term. One more request per term.

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

Language for labels and region names, for example en-US, es-419 or pt-BR.

## `maxResults` (type: `integer`):

Process only the first N lines, so you never pay for more than N searches.

## `delayBetweenRequests` (type: `integer`):

Wait this long between requests to Google. Lower is faster but Google may refuse more often.

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

Off by default: Google Trends answered normally without a proxy in our tests.

## Actor input object example

```json
{
  "searchTerms": [
    "python",
    "coffee, tea, matcha"
  ],
  "timeRange": "today 12-m",
  "geo": "",
  "searchType": "",
  "category": 0,
  "customTimeRange": "",
  "includeRegions": true,
  "includeRelatedQueries": true,
  "language": "en-US",
  "maxResults": 100,
  "delayBetweenRequests": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per search line: interest over time, interest by region and related queries for the term or comparison.

# 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": [
        "python",
        "coffee, tea, matcha"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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