# Google Trends Scraper: Keywords, Compare, Related, Trending (`logicbase_systems/google-trends`) Actor

Google Trends scraper: interest over time, related queries, interest by region, keyword comparisons and trending now. Any timeframe and country. Retries on fresh sessions, no login. $3 per 1,000 keywords; failures are free.

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

## Pricing

from $3.00 / 1,000 keyword results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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: Keywords, Comparisons, Related Queries & Trending Now

Read **Google Trends** without an API key: **interest over time**, **related queries** (top and rising), **interest by region**, side-by-side **keyword comparisons**, and Google's **trending now** searches. Choose any country or region, any timeframe (past hour to 2004) and search type (web, images, news, YouTube, shopping). Type a list of keywords and press Start: **40 keywords**, each with its 12-month series, related queries and regional interest, **in 56 seconds** on our test run of 16 November 2026. **$0.003 per keyword result** ($3 per 1,000); trending topics cost **$0.001 each**. Searches that fail or have no data are never charged.

### Why choose this actor?

Exporting one keyword at a time from trends.google.com? Starting a new run for every country? Wanting Google's trending-now list in the same dataset as interest over time?

- **A keyword comes back complete in one row.** On our 40-keyword run of 16 November 2026 (worldwide, past 12 months), **all 40 rows** had a 53-point interest-over-time series, a summary (average, peak, peak date, latest) and interest by region. **29 of 40** had a top related-query list and **20 of 40** a rising list (Google leaves those empty when it has too little data). A later batch of **150 keywords** in the United States over the past 3 months finished in **97 seconds**, 150 of 150; a batch of **195** finished in **142 seconds**, 195 of 195. Across those Apify tests the same day, **425 of 425** keyword searches succeeded.
- **Several countries in the same run.** Give a list of country or region codes (`US`, `GB`, `IN`, `US-CA`) and every keyword is searched once per entry. The most used Google Trends actor on the Store ([apify/google-trends-scraper](https://apify.com/apify/google-trends-scraper), 19,651 lifetime users and 3,409 users in the last 30 days as of 16 November 2026) takes **one `geo` value per run**.
- **Comparisons and trending now in the same tool.** A line such as `python | javascript | rust` returns one row with a shared 0-100 scale (that comparison took **10 seconds** on our 16 November 2026 run). A list of trending-now countries returns Google's current trending searches with approximate traffic and news links: **30 topics** for the US, UK and India in **5 seconds** on the same day. The most used Trends actor does not include the trending-now feed (it points to a separate actor for that).
- **You are charged only for results that were delivered.** A wrong country code, a rejected request, or a search Google has no data for lands as a free `status: "error"` or `"no_data"` row with a clear message. On a test with `bitcoin` in `GB` and an invalid code `ZZ`, the valid search was charged and the invalid one returned a free `INVALID_REQUEST` row, in 5 seconds.
- **Related topics are not offered, on purpose.** Google returns an empty related-topics list to automated clients. Rather than charge you for empty data, this actor does not include them. Related *queries* (top and rising) work. Rising lists for very broad worldwide keywords can contain one-off breakout searches; pick a country or a narrower keyword for a cleaner rising list, and use the `top` list for stable results.

### Try your first keyword results

Paste this input in the JSON tab, or keep the prefilled form and press Start. It looks up *web scraping* and *data engineering* worldwide over the past 12 months, with interest over time, related queries and interest by region.

```json
{
  "keywords": ["web scraping", "data engineering"],
  "timeframe": "today 12-m",
  "includeRelatedQueries": true,
  "includeInterestByRegion": true
}
```

Runs on the Apify Free plan: sign up, open the actor, press Start. Each keyword lands as one row of the dataset, which you can open as a table, download as CSV, Excel or JSON, or read from the API. One keyword costs $0.003. Change the words, add a country, or add a comparison, and run again.

### Copy to your AI assistant

Paste this block into Claude, ChatGPT or Cursor to give it the full picture of this scraper before you ask it to write code or plan a dataset:

```
You have access to the Google Trends scraper on Apify: logicbase_systems/google-trends
It reads the public data that trends.google.com shows, with no Google account or API key. One row = one keyword search, one comparison, or one trending-now topic.

Input (all optional; an empty run falls back to one sample keyword, "web scraping", for Apify's daily test):
- keywords (array of strings): search terms, one per line, each a separate search and one result row. Example: ["web scraping", "data engineering"]
- comparisonGroups (array of strings): 2-5 keywords on the same 0-100 scale, separated by |. Example: ["python | javascript | rust"]. A comparison returns one row and is charged as one keyword-result per keyword in the group (3 keywords = 3 charges).
- trendingGeos (array of strings): country codes for Google's current trending searches, e.g. ["US", "GB", "IN"]. Charged $0.001 per topic.
- maxTrendingPerGeo (integer, default 25): topics kept per country (Google lists up to about 25).
- includeTrendingNews (boolean, default true): news articles Google shows next to each trending topic.
- timeframe (string, default "today 12-m"): "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" (2004 to now).
- customTimeframe (string): overrides timeframe. Format: "YYYY-MM-DD YYYY-MM-DD", e.g. "2024-01-01 2024-06-30".
- geos (array of strings): US, GB, IN, DE, or a region such as US-CA. Empty or omitted = worldwide. Several entries: every keyword runs once per entry and is charged each time.
- searchProperty (string, default "web"): web, images, news, youtube, shopping.
- category (integer, default 0): Google Trends category id; 0 = all. Examples: 5 Computers & Electronics, 7 Finance, 45 Health.
- language (string, default "en-US"): language of related queries and region names (en-US, de, es, hi, ...).
- timezoneOffset (integer, default 0): minutes from UTC for the time axis, e.g. 330 for India, -300 for New York.
- includeInterestOverTime (boolean, default true)
- includeRelatedQueries (boolean, default true): top and rising related searches. Rising items have isBreakout when Google shows "Breakout" (growth above 5,000%).
- includeInterestByRegion (boolean, default true)
- regionResolution (string, default ""): "" (automatic: countries worldwide, states for a country), COUNTRY, REGION, CITY, DMA (US metro areas).
- includeLowSearchVolumeRegions (boolean, default false)
- maxResults (integer, optional): hard cap on searches (keyword x country) for the run.
- maxConcurrency (integer, default 5)
- proxyStrategy (string, default "auto"): auto | residential | datacenter | none. Auto is recommended on Apify.

Output per keyword or comparison (type "keyword" or "comparison"):
- identity: status ("ok", "no_data" or "error"), type, keyword (null on a comparison), keywords[], geo ("" = worldwide), timeframe, category, property, searchUrl, scrapedAt
- interestOverTime[]: {date (ISO UTC), label, value} or, for a comparison, {date, label, values: {keyword: value}}. The last point may have isPartial: true.
- summary: {average, peak, peakDate, latest}, or the same object keyed by keyword for a comparison.
- relatedQueries: {top: [{query, value, display, link}], rising: [{query, value, display, isBreakout, link}]}. For a comparison, keyed by keyword.
- interestByRegion[]: {geoCode, geoName, value} or {..., values: {keyword: value}} for a comparison.
- error: {code, message} when status is "error" (not charged). Codes: INVALID_REQUEST, RATE_LIMITED, BLOCKED, NETWORK_ERROR, BAD_RESPONSE.

Output per trending topic (type "trending"):
- geo, rank, title, approxTraffic (e.g. "2000+"), startedAt, image, searchUrl, news[{title, url, source, image}], status, type.

Related topics are not in the output: Google returns an empty list to automated clients, so they are not offered. Exact search volumes are not available (Trends is a 0-100 relative index; trending now gives an approximate band such as "2000+").

Use apify-client for Python or JavaScript: client.actor("logicbase_systems/google-trends").call(run_input=...)
```

### How to scrape Google Trends

Three inputs, from the simplest to a full brief. Each one runs as it is.

#### Track interest in a list of keywords

```json
{
  "keywords": ["web scraping", "data engineering", "ai agents"],
  "timeframe": "today 12-m",
  "geos": ["US"]
}
```

Each keyword is one search and one row, with interest over time, related queries and interest by US state (automatic region detail for a country). Add more country codes to `geos` to run the same keywords in each one (each pair is charged).

#### Compare keywords on the same 0-100 scale

```json
{
  "comparisonGroups": ["python | javascript | rust"],
  "timeframe": "today 5-y",
  "includeRelatedQueries": false,
  "includeInterestByRegion": true
}
```

Google allows 2-5 keywords per comparison. On our run of 16 November 2026 this input returned one row in **10 seconds**, with a value per keyword at every time point and every region. In that run, over the past five years worldwide, Python's average was 64.5 (peak 100), Rust 21 and JavaScript 12.1. A comparison of 3 keywords is charged as 3 keyword results.

#### Get what is trending now in several countries

```json
{
  "trendingGeos": ["US", "GB", "IN"],
  "maxTrendingPerGeo": 10,
  "includeTrendingNews": true
}
```

On our run of 16 November 2026 this returned **30 trending topics in 5 seconds**, each with approximate traffic, a start time and news links. Schedule it daily if you want your own history; Google does not keep a public archive of this feed.

### Input parameters

| Field | Type | Default | What it does |
|---|---|---|---|
| `keywords` | array of strings | none (form prefills two sample keywords) | Search terms, one search and one row each. |
| `comparisonGroups` | array of strings | none | 2-5 keywords separated by `\|`, one comparison row each. |
| `trendingGeos` | array of strings | none | Country codes for the trending-now feed. |
| `maxTrendingPerGeo` | integer | 25 | Topics kept per trending country. |
| `includeTrendingNews` | boolean | true | News links for each trending topic. |
| `timeframe` | string | `today 12-m` | How far back to look. Short ranges give hourly points, long ones weekly or monthly. |
| `customTimeframe` | string | none | `YYYY-MM-DD YYYY-MM-DD`, overrides `timeframe`. |
| `geos` | array of strings | none (worldwide) | Country or region codes. Several entries: every keyword runs once in each. |
| `searchProperty` | string | `web` | `web`, `images`, `news`, `youtube` or `shopping`. |
| `category` | integer | 0 | Google Trends category id; 0 means all. |
| `language` | string | `en-US` | Language of related queries and region names. |
| `timezoneOffset` | integer | 0 | Minutes from UTC for the time axis. |
| `includeInterestOverTime` | boolean | true | The 0-100 series plus summary. |
| `includeRelatedQueries` | boolean | true | Top and rising related searches. |
| `includeInterestByRegion` | boolean | true | Popularity by country, state, city or metro area. |
| `regionResolution` | string | automatic | `COUNTRY`, `REGION`, `CITY`, `DMA`, or empty for automatic. |
| `includeLowSearchVolumeRegions` | boolean | false | Also list regions with very little search volume. |
| `maxResults` | integer | none | Hard cap on searches (keyword × country) for the run. |
| `maxConcurrency` | integer | 5 | Searches run at the same time. Lower it if you see many retries. |
| `proxyStrategy` | string | `auto` | `auto` (recommended), `residential`, `datacenter`, or `none`. |

No field is required: the form opens on two sample keywords and returns rows as it is. If every field is left empty (for example Apify's daily automatic test), the actor runs one sample keyword (*web scraping*) so the run succeeds. That fallback took **5 to 6 seconds** on our 16 November 2026 run.

### Accepted inputs

- **Keywords**: any search words or phrases, for example `web scraping`, `pickleball`, `"cold brew"`.
- **Comparisons**: `python | javascript | rust` (spaces around `|` are fine), 2-5 keywords per line.
- **Countries and regions**: ISO-style codes such as `US`, `GB`, `IN`, `DE`, or a sub-region such as `US-CA`. Leave `geos` empty for worldwide.
- **Timeframes**: `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`, or a custom `YYYY-MM-DD YYYY-MM-DD` range.
- **Trending countries**: the same country codes, for example `US`, `GB`, `IN`.

### Output fields

#### Keyword and comparison rows

| Field | Description |
|---|---|
| `status` | `ok`, `no_data` or `error`. Only `ok` is charged. |
| `type` | `keyword` or `comparison`. |
| `keyword` | The search term; `null` on a comparison. |
| `keywords` | The term as a one-item list, or every term in a comparison. |
| `geo` | Country or region code; an empty string means worldwide. |
| `timeframe`, `category`, `property` | The settings used. |
| `searchUrl` | A link to the same search on trends.google.com. |
| `interestOverTime` | Points `{date, label, value}` (or `values` per keyword). Dates are UTC. The last point may be `{..., "isPartial": true}`. |
| `summary` | `average`, `peak`, `peakDate`, `latest` (keyed by keyword on a comparison). |
| `relatedQueries` | `{top, rising}` lists of `{query, value, display, link}`; rising items also have `isBreakout`. Keyed by keyword on a comparison. |
| `interestByRegion` | `{geoCode, geoName, value}` (or `values` per keyword). |
| `scrapedAt` | When this row was fetched (UTC). |
| `error` | `{code, message}` when `status` is `error`; otherwise absent or `null`. |

#### Trending-now rows

| Field | Description |
|---|---|
| `status`, `type` | `ok` and `trending`. |
| `geo`, `rank`, `title` | Country, position in the list, and the search. |
| `approxTraffic` | Google's approximate volume band, for example `2000+` or `200+`. |
| `startedAt` | When Google marked it as trending (UTC). |
| `image`, `searchUrl` | Thumbnail and a Trends link. |
| `news` | Articles as `{title, url, source, image}`. |

### Good to know

- **The 0-100 number is relative popularity, not a search count.** 100 is the peak in the chosen timeframe and country for that search; 50 is half as popular. In a comparison, all keywords share one scale.
- **Related topics are not returned.** Google sends an empty list to automated clients, so this actor does not offer them.
- **Rising related queries can look unrelated** on very broad worldwide keywords. They come straight from Google. Narrow the keyword or pick a country, and prefer the `top` list for stable results.
- **Google Trends rate-limits aggressively.** This actor fetches each search with a fresh cookie session, retries up to 5 times on a new session and a new IP, and the default `auto` proxy switches to residential when Google answers 429. You never pay for proxy traffic yourself.
- **A wrong country or timeframe is not retried** (`INVALID_REQUEST`) and is not charged.
- Check that your use of the data complies with Google's terms and your local law. This actor only reads public pages and public feeds, without logging in, and returns no personal data.

### Example output

From our 16 November 2026 run for the keyword `python`, worldwide, past 12 months (shortened). The rising list is shown as Google returned it, including a one-off breakout; see *Good to know*.

```json
{
  "status": "ok",
  "type": "keyword",
  "keyword": "python",
  "keywords": ["python"],
  "geo": "",
  "timeframe": "today 12-m",
  "category": 0,
  "property": "web",
  "searchUrl": "https://trends.google.com/trends/explore?q=python&date=today+12-m&hl=en-US",
  "interestOverTime": [
    { "date": "2025-11-16T00:00:00Z", "label": "Nov 16–22, 2025", "value": 65 },
    { "date": "2026-11-15T00:00:00Z", "label": "Nov 15–21, 2026", "value": 27, "isPartial": true }
  ],
  "summary": {
    "average": 64.5,
    "peak": 100,
    "peakDate": "2026-06-14T00:00:00Z",
    "latest": 31
  },
  "relatedQueries": {
    "top": [
      { "query": "what is python", "value": 100, "display": "100", "link": "https://trends.google.com/trends/explore?q=what+is+python&date=today+12-m" },
      { "query": "python code", "value": 93, "display": "93", "link": "https://trends.google.com/trends/explore?q=python+code&date=today+12-m" }
    ],
    "rising": [
      { "query": "walmart near me", "value": 13900, "display": "Breakout", "isBreakout": true, "link": "https://trends.google.com/trends/explore?q=walmart+near+me&date=today+12-m" },
      { "query": "python programming tutorial", "value": 5550, "display": "Breakout", "isBreakout": true, "link": "https://trends.google.com/trends/explore?q=python+programming+tutorial&date=today+12-m" }
    ]
  },
  "interestByRegion": [
    { "geoCode": "CN", "geoName": "China", "value": 100 },
    { "geoCode": "SG", "geoName": "Singapore", "value": 63 },
    { "geoCode": "NP", "geoName": "Nepal", "value": 45 }
  ],
  "scrapedAt": "2026-11-16T08:08:45Z"
}
```

That row had 53 time points, 25 top queries, 20 rising queries and 70 regions. A comparison row uses `values` on each time point and region, and keys `summary` and `relatedQueries` by keyword. A trending-now row looks like this (from the same day's US feed):

```json
{
  "status": "ok",
  "type": "trending",
  "geo": "US",
  "rank": 1,
  "title": "alexandra daddario",
  "approxTraffic": "200+",
  "startedAt": "2026-11-16T07:50:00Z",
  "searchUrl": "https://trends.google.com/trends/explore?q=alexandra+daddario&geo=US",
  "news": [
    {
      "title": "3 Best Movies To Watch On Disney+ This Weekend (#1 Is Alexandra Daddario's Action Fantasy Epic)",
      "url": "https://screenrant.com/best-disney-plus-movies-watch-weekend-november-14/",
      "source": "ScreenRant"
    }
  ]
}
```

### Advanced usage

#### Compare a topic across countries every week

```json
{
  "keywords": ["ai agents", "vector database"],
  "timeframe": "today 3-m",
  "geos": ["US", "GB", "IN", "DE"],
  "includeInterestOverTime": true,
  "includeRelatedQueries": true,
  "includeInterestByRegion": false
}
```

Schedule this weekly. Eight searches are charged (2 keywords × 4 countries). Compare two runs on `keyword` and `geo` to see which market is gaining.

#### Build a daily trending-now archive

```json
{
  "trendingGeos": ["US", "GB", "IN"],
  "maxTrendingPerGeo": 25,
  "includeTrendingNews": true
}
```

Schedule this daily from the actor's Schedules tab. Join on `geo` and `title` to see which topics appeared, disappeared or rose in rank.

#### Export rising queries for a keyword list to a spreadsheet

```python
from apify_client import ApifyClient
import csv

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("logicbase_systems/google-trends").call(run_input={
    "keywords": ["web scraping", "data engineering", "vector database"],
    "timeframe": "today 12-m",
    "geos": ["US"],
})
with open("rising_queries.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.writer(f)
    w.writerow(["keyword", "query", "display", "isBreakout"])
    for item in client.dataset(run.default_dataset_id).iterate_items():
        if item.get("status") != "ok":
            continue
        for q in (item.get("relatedQueries") or {}).get("rising") or []:
            w.writerow([item["keyword"], q["query"], q.get("display"), q.get("isBreakout")])
```

The same actor works from the JavaScript client, the REST API, n8n, Make, Zapier, and the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) (for example `https://mcp.apify.com?tools=logicbase_systems/google-trends`).

### Pricing

**Pay per event: $0.003 per keyword result ($3 per 1,000).** A comparison of 3 keywords counts as 3 results. Trending-now topics cost **$0.001 each**. There is also Apify's standard Actor-start event of $0.00005 per run.

- Searches that fail, that Google rejects (for example a wrong country code), or that have no data are **not charged**.
- All output options cost the same. You are not charged per option.
- Proxy and compute costs are included in the price. The default `proxyStrategy: auto` tries a cheap data-center proxy and switches to residential when Google rate-limits it.
- To cap spending, set a maximum cost per run in the run options, or use **Max searches in total**. The actor stops when the limit is reached.

### FAQ

**Do I need a Google account or an API key?**
No. The actor reads the same public data that trends.google.com shows to anyone. There is no login.

**Is there an official Google Trends API?**
Google offers a limited alpha API with restricted access. This actor needs no approval and returns the data the website shows.

**What does the 0-100 number mean?**
It is relative popularity in the chosen timeframe and country, not a search count. In a comparison, all keywords share one scale, so you can see which is bigger.

**Why do I see `no_data`?**
Google hides results when a search is too rare. Try a broader keyword, a longer timeframe, or no country filter. These rows are free.

**What are "Breakout" queries?**
Searches whose popularity grew by more than 5,000%. They are marked `isBreakout: true`.

**Why are there no related topics?**
Google only returns related topics to browser sessions it trusts and sends an empty list to automated clients. Rather than charge you for empty data, this actor does not offer them. Related queries work fully.

**Why does a rising query look unrelated?**
Rising lists come straight from Google. For very broad worldwide keywords they sometimes contain one-off breakout searches. Pick a country or a narrower keyword for cleaner rising lists, and use the `top` list for stable results.

**Can I get exact search volumes?**
No. Google Trends only publishes relative interest. The trending-now feed gives an approximate volume such as `2000+`.

**Can I run several keywords in several countries together?**
Yes. Each keyword is run once per country in `geos`, and each pair is one charged result.

**Can I compare more than 5 keywords?**
Google allows up to 5 per comparison. Use one keyword as an anchor in several comparison lines to chain larger sets.

**How many keywords can I run at once?**
Thousands per run. Raise *Parallel searches* for speed, or lower it if you see many retries. Our 195-keyword test on 16 November 2026 finished in 142 seconds.

**Why is the date in UTC?**
Every point carries an ISO date in UTC plus Google's own `label` text. Use *Timezone offset* if you want Google's labels in your timezone.

**What happens when Google rate-limits a search?**
The actor retries up to 5 times with a new session and a new IP, and switches to residential proxy automatically. If it still fails, you get a free `RATE_LIMITED` or `BLOCKED` row.

**Is scraping Google Trends allowed?**
The actor only reads public pages and public feeds without logging in. You are responsible for using the data in line with Google's terms and your local law. Do not use it to collect personal data.

**It stopped working. What now?**
Open an issue on this actor's page with a run link. Google changes things now and then, and we monitor runs daily.

### More Logicbase Systems scrapers

- [YouTube Transcript & Subtitles Scraper](https://apify.com/logicbase_systems/youtube-transcript) — transcripts, timestamped captions and SRT from videos, playlists and channels. Useful next to Trends when you want the spoken content of the channels that cover a rising topic.
- [YouTube Data Scraper](https://apify.com/logicbase_systems/youtube-data-scraper) — views, likes, subscribers and optional comments for YouTube videos, channels, playlists and search results. Useful next to Trends when you want to see how videos on a rising topic are actually performing.

# Actor input Schema

## `keywords` (type: `array`):

Search terms, one per line. Each keyword is a separate search and returns one result row. Topics and phrases work, for example web scraping or "cold brew".

## `comparisonGroups` (type: `array`):

Each line compares up to 5 keywords on the same 0-100 scale, for example: python | javascript | rust. A comparison returns one row with a value per keyword and is charged as one result per keyword.

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

Country codes (US, GB, IN, DE ...) to fetch Google's current trending searches for, with approximate search volume and news links. Charged per trending topic.

## `maxTrendingPerGeo` (type: `integer`):

How many trending topics to keep per country (Google lists up to about 25).

## `includeTrendingNews` (type: `boolean`):

Add the news articles Google shows next to each trending topic.

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

How far back to look. Longer timeframes give weekly or monthly points, short ones give hourly points.

## `customTimeframe` (type: `string`):

Overrides the timeframe above. Format: YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-06-30.

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

Where to measure interest: US, GB, IN, DE or a region such as US-CA. Leave empty for worldwide. With several entries every keyword is run once per entry (and charged each time).

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

Which Google search to measure.

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

Google Trends category number. 0 means all categories. For example 5 is Computers & Electronics, 7 is Finance, 45 is Health.

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

Language of related queries and region names, for example en-US, de, es, hi.

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

Minutes from UTC used for the time axis, for example 330 for India or -300 for New York. Default 0 (UTC).

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

The 0-100 popularity series, plus average, peak and latest values.

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

Top and rising related searches (rising ones are flagged isBreakout when Google shows 'Breakout').

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

Popularity per country (worldwide searches) or per state/region (country searches).

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

How finely to split interest by region. Automatic picks countries for worldwide and states for a country.

## `includeLowSearchVolumeRegions` (type: `boolean`):

Also list regions where Google reports very little search volume.

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

Hard cap on searches (keyword x country) for the whole run. Leave empty for no cap.

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

How many searches to run at the same time. Lower it if you see many rate-limit retries.

## `proxyStrategy` (type: `string`):

Auto (recommended) uses a cheap data-center proxy first and switches to residential when Google rate-limits it. You never pay for proxy traffic yourself.

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

Advanced: your own proxy URLs. Only used when you enter custom proxy URLs, otherwise the strategy above applies.

## Actor input object example

```json
{
  "keywords": [
    "web scraping",
    "data engineering"
  ],
  "maxTrendingPerGeo": 25,
  "includeTrendingNews": true,
  "timeframe": "today 12-m",
  "searchProperty": "web",
  "category": 0,
  "language": "en-US",
  "timezoneOffset": 0,
  "includeInterestOverTime": true,
  "includeRelatedQueries": true,
  "includeInterestByRegion": true,
  "regionResolution": "",
  "includeLowSearchVolumeRegions": false,
  "maxConcurrency": 5,
  "proxyStrategy": "auto"
}
```

# Actor output Schema

## `results` (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 = {
    "keywords": [
        "web scraping",
        "data engineering"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("logicbase_systems/google-trends").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 = { "keywords": [
        "web scraping",
        "data engineering",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("logicbase_systems/google-trends").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 '{
  "keywords": [
    "web scraping",
    "data engineering"
  ]
}' |
apify call logicbase_systems/google-trends --silent --output-dataset

```

## MCP server setup

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

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/78FfXyteYkOkfeWOv/builds/zdlbuOF0Y9OR1w63z/openapi.json
