# Google Trends Scraper: Trending Now & Compare (`luzivanlt/google-trends-scraper`) Actor

Google Trends over time, by region and related queries for up to 5 compared terms, plus Trending Now. $0.02 per 1,000 results. One row per point.

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

## Pricing

from $0.01 / 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.
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 Scraper: Trending Now & Compare

Get Google Trends as flat rows, ready for a spreadsheet: interest over time,
interest by region, metro or city, and top and rising related queries, for
single terms or up to 5 terms compared on one chart, plus up to 5,000
Trending Now searches per country with search volumes. No Google account needed.

Tested daily. Latest checks: 30 searches and the 7-day Trending Now lists of
the US, the UK and India in one run, 13,317 rows in 5 minutes with every
search read; the US list alone held 3,480 trending searches.

### What does this Actor do?

You give it search terms (one search per line; put up to 5 terms on one line,
separated by commas, to compare them), links copied from Google Trends, or
countries for Trending Now. For each search it reads what the Google Trends
explore page shows for your country, time range, category and Google property,
and saves one row per data point:

- **Interest over time:** one row per point of the chart and per term, with
  its date, the 0 to 100 value Google shows, whether the point is still
  partial, Google's note on the chart where there is one, and, for compared
  terms, each term's average.
- **Interest by region:** one row per region and per term, with its 0 to 100
  value. A country gives its regions (states, provinces), a region gives its
  metros or cities (with coordinates), worldwide gives countries. For
  compared terms, each row says which term leads there.
- **Related queries:** the top queries (0 to 100) and the rising ones (growth
  in percent, or Breakout), for each term, with a link to explore each one.

For each **Trending Now** country it saves one row per trending search, in
Google's order: the search volume, the growth in percent, when it started and
ended (or that it is still active), the searches Google groups under it, and
its categories. Pick the past 4, 24 or 48 hours or 7 days, keep only some
categories, or only trends still active.

### Why use it?

- **Rows, not nested blobs.** Every point, region and query is its own row
  with the term, country and time range on it, so a CSV or Excel export is a
  table you can chart or pivot straight away.
- **Compare up to 5 terms on one chart**, as Google Trends does, with each
  term's value on the same scale, and which term leads in each region.
- **Long Trending Now lists**: up to 5,000 trending searches per country
  (500 by default). The US list of the past 7 days held 3,480 on the latest
  check.
- **Every Google Trends setting**: any country, region or US metro, preset or
  custom dates back to 2004, any category, and web, image, news, Shopping or
  YouTube search.
- **Pay per row, and only for what you turn on.** Switch off interest over
  time, by region or related queries to save only what you need.

### How to use it

1. Type your search terms, one search per line (put up to 5 terms on one line,
   separated by commas, to compare them), or paste Google Trends links.
2. Pick the country or region, the time range, and if you want, a category and
   a Google property.
3. For Trending Now, add country codes, pick the window, and if you want,
   categories.
4. Click **Start**, then download the rows as JSON, CSV or Excel.

### Input

| Field                                                | What it does                                                                       | Default        |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------- |
| **Search terms** (`searchTerms`)                     | One search per line; up to 5 terms on one line, separated by commas, are compared  | —              |
| **Google Trends links** (`startUrls`)                | Explore or Trending Now links; each keeps its own settings                         | —              |
| **Country or region** (`geo`)                        | `US`, `GB`, `US-CA`, `US-CA-807`…; empty for worldwide                             | worldwide      |
| **Time range** (`timeRange`)                         | Past hour, 4 hours, day, 7 days, 30 days, 90 days, 12 months, 5 years, 2004 to now | past 12 months |
| **Custom dates** (`customTimeRange`)                 | Two dates, e.g. `2025-01-01 2025-06-30`; overrides Time range                      | —              |
| **Category** (`category`)                            | Google Trends' category number (the `cat=` of a link), 0 for all                   | 0              |
| **Google property** (`searchProperty`)               | Web, image, news, Google Shopping or YouTube search                                | web            |
| **Language** (`language`)                            | The language of region names and Trending Now, e.g. `en-US`, `de`                  | `en-US`        |
| **Interest over time** (`includeInterestOverTime`)   | Save the chart's points                                                            | on             |
| **Interest by region** (`includeInterestByRegion`)   | Save the regions, metros or cities                                                 | on             |
| **Related queries** (`includeRelatedQueries`)        | Save the top and rising related queries                                            | on             |
| **Trending Now countries** (`trendingCountries`)     | Two-letter country codes to read Trending Now for                                  | —              |
| **Trending Now window** (`trendingHours`)            | `4`, `24`, `48` or `168` hours                                                     | `24`           |
| **Trending Now categories** (`trendingCategories`)   | Keep only these categories                                                         | all            |
| **Only active trends** (`trendingActiveOnly`)        | Leave out trends that have ended                                                   | off            |
| **Max trends per country** (`maxTrendingPerCountry`) | The most Trending Now rows per country (1 to 5,000)                                | 500            |

