# Google Trends Scraper — Interest, Rising Queries & Trending (`foxlabs/google-trends-scraper`) Actor

Google Trends data without a browser: interest over time, interest by region and rising related queries for up to 5 compared terms, plus the full Trending Now list per country with search volume, growth, category and news.

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

## Pricing

from $4.00 / 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.

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 — Interest, Rising Queries & Trending

Get Google Trends data without a browser: **interest over time**, **interest by region** and **related queries (top and rising, with "Breakout")** for up to 5 compared search terms, with a per-term summary (average, latest, peak, momentum). Or get the **Trending Now** list of a country — up to a few hundred trends with **search volume, growth %, start and end time, category, the searches behind each trend and the news stories Google shows**.

No Google account, no API key, no browser.

### Quick start (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["chatgpt, gemini, claude"], "geo": "US", "timeframe": "today 12-m"}'
```

Trending Now:

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~google-trends-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "trending", "trendingGeos": ["US", "GB"], "trendingHours": "24"}'
```

### What you get

**Keyword analysis — one row per query** (a query is 1 to 5 terms compared in one chart):

| Group | Fields |
|---|---|
| Query | `query`, `terms`, `geo`, `geoName`, `timeframe`, `timeframeLabel`, `dateFrom`, `dateTo`, `resolution` (MINUTE / EIGHT\_MINUTE / HOUR / DAY / WEEK / MONTH), `category`, `property` |
| Summary per term | `summary[]`: `average` (Google's own figure; with many empty points it is lower than the mean of the points shown — 19 vs 31 in one test), `latest` (last complete point), `latestDate`, `peak` (highest complete point; the unfinished last point is not counted), `peakDate`, `momentumPercent` (last 4 complete points vs the 4 before) |
| Interest over time | `interestOverTime[]`: `date`, `label`, `values` (0-100 per term, `null` where Google has no data for that point), `isPartial` (the current, unfinished period) |
| Interest by region | `interestByRegion[]`: `geoCode`, `geoName`, `values` (`null` for a term without data in that region; cities have `latitude` / `longitude` instead of a code); `regionValueType`, `regionResolution` |
| Related queries | `relatedQueries[term].top[]` and `.rising[]`: `query`, `value`, `formattedValue` (top: "100", "84"; rising: "+250%" or "Breakout"), `isBreakout` (rising only), `exploreUrl` |
| Related topics | `relatedTopics[term]` (off by default, see Notes) |
| Links & status | `exploreUrl` (the same query on trends.google.com: terms, location, range, category, search type), `relatedQueriesStatus`, `interestByRegionStatus`, `error`, `scrapedAt` |

**Trending Now — one row per trend:**

| Field | Meaning |
|---|---|
| `trendId` | Stable ID of the trend period (country + search + start time), for example `US-1656ac0022a1`. It stays the same between runs while Google keeps the trend's title; Google sometimes renames, splits or merges trends between runs, and the period then gets a new ID |
| `rank`, `title`, `geo`, `geoName` | Position in Google's list, the trend, the country |
| `searchVolume`, `searchVolumeLabel` | Google's search-volume bucket (100+ … 1M+) |
| `increasePercent` | Growth Google reports for the trend, in steps (50, 75, 100, 200 … 1000). 1000 is the top step and about a quarter of the trends sit on it (181 of 720 in run `HkzNaumU8Vjom5oce`) |
| `startedAt`, `endedAt`, `isActive` | When the trend started, when it ended (empty while active) |
| `categories`, `categoryIds` | Autos and Vehicles, Beauty and Fashion, Business and Finance, Climate, Entertainment, Food and Drink, Games, Health, Hobbies and Leisure, Jobs and Education, Law and Government, Other, Pets and Animals, Politics, Science, Shopping, Sports, Technology, Travel and Transportation |
| `relatedQueries` | The searches that make up the trend (all of them; up to 68 in our test runs) |
| `newsArticles[]` | `title`, `url`, `source`, `publishedAt`, `imageUrl` of the news stories Google shows |
| `exploreTerm`, `exploreUrl`, `windowHours`, `scrapedAt`, `error` | Link to explore the trend, the window asked for |

**The same search can trend twice in one window, and each period is its own row.** In a test run, "astros" trended in the US from 02:40 to 05:30 UTC and again from 20:50 to 23:00 UTC on 2026-09-27: two rows, `trendId` `US-e3bf7a6085df` and `US-1656ac0022a1`. So a row is unique by `geo` + `title` + `startedAt`, which is what `trendId` encodes. The start time Google reports does not change between runs (636 of 636 trends kept it in two runs 58 minutes apart), so `trendId` lets you merge scheduled runs; a trend Google renamed or merged in the meantime appears under its new ID (2 of 665 shared trends in two runs 15 minutes apart, for example "where to watch patriots game" became "patriots vs jaguars where to watch").

#### Sample output

Keyword analysis, query `chatgpt, gemini, claude, perplexity, copilot`, United States, past 12 months (real row from a local test run on 2026-09-27 UTC, arrays trimmed; the platform run an hour later, `LFjdHStVzqA8bojvL`, differed by a point or two, for example claude `latest` 19):

```json
{
  "type": "keywords",
  "query": "chatgpt, gemini, claude, perplexity, copilot",
  "terms": ["chatgpt", "gemini", "claude", "perplexity", "copilot"],
  "geo": "US",
  "geoName": "United States",
  "timeframe": "today 12-m",
  "dateFrom": "2025-09-27",
  "dateTo": "2026-09-27",
  "resolution": "WEEK",
  "summary": [
    { "term": "chatgpt", "average": 78, "latest": 74, "latestDate": "2026-09-20", "peak": 100, "peakDate": "2025-10-12", "momentumPercent": 10 },
    { "term": "claude", "average": 18, "latest": 20, "latestDate": "2026-09-20", "peak": 33, "peakDate": "2026-05-24", "momentumPercent": -1 }
  ],
  "interestOverTime": [
    { "date": "2026-09-20", "label": "Sep 20 – 26, 2026", "values": { "chatgpt": 74, "gemini": 32, "claude": 20, "perplexity": 1, "copilot": 6 }, "isPartial": false }
  ],
  "interestByRegion": [
    { "geoCode": "US-CA", "geoName": "California", "values": { "chatgpt": 55, "gemini": 24, "claude": 16, "perplexity": 2, "copilot": 3 } }
  ],
  "regionResolution": "REGION",
  "regionValueType": "share-of-compared-terms",
  "relatedQueries": {
    "claude": {
      "top": [{ "query": "claude code", "value": 82, "formattedValue": "82", "exploreUrl": "https://trends.google.com/trends/explore?q=claude+code&date=today+12-m&geo=US" }],
      "rising": [{ "query": "claude cowork", "value": 188550, "formattedValue": "Breakout", "isBreakout": true, "exploreUrl": "https://trends.google.com/trends/explore?q=claude+cowork&date=today+12-m&geo=US" }]
    }
  },
  "exploreUrl": "https://trends.google.com/trends/explore?date=today+12-m&q=chatgpt%2Cgemini%2Cclaude%2Cperplexity%2Ccopilot&hl=en-US&geo=US"
}
```

Trending Now, United Kingdom, last 24 hours (real row from a local run on 2026-09-27 UTC; the same trend is in platform runs `rhtmfMoMQUPNAUNPY` and `EenH98bupTt2O0roe`):

```json
{
  "type": "trending",
  "trendId": "GB-f94b81933378",
  "rank": 1,
  "title": "google's birthday",
  "geo": "GB",
  "startedAt": "2026-09-27T05:10:00.000Z",
  "endedAt": null,
  "isActive": true,
  "searchVolume": 1000000,
  "searchVolumeLabel": "1M+",
  "increasePercent": 1000,
  "categories": ["Other"],
  "newsArticles": [
    { "title": "Google celebrates its 28th birthday with nostalgic doodle", "url": "https://www.standard.co.uk/news/uk/google-birthday-doodle-28th-b1298537.html", "source": "London Evening Standard", "publishedAt": "2026-09-27T08:11:06.000Z" }
  ]
}
```

### Input & filters

| Input | What it does | Default |
|---|---|---|
| `mode` | `keywords` (keyword analysis) or `trending` (Trending Now) | keywords |
| `searchTerms` | One query per line; up to 5 comma-separated terms on a line are compared in one chart | — |
| `geo` | Country, or empty for worldwide (250 locations, Google's own list) | worldwide |
| `geoCode` | A country, first-level subregion or US metro code, for example `US-CA`, `GB-ENG`, `TR-34` or `US-NY-501` (New York metro); overrides `geo`. Checked against Google's own list (3,130 subregions in 192 countries, 301 US metro codes) | — |
| `timeframe` | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m`, `today 5-y`, `all` (since 2004) or `custom` with `dateFrom` / `dateTo` | today 12-m |
| `category` | Google Trends category ID (the `cat=` number on trends.google.com), 0 = all; checked against Google's list of 1,132 categories | 0 |
| `property` | `web`, `images`, `news`, `youtube`, `shopping` (web, YouTube and Shopping tested) | web |
| `includeRegions`, `regionResolution` | Region breakdown and its level: `auto`, `COUNTRY`, `REGION`, `CITY`, `DMA` (US metro areas) | on, auto |
| `includeRelatedQueries` | Top and rising searches per term | on |
| `includeRelatedTopics` | Related topics per single-term query | off |
| `trendingGeos` | Countries for Trending Now | US |
| `trendingHours` | `4`, `24`, `48` or `168` hours | 24 |
| `trendingCategory` | One Trending Now category, or all | all |
| `trendingNewsPerTrend` | News stories per trend, 0 = none | 5 |
| `trendingActiveOnly`, `maxTrendsPerGeo` | Only active trends; cap per country | off, 100 |
| `maxConcurrency` | Queries fetched in parallel | 3 |
| `proxyConfiguration` | Proxy for the requests to Google (see Notes) | Apify residential |

Invalid input stops the run before any request, marked as failed with the reason in its status message: an unknown country, subregion or metro code (for example `US-ZZ`), an unknown category ID, search type or window, a custom range with a date that does not exist or `dateFrom` after `dateTo`, metro areas outside the US. A line with more than 5 terms, or a Trending Now location that is not a country, leaves a free row with the reason in `error` and the rest of the run continues; if no line or country is valid, the run fails with the reason. If Google still refuses a query (HTTP 400), its free row says so and names the location, category and time range to check. Every run ends with a status message that sums up the result, for example "Done: 7 of 8 queries returned data (1 empty; reasons in SOURCE\_REPORT)." A line with the same terms as an earlier line is fetched once; it is listed as "skipped" in `SOURCE_REPORT`, without a dataset row.

### Example inputs

Brand comparison with rising searches:

```json
{ "searchTerms": ["nike, adidas, puma, new balance"], "geo": "US", "timeframe": "today 12-m" }
```

Seasonality over 5 years, worldwide, by country:

```json
{ "searchTerms": ["electric car", "heat pump", "solar panels"], "timeframe": "today 5-y" }
```

YouTube search interest in the United Kingdom over the past 90 days:

```json
{ "searchTerms": ["minecraft, roblox, fortnite"], "geo": "GB", "timeframe": "today 3-m", "property": "youtube" }
```

Custom period with US metro areas:

```json
{ "searchTerms": ["tax refund"], "geo": "US", "timeframe": "custom", "dateFrom": "2025-01-01", "dateTo": "2025-06-30", "regionResolution": "DMA" }
```

Trending Now in three countries, sports only, active trends:

```json
{ "mode": "trending", "trendingGeos": ["US", "GB", "TR"], "trendingHours": "24", "trendingCategory": "17", "trendingActiveOnly": true }
```

### Use cases

- **SEO and content:** find rising searches ("Breakout") around a topic and plan content before it peaks.
- **Market and brand research:** compare up to 5 brands or products, see where each one leads by state or country.
- **Seasonality:** 5-year weekly series or monthly data since 2004 for demand planning.
- **Newsrooms, agencies, traders:** watch what a country is searching right now, with volume, growth and the news behind it.

### Performance & throughput

Measured on the Apify platform on 2026-09-28 (build 0.1.1, 1 GB memory; time from start to finish, container start included):

| Run | Result | Requests | Time |
|---|---|---|---|
| `electric car`, worldwide, 12 months — the form's starting input (run `SoaiDZSd7gLuhuUx9`) | 54 weekly points, 49 countries, 25 top + 17 rising queries | 5 | 26 s |
| 8 queries (one 5-term comparison + 7 single terms), US, 12 months, 3 in parallel (run `LFjdHStVzqA8bojvL`) | 8 of 8 complete: 53-54 weekly points and 51 regions each, related queries for 12 of 12 terms | 39 | 37 s |
| `electric car`, worldwide, 5 years (run `69OtT6MlXW5JP2bIT`) | 262 weekly points, 54 countries | 6 | 18 s |
| Trending Now US + TR + GB, 24 hours, 5 news per trend, max 1,000 per country — the default is 100 (run `HkzNaumU8Vjom5oce`) | 720 trends (US 439, GB 189, TR 92) | 3 | 72 s |
| The same Trending Now input on build 0.1.2, 1 GB (run `rhtmfMoMQUPNAUNPY`) | 725 trends | 3 | 16.8 s |
| The same Trending Now input on build 0.1.2, 512 MB (run `EenH98bupTt2O0roe`) | 723 trends | 3 | 18.1 s |

Memory use peaked at 68-84 MB in these runs. Build 0.1.1 wrote Trending Now rows one at a time; 0.1.2 writes each country's list in one step, which took the same input from 72 s to 16.8 s.

Options measured in local test runs through Apify residential proxy (local):

| Run | Result | Requests | Time |
|---|---|---|---|
| `tax refund`, US, custom 2025-01-01 to 2025-06-30, metro areas | 181 daily points, 209 metro areas | 4 | 32.0 s |
| `pizza`, New York metro (`US-NY-501`), 12 months | 53 weekly points, 25 cities with data | 5 | 14.0 s |
| `football`, United Kingdom, cities | 54 weekly points, 17 cities with data | 5 | 16.6 s |
| `minecraft, roblox, fortnite`, UK, YouTube search, 90 days | 93 daily points | 3 | 13.1 s |
| `weather`, US, past 4 hours | 238 points, one per minute | 3 | 5.2 s |
| `bitcoin`, worldwide, since 2004 | 273 monthly points | 3 | 11.8 s |

The step follows the range, as on trends.google.com: minutes for the past 4 hours, 8 minutes for the past day, hours for 7 days, days for 90 days and custom half-years, weeks for 12 months and 5 years, months since 2004. A single-term query takes 4 requests (5 with the first cookie exchange of a proxy session); each compared term adds one request for its related queries. A Trending Now country is one request.

### Data quality

- **Fill (the platform runs above, all sections on):** interest over time, region breakdown and related queries were present for 14 of 14 terms; every term had 25 top queries and 16-25 rising queries. Shorter ranges and other search types return shorter lists (YouTube, 90 days: 5-13 rising, run `uS9LdaaTuqhCszX2N`; Shopping, 7 days: 12-25 top, 1-2 rising, run `2aEgq1gqtyVD8W370`). In Trending Now, volume, start time and category were present on 720 of 720 trends and news on 716 (99%). In one local run a Turkish list came back without any news; the Actor now asks again on a new connection when that happens (the repeat had news on 89 of 90).
- **Region shares check:** for compared terms, the shares in every region add up to 100 (51 of 51 US regions, local run).
- **Unique rows:** `geo` + `title` + `startedAt` (= `trendId`) is unique for 720 of 720 Trending Now rows (run `HkzNaumU8Vjom5oce`); `geo` + `title` alone repeats once, because "astros" trended twice (see above). One row per query in keyword mode.
- **Links (local check):** 6 of 10 sampled news links opened a page whose title matches the article's `newsArticles[].title` word for word; the other 4 could not be opened from our test machine (3 bot checks, 1 TLS error), not a mismatch. An independent check of 10 other links: 7 of 7 opened pages matched, 3 were blocked.
- **Where the figures come from:** most performance and data-quality figures come from platform runs (run IDs above); figures marked local come from local runs through the same residential proxy.

### Pricing

**Search terms: $4 per 1,000 ($0.004 per term)**, interest by region and related queries included. **Trending Now: $1 per 1,000 trends ($0.001 per trend).** Only delivered data is charged; rows that report an error or an empty result are free. Each run also has Apify's Actor start event ($0.00005 per GB of memory; the default 512 MB is one event). Current prices are also on the Pricing tab.

### FAQ

**Why are the numbers 0-100?** Google Trends scales interest to the highest point of the chart (100). Values are relative, not search counts. Compared terms share one scale.

**What does `isPartial` mean?** The last point covers a period that has not ended yet (this week, this hour), so it is usually lower.

**Why are the region values different for compared terms?** With 2-5 terms, Google gives each term's share of the searches in that region (they add up to 100). With one term, the region values are the 0-100 interest scale. `regionValueType` says which one a row has.

**What is "Breakout"?** A rising query that grew more than 5,000%. `value` still holds Google's number for sorting.

**Can I track the same terms every week?** Yes, schedule the Actor; each run returns the current chart.

### Troubleshooting

- **A query returned `error: "empty: …"`:** the term has too little search volume in that location and period. Try worldwide or a longer range.
- **Related topics are empty:** see Notes.
- **The run failed with "Unknown subregion code" or "Unknown category ID":** the code is not in Google's list. The message shows what valid codes look like; category numbers are the `cat=` value of a trends.google.com address.
- **Many queries fail with a rate-limit error:** keep the residential proxy on; it lets the Actor retry from a new IP, which it cannot do without a proxy.

### Notes, limits & legal

- **Related topics:** in our tests Google answered automated requests with an empty related-topics list (4 of 4), while related queries were returned. The option stays available and off by default; rows say `"empty"` in `relatedTopicsStatus` when that happens.
- **Proxy:** Apify residential proxy is the default and the setup all figures above were measured with. The keyword endpoints answer the first request of a connection with HTTP 429 and a cookie (Trending Now answers at once); the Actor retries with the cookie and switches to a new residential IP if Google keeps refusing (1 of 72 cookie requests in our tests needed that). Your proxy setting is respected: your own proxy URLs or other Apify proxy groups are used as given, and with the proxy switched off every request comes from one IP, so the Actor cannot switch IP. Those setups were not tested. `SOURCE_REPORT` records which proxy a run used.
- **Dates** are UTC.
- This Actor reads the public trends.google.com website. It is not affiliated with or endorsed by Google. Use the data in line with Google's terms and the laws that apply to you.

### Support

Open an issue on the Issues tab with the run ID and the input.

### Changelog

#### 0.1.3 — 2026-09-28

Locations and categories are checked against Google's own lists before the run: an unknown code now fails the run with a clear reason instead of a bare "HTTP 400" row, and US metro codes such as `US-NY-501` work. Every run ends with a status message that sums up the result. A proxy you switch off stays off. README corrected after an independent review. See CHANGELOG.md.

#### 0.1.2 — 2026-09-28

Trending Now rows have a stable `trendId` (one per trend period; stays the same while Google keeps the trend's title) and are written one country at a time instead of one row at a time. Most performance and data-quality figures now come from platform runs. See CHANGELOG.md.

#### 0.1 — 2026-09-28

First version. See CHANGELOG.md.

# Changelog

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

# Actor input Schema

## `mode` (type: `string`):

Keyword analysis uses the search terms below. Trending Now uses the countries in the Trending Now section.

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

One query per line. Put up to 5 terms on one line, separated by commas, to compare them in one chart (for example: iphone, samsung galaxy, pixel). Each line is a separate result.

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

Country the interest is measured in. Worldwide compares countries; a country compares its regions.

## `geoCode` (type: `string`):

Overrides Location. A country, first-level subregion or US metro code from Google Trends, for example US-CA (California), GB-ENG (England), TR-34 (İstanbul) or US-NY-501 (New York metro). Checked against Google's own list before the run starts.

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

Google picks the step from the range, as on trends.google.com: minutes for the past 4 hours, 8 minutes for the past day, hours for 7 days, days for 90 days, weeks for 12 months and 5 years, months since 2004.

## `dateFrom` (type: `string`):

Start date, YYYY-MM-DD, used with "Custom dates below". Data starts on 2004-01-01.

## `dateTo` (type: `string`):

End date, YYYY-MM-DD, used with "Custom dates below".

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

Google Trends category, 0 = all categories. Take the number from the cat= parameter of a trends.google.com address (for example 71 = Food & Drink, 20 = Sports). Checked against Google's list of 1,132 categories before the run starts.

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

Which Google search the interest is measured on.

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

Countries (worldwide) or regions (inside a country). For compared terms Google gives each term's share of the searches in that region.

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

Level of the region breakdown. Metro areas exist only for the United States.

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

Top and rising searches for each term ("Breakout" = grew more than 5,000%).

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

Top and rising topics for each single-term query. In our tests Google returned an empty list to automated requests, so this is off by default.

## `trendingGeos` (type: `array`):

Two-letter country codes, one per line (US, GB, TR, DE…).

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

Window of the Trending Now list.

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

Keep only trends in this Trending Now category.

## `trendingNewsPerTrend` (type: `integer`):

Title, link, source, time and image of the news stories Google shows for each trend. 0 = no news. Some trends have fewer stories than you ask for.

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

Leave out trends Google marks as ended.

## `maxTrendsPerGeo` (type: `integer`):

Google lists up to a few hundred trends per country and window.

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

Queries fetched at the same time. Higher is faster but meets Google's rate limit sooner.

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

Apify residential proxy is the default and the tested setup: when Google rate-limits a request, the Actor retries from a new IP. Your choice is respected: with the proxy off, every request comes from one IP and the Actor cannot switch (not tested).

## Actor input object example

```json
{
  "mode": "keywords",
  "searchTerms": [
    "electric car"
  ],
  "geo": "",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "web",
  "includeRegions": true,
  "regionResolution": "auto",
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "trendingCategory": "all",
  "trendingNewsPerTrend": 5,
  "trendingActiveOnly": false,
  "maxTrendsPerGeo": 100,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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": [
        "electric car"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/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": ["electric car"] }

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/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": [
    "electric car"
  ]
}' |
apify call foxlabs/google-trends-scraper --silent --output-dataset

```

## MCP server setup

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