Give at least one search term, link or Trending Now country. Example input:

```json
{
  "searchTerms": ["coffee", "tea, coffee, matcha"],
  "geo": "US",
  "timeRange": "today 5-y",
  "trendingCountries": ["US", "GB"],
  "trendingHours": "168"
}
```

### Output

One row per data point. `result_type` says which kind it is:
`interest_over_time`, `interest_by_region`, `related_query` or
`trending_search`. Examples with made-up values:

```json
{
  "result_id": "interest_over_time|https://trends.google.com/trends/explore?q=coffee&date=today+12-m&geo=US&hl=en-US|0|1790812800",
  "result_type": "interest_over_time",
  "keyword": "coffee",
  "search_terms": ["coffee"],
  "geo": "US",
  "time_range": "today 12-m",
  "category_id": 0,
  "property": "web",
  "language": "en-US",
  "input_link": "https://trends.google.com/trends/explore?q=coffee&date=today+12-m&geo=US&hl=en-US",
  "date": "2026-10-01T00:00:00.000Z",
  "timestamp": 1790812800,
  "formatted_time": "Oct 1 – 7, 2026",
  "formatted_axis_time": "Oct 1, 2026",
  "value": 87,
  "formatted_value": "87",
  "has_data": true,
  "is_partial": false,
  "axis_note": null,
  "term_average": null,
  "resolution": "WEEK",
  "time_range_resolved": "2025-10-23 2026-10-23"
}
```

```json
{
  "result_type": "interest_by_region",
  "keyword": "coffee",
  "geo_code": "US-WA",
  "geo_name": "Washington",
  "value": 100,
  "formatted_value": "100",
  "has_data": true,
  "leading_term": null,
  "latitude": null,
  "longitude": null,
  "region_rank": 1,
  "region_resolution": "REGION"
}
```

```json
{
  "result_type": "related_query",
  "keyword": "coffee",
  "query": "coffee shop near me",
  "ranking": "rising",
  "rank": 1,
  "value": 5000,
  "formatted_value": "Breakout",
  "is_breakout": true,
  "explore_url": "https://trends.google.com/trends/explore?q=coffee+shop+near+me&date=today+12-m&geo=US",
  "rising_compared_with": "2024-10-23 2025-10-22"
}
```

```json
{
  "result_type": "trending_search",
  "keyword": "world series",
  "explore_term": "world series",
  "geo": "US",
  "trending_hours": 24,
  "trending_rank": 1,
  "started_at": "2026-10-22T23:00:00.000Z",
  "ended_at": null,
  "is_active": true,
  "search_volume": 1000000,
  "increase_percent": 1000,
  "related_terms": ["world series", "world series game 1", "world series score"],
  "category_ids": [17],
  "categories": ["Sports"],
  "explore_url": "https://trends.google.com/trends/explore?q=world%20series&geo=US&date=now%201-d&hl=en-US"
}
```

Every row also carries `result_id`, `keyword`, `language` and `input_link`;
search rows carry `search_terms`, `geo`, `time_range`, `category_id` and
`property`.

| Field                                                                            | What it is                                                                                                       |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `result_id`, `result_type`                                                       | The row's id (unique in a run) and its kind                                                                      |
| `keyword`, `search_terms`                                                        | The term the row is about, and every term of its search (compared terms share one scale)                         |
| `geo`, `time_range`, `category_id`, `property`, `language`, `input_link`         | The search's country or region, time range, category, Google property, language and link                         |
| `date`, `timestamp`, `formatted_time`, `formatted_axis_time`                     | A chart point's start (UTC), as a Unix time, and as Google labels it                                             |
| `value`, `formatted_value`, `has_data`                                           | The 0 to 100 value (a rising query: its growth in percent) and as Google shows it                                |
| `is_partial`, `axis_note`, `term_average`                                        | Whether the point is still being counted, Google's note on the chart, and the term's average                     |
| `resolution`, `time_range_resolved`                                              | The chart's step (minute, hour, day, week, month) and the dates it covers                                        |
| `geo_code`, `geo_name`, `region_rank`, `region_resolution`                       | The region's code and name, its place on the list, and its level (country, region, metro, city)                  |
| `leading_term`, `latitude`, `longitude`                                          | Which compared term leads there, and a city's coordinates                                                        |
| `query`, `ranking`, `rank`, `is_breakout`, `explore_url`, `rising_compared_with` | A related query, top or rising, its place, Breakout, its explore link, and the period rising is measured against |
| `explore_term`, `trending_hours`, `trending_rank`                                | A trend's search as Google explores it, the window, and its place in Google's list                               |
| `started_at`, `ended_at`, `is_active`                                            | When the trend started and ended (UTC), and whether it is still active                                           |
| `search_volume`, `increase_percent`                                              | Google's search volume (the lower bound it shows, e.g. 200000 for 200K+) and the growth in percent               |
| `related_terms`, `category_ids`, `categories`                                    | The searches grouped under the trend, and its categories                                                         |

### How much does it cost?

No surcharges and no paid options; an item that fails is not charged.

This Actor is priced per row saved:

- **$0.02 per 1,000 results** ($0.00002 a row): a chart point, a region, a
  related query or a trending search. Each is charged once per run.
- No start fee, and nothing per search.

So one term over 12 months in the US (about 150 rows: 53 weekly points, 51
states, top and rising queries) costs about $0.003, and the US Trending Now
list of the past 7 days (3,480 rows) costs $0.07. If you set a maximum cost for a run, the Actor stops when it
reaches it and keeps every row saved so far.

### How long does a run take?

About 10 seconds for one search and a short Trending Now list, a minute for
two compared searches (3 and 5 terms, 5 years) and a Singapore link (2,815
rows), about a minute and a quarter for the US Trending Now list of 7 days
(3,480 rows), and 5 minutes for 30 searches
with three countries' 7-day lists (13,317 rows). Many searches are read at
about six a minute.

### Good to know

- **Values are Google's 0 to 100 scale, not search counts.** 100 is the peak
  of the chart (or of the regions); compared terms share one scale. Only
  Trending Now gives volumes, as Google's rounded lower bounds.
- **The last point of a chart is often partial** (`is_partial`): its period
  is still being counted.
- **Related topics are not included.**
- **A region's level depends on the country**: most countries give regions, a
  US state gives metros, a small country gives cities. The level is on every
  region row.
- **Google rounds and samples.** A term with too little search interest
  returns zeros or no rows; the same search run twice can differ slightly.
- **Check your input first.** A search term, link or country that cannot be
  read stops the run before anything is read, and the message names it.
- **One search that cannot be read does not stop the run.** The others carry
  on, and the run's status lists the searches that could not be read.

### More Actors from us

- [Google Ads Transparency Scraper: Every Ad by Site](https://apify.com/luzivanlt/google-ads-transparency-scraper): Google Ads Transparency Center ads by website, advertiser or name, to the last page, in 216 regions.
- [Google News Scraper: By Date](https://apify.com/luzivanlt/google-news-scraper): Google News read day by day past the usual 100 per search: 4,440 articles from two keywords over 30 days.
- [Google Play Reviews Scraper: Device, Star Filter & Replies](https://apify.com/luzivanlt/google-play-reviews-scraper): Google Play reviews with the device each was written on, a star filter and the developer's reply.
- [AliExpress Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/aliexpress-products-scraper): Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- [Amazon Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/amazon-products-scraper): Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- [App Store Reviews Scraper: All Reviews, Not 500](https://apify.com/luzivanlt/app-store-reviews-scraper): Every written App Store review of an app, not just the newest 500.
- [Woolworths Coles ALDI Scraper: AU Grocery Prices](https://apify.com/luzivanlt/au-supermarkets-scraper): Woolworths, Coles and ALDI products for any search in one run, every results page to the end.
- [Bilibili Video Scraper: Search & Channel Videos](https://apify.com/luzivanlt/bilibili-videos-scraper): Bilibili videos from searches or whole channels, each with its full detail page's data.
- [Career Site Jobs Scraper: Workday, Greenhouse, Lever](https://apify.com/luzivanlt/career-site-jobs-scraper): Every job on Greenhouse, Lever, Ashby, SmartRecruiters and Workday boards, checked against each board's count.

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

One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with `POST /v2/acts/…/runs` and read its dataset):

```text
POST https://api.apify.com/v2/acts/luzivanlt~google-trends-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

With the sample input as its JSON body:

```json
{
  "searchTerms": ["coffee"],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "language": "en-US",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "trendingCountries": ["US"],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "maxTrendingPerCountry": 50
}
```

Its inputs, in the order of the input form:

| Input                                            | What it takes                                                                                                                                                                                          | Default        |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| `searchTerms` (Search terms)                     | What to look up on Google Trends, one search per line, e.g. coffee.                                                                                                                                    | —              |
| `startUrls` (Google Trends links)                | Links copied from Google Trends, e.g. https://trends.google.com/trends/explore?q=bitcoin\&geo=US.                                                                                                       | —              |
| `geo` (Country or region)                        | Where to measure interest: a country code such as US, GB, DE or IN, a region such as US-CA, or a US metro such as US-CA-807, e.g. US.                                                                  | —              |
| `timeRange` (Time range)                         | The period of the chart, e.g. Past 12 months.                                                                                                                                                          | `"today 12-m"` |
| `customTimeRange` (Custom dates)                 | Two dates instead of a preset time range, start then end, from 2004-01-01 to today, e.g. 2025-01-01 2025-06-30.                                                                                        | —              |
| `category` (Category)                            | Google Trends' category number, as in the cat= part of an explore link, e.g. 71 for Food & Drink, 7 for Finance, 5 for Computers & Electronics, 20 for Sports. 0 for all categories.                   | `0`            |
| `searchProperty` (Google property)               | Which Google search to measure, e.g. YouTube search: web search (the default), image search, news search, Google Shopping or YouTube search, as the Google property menu on Google Trends offers.      | `""`           |
| `language` (Language)                            | The language Google names regions and related data in, and the language of the Trending Now lists, e.g. en-US, de, fr, ja or pt-BR.                                                                    | `"en-US"`      |
| `includeInterestOverTime` (Interest over time)   | Save one row per point of the chart, per term: the 0 to 100 value Google shows, its date, its label, whether the last point is still partial, and each compared term's average.                        | `true`         |
| `includeInterestByRegion` (Interest by region)   | Save one row per region, metro or city, per term, with its 0 to 100 value, its code and name, and, when terms are compared, the term that leads there.                                                 | `true`         |
| `includeRelatedQueries` (Related queries)        | Save one row per related query, per term: the top queries with their 0 to 100 value and the rising ones with their growth in percent, or Breakout for the fastest risers, with a link to explore each. | `true`         |
| `trendingCountries` (Trending Now countries)     | Two-letter country codes to read Google's Trending Now list for, e.g. US, GB, IN.                                                                                                                      | —              |
| `trendingHours` (Trending Now window)            | How far back the Trending Now list goes, e.g. Past 7 days: the past 4 hours, 24 hours, 48 hours or 7 days, as the Trending Now page offers.                                                            | `"24"`         |
| `trendingCategories` (Trending Now categories)   | Keep only trends in these categories, e.g. Sports and Technology, as the category menu of the Trending Now page offers.                                                                                | —              |
| `trendingActiveOnly` (Only active trends)        | Keep only trends Google still marks as active, leaving out those that have ended, as the Active toggle of the Trending Now page does.                                                                  | `false`        |
| `maxTrendingPerCountry` (Max trends per country) | The most Trending Now rows to save for each country, from 1 to 5,000, in the order Google lists them.                                                                                                  | `500`          |

Apify's MCP server, `https://mcp.apify.com`, lists it as `luzivanlt/google-trends-scraper`. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=luzivanlt/google-trends-scraper"
    }
  }
}
```

The client signs in with OAuth, or add `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`.

Charged per result delivered; the sample input above costs at most $0.01.

### FAQ

**Do I need a Google account?**
No. The Actor reads what anyone can see on Google Trends without logging in.

**How do I compare terms?**
Put them on one line, separated by commas: `coffee, tea, matcha`. Up to 5
terms share one chart, as on Google Trends. Each term on its own line is its
own search, on its own 0 to 100 scale.

**Can I get the same data as a Google Trends link I have open?**
Yes. Paste the link under Google Trends links: it keeps its terms, country,
dates, category and property.

**Can I run it from my own code, on a schedule, or with other apps?**
Yes. Like any Apify Actor, you can start it through the Apify API, run it on a
schedule, and connect it to other apps with Apify's integrations and webhooks.

### Is it legal to scrape Google Trends?

This Actor reads only what anyone can see on Google Trends without logging in,
and its rows hold no personal data. Check Google's terms before you use the
data. If you are unsure, ask a lawyer.

### Support

Found a problem or missing a feature? Open an issue on the **Issues** tab and
include the run's link.

***

This Actor is not affiliated with, endorsed by or sponsored by Google.

# Changelog

This Actor's version history is a separate document: https://apify.com/luzivanlt/google-trends-scraper/changelog.md

# Actor input Schema

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

What to look up on Google Trends, one search per line, e.g. coffee. To compare up to 5 terms on one chart, put them on one line separated by commas, e.g. coffee, tea, matcha. Each line gets interest over time, interest by region and related queries for the country, time range, category and Google property below. A typical one-term search over 12 months in one country is about 150 rows.

## `startUrls` (type: `array`):

Links copied from Google Trends, e.g. https://trends.google.com/trends/explore?q=bitcoin\&geo=US. An explore page keeps its own terms, country, dates, category and property; a Trending Now page (trends.google.com/trending?geo=US) keeps its own country, hours, category and active filter. Other links are refused before anything is read.

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

Where to measure interest: a country code such as US, GB, DE or IN, a region such as US-CA, or a US metro such as US-CA-807, e.g. US. Leave empty for worldwide. A country gives interest by region, a US state gives metros, a small country gives cities, and worldwide gives countries.

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

The period of the chart, e.g. Past 12 months. Google picks the step from the length of the period (minutes, hours, days, weeks or months), and every row says which step it is. Past 12 months gives 53 weekly points per term. Custom dates below override it.

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

Two dates instead of a preset time range, start then end, from 2004-01-01 to today, e.g. 2025-01-01 2025-06-30. Overrides Time range. Google picks the chart's step from the length of the range (days, weeks or months), and each row says which step it is.

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

Google Trends' category number, as in the cat= part of an explore link, e.g. 71 for Food & Drink, 7 for Finance, 5 for Computers & Electronics, 20 for Sports. 0 for all categories. It narrows every search above to searches Google files under that category.

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

Which Google search to measure, e.g. YouTube search: web search (the default), image search, news search, Google Shopping or YouTube search, as the Google property menu on Google Trends offers. It applies to every search term above; a link keeps its own.

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

The language Google names regions and related data in, and the language of the Trending Now lists, e.g. en-US, de, fr, ja or pt-BR. Default en-US. A link with its own hl= keeps it. It does not change which searches are counted, only how names are written.

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

Save one row per point of the chart, per term: the 0 to 100 value Google shows, its date, its label, whether the last point is still partial, and each compared term's average. Turn it off to save only regions or related queries and pay for fewer rows.

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

Save one row per region, metro or city, per term, with its 0 to 100 value, its code and name, and, when terms are compared, the term that leads there. A one-term search in the US gives its 51 states (with Washington, D.C.). Turn it off to save fewer rows.

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

Save one row per related query, per term: the top queries with their 0 to 100 value and the rising ones with their growth in percent, or Breakout for the fastest risers, with a link to explore each. Usually up to 25 of each kind; turn it off to save fewer rows.

## `trendingCountries` (type: `array`):

Two-letter country codes to read Google's Trending Now list for, e.g. US, GB, IN. Each country gives one row per trending search: its search volume, growth, start and end time, related searches and categories. The US list of 7 days held 3,480 trending searches on the latest check.

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

How far back the Trending Now list goes, e.g. Past 7 days: the past 4 hours, 24 hours, 48 hours or 7 days, as the Trending Now page offers. A longer window lists more trends, active and ended; Max trends per country caps how many rows each country saves.

## `trendingCategories` (type: `array`):

Keep only trends in these categories, e.g. Sports and Technology, as the category menu of the Trending Now page offers. A trend Google files under several categories is kept when any one matches. Leave it empty for all categories.

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

Keep only trends Google still marks as active, leaving out those that have ended, as the Active toggle of the Trending Now page does. Every row says whether its trend is active and, for an ended one, when it ended, so you can also filter later.

## `maxTrendingPerCountry` (type: `integer`):

The most Trending Now rows to save for each country, from 1 to 5,000, in the order Google lists them. Each row is one result charged. The default of 500 is a cap on cost; a 7-day list of the US held 3,480 trending searches on the latest check.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee"
  ],
  "geo": "US",
  "timeRange": "today 12-m",
  "category": 0,
  "searchProperty": "",
  "language": "en-US",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "trendingCountries": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "maxTrendingPerCountry": 50
}
```

# Actor output Schema

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

Every row the run saved: chart points, regions, related queries and trending searches.

## `allFields` (type: `string`):

The same rows with every field.

# 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"
    ],
    "geo": "US",
    "trendingCountries": [
        "US"
    ],
    "maxTrendingPerCountry": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("luzivanlt/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"],
    "geo": "US",
    "trendingCountries": ["US"],
    "maxTrendingPerCountry": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("luzivanlt/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"
  ],
  "geo": "US",
  "trendingCountries": [
    "US"
  ],
  "maxTrendingPerCountry": 50
}' |
apify call luzivanlt/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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