# Google Trends Scraper: Reliable & Fast (`cylindrical_lighthouse/google-trends`) Actor

Scrape Google Trends: interest over time, by region and related queries for up to 5 compared keywords, plus Trending Now. Fast runs, no timeouts.

- **URL**: https://apify.com/cylindrical\_lighthouse/google-trends.md
- **Developed by:** [Lighthouse Data](https://apify.com/cylindrical_lighthouse) (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 $2.00 / 1,000 keyword reports

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: Reliable & Fast

Get Google Trends data as clean JSON, CSV or Excel: **interest over time, interest by region, related queries**, comparisons of up to **5 keywords** on one scale, and the live **Trending Now** list, for any country, region or city, any time range, category and search type (Web, YouTube, News, Images, Shopping). Runs finish in seconds and never hang waiting on Google.

### What does Google Trends Scraper do?

- **Interest over time:** the 0–100 timeline for every keyword, from the past hour to 2004–present, or any custom date range. Dates are ISO-8601 UTC, and the in-progress last point is flagged `isPartial`.
- **Interest by region:** 0–100 per country, region/state, US metro area (DMA) or city, with coordinates for cities.
- **Related queries:** top and rising queries, with Google's **Breakout** flag (> 5000% growth).
- **Comparisons:** up to 5 terms on one shared scale, exactly like the Google Trends website.
- **Trending Now:** what people search for right now in any country: search volume, % increase, start and end time, the grouped breakdown queries and categories. You get hundreds of trends per country, not only the 10 in the RSS feed.
- **Filters:** 3,600+ locations, 1,100+ categories, 5 search types (Web, Image, News, Google Shopping, YouTube) and topic IDs (`/m/…`).
- **Summary stats** on every report: average, peak (with date) and latest complete value.

### Why use it?

- **Runs that finish.** Google answers the first request from a new visitor with *HTTP 429 Too Many Requests* while it sets a cookie. Scrapers that treat this as a block wait and retry until they time out. This Actor recognises the handshake, keeps the cookie, and switches to a fresh IP only on a real rate limit. It never sleeps for minutes. In our tests, 57 of 57 queries succeeded on the first attempt. Every run also has a built-in safety margin before its timeout, so partial results are saved and the run ends cleanly.
- **Fast and light:** no browser, plain HTTP, 256 MB of memory. A 2-keyword run takes about 5–10 seconds.
- **Typed, analysis-ready data:** numbers are numbers, dates are ISO-8601 UTC, missing values are `null` (never `0` or `""`), and each record links back to the matching trends.google.com page.
- **Honest billing:** keywords where Google has *not enough data* are saved and flagged but **not charged**, and failed queries are never charged. Proxy costs are included in the price.
- **One Actor for everything:** keyword research, comparisons and Trending Now, with the same clean output.

### Use cases

- **SEO and content:** find seasonal peaks, rising queries and breakout topics before writing; compare keyword variants; see where interest is concentrated by state or city.
- **Market and brand research:** compare up to 5 brands or products per market; track YouTube or Shopping interest; monitor launch impact.
- **Trading and alternative data:** daily or hourly search-interest series with UTC timestamps and partial-period flags for backtests and signals.
- **Newsrooms and social teams:** poll Trending Now hourly per country, filtered by category (Sports, Politics, Business…).
- **AI agents and automations:** "Is X trending?" and "Compare A vs B in Germany" as a single fast call through the Apify API, MCP, Make, n8n or Zapier.

### How to use it

1. Click **Try for free**.
2. Enter your **keywords** (each gets its own 0–100 scale) and/or **comparisons** such as `coffee, tea, matcha` (shared scale).
3. Pick **locations** (for example `US`, `GB`, `US-CA`, or `worldwide`) and a **time range**.
4. Optionally add **Trending Now** countries.
5. Click **Start**, then download the results as JSON, CSV or Excel, or read them through the API.

Example input:

```json
{
  "keywords": ["coffee", "tea"],
  "comparisons": ["iphone, pixel, galaxy"],
  "geos": ["US", "GB"],
  "timeframe": "today 12-m",
  "trendingNowGeos": ["US"],
  "maxTrendingNowItemsPerGeo": 25
}
```

This input creates 2 keywords × 2 locations = 4 reports, plus 1 comparison × 2 locations = 6 reports (one per term), plus 25 trends.

#### Track keywords on a schedule

Google Trends is most useful over time. To track your keywords every week:

1. Save your input as a **Task** (the **Save as a new task** button).
2. Open **Schedules → Create new**, choose the task, and set, for example, `0 6 * * 1` (every Monday at 06:00 UTC). Use `0 * * * *` for hourly Trending Now snapshots.
3. Add an **integration** (Google Sheets, Slack, email or a webhook) to get each run's data where you work.

Tracking 20 keywords weekly costs about 20 × $0.003 + $0.0005 ≈ **$0.06 per week** on the Free plan.

#### Call it from code or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/cylindrical_lighthouse~google-trends/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"comparisons": ["chatgpt, gemini, copilot"], "geos": ["US"], "timeframe": "today 3-m"}'
```

Every input field has a description with an example, and every output field is described in the dataset schema, so MCP clients and AI agents can call this Actor without extra instructions.

### Input

| Field | Type | Description | Example |
|---|---|---|---|
| `keywords` | array of strings | Search terms or topic IDs; each gets its own 0–100 scale | `["coffee", "tea"]` |
| `comparisons` | array of strings | Groups of 2–5 comma-separated terms on one shared scale | `["coffee, tea, matcha"]` |
| `geos` | array of strings | Country (`US`), region (`US-CA`), US metro (`US-NY-501`) or `worldwide`. Empty = worldwide | `["US", "GB"]` |
| `timeframe` | string | `now 1-H`, `now 4-H`, `now 1-d`, `now 7-d`, `today 1-m`, `today 3-m`, `today 12-m` (default), `today 5-y`, `all` | `"today 12-m"` |
| `customTimeRange` | string | Exact range `YYYY-MM-DD YYYY-MM-DD`; overrides `timeframe` | `"2024-01-01 2024-06-30"` |
| `property` | string | `""` web (default), `images`, `news`, `froogle` (Google Shopping), `youtube` | `"youtube"` |
| `category` | integer | Google Trends category ID; 0 = all | `7` (Finance) |
| `includeInterestOverTime` | boolean | Timeline + average, peak, latest (default `true`) | `true` |
| `includeInterestByRegion` | boolean | Interest per location (default `true`) | `true` |
| `includeRelatedQueries` | boolean | Top and rising related queries (default `true`) | `true` |
| `regionResolution` | string | `AUTO` (default), `COUNTRY`, `REGION`, `DMA`, `CITY` | `"CITY"` |
| `includeLowVolumeRegions` | boolean | Also list regions with too little data (value `null`) | `false` |
| `trendingNowGeos` | array of strings | Countries for Trending Now | `["US", "GB"]` |
| `trendingNowHours` | string | `4`, `24` (default), `48` or `168` | `"24"` |
| `trendingNowCategory` | string | `0` all, or `1`–`20` (e.g. `17` Sports, `14` Politics, `18` Technology) | `"17"` |
| `trendingNowActiveOnly` | boolean | Only trends that are still active | `false` |
| `maxTrendingNowItemsPerGeo` | integer | Max trends per country; 0 = all (default 25) | `25` |
| `maxItems` | integer | Max results in total; 0 = no limit (default 1000) | `100` |
| `language` | string | Language for names (default `en-US`) | `"de"` |
| `proxyConfiguration` | object | Apify Proxy. The default works and is included in the price | `{"useApifyProxy": true}` |
| `residentialFallback` | boolean | Retry a blocked query through residential proxy at no extra cost (default `true`) | `true` |

Popular category IDs: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 8 Games, 12 Business & Industrial, 13 Internet & Telecom, 16 News, 18 Shopping, 20 Sports, 29 Real Estate, 44 Beauty & Fitness, 45 Health, 47 Autos & Vehicles, 67 Travel, 71 Food & Drink, 174 Science, 958 Jobs & Education. The full list is the category picker on [trends.google.com](https://trends.google.com/trends/explore) (the `cat=` value in the URL).

### Output

Each **keyword report** is one record. The dataset has ready-made views: **Keyword overview**, **Interest over time**, **Interest by region**, **Related queries**, **Trending Now** and **Errors**. The table views flatten the data into one row per point, region or query, for easy CSV/Excel export.

```json
{
  "recordType": "keywordReport",
  "keyword": "coffee",
  "keywordType": "searchTerm",
  "comparedWith": [],
  "geo": "US",
  "geoName": "United States",
  "timeframe": "today 12-m",
  "startDate": "2025-09-29T00:00:00.000Z",
  "endDate": "2026-09-29T00:00:00.000Z",
  "category": 0,
  "categoryName": "All categories",
  "property": "web",
  "granularity": "WEEK",
  "hasData": true,
  "averageInterest": 76.79,
  "peakInterest": 100,
  "peakDate": "2026-04-12T00:00:00.000Z",
  "latestInterest": 73,
  "interestOverTime": [
    { "date": "2025-09-28T00:00:00.000Z", "value": 74, "isPartial": false },
    { "date": "2026-09-27T00:00:00.000Z", "value": 80, "isPartial": true }
  ],
  "regionResolution": "REGION",
  "interestByRegion": [
    { "regionCode": "US-WY", "regionName": "Wyoming", "value": 100, "latitude": null, "longitude": null },
    { "regionCode": "US-HI", "regionName": "Hawaii", "value": 46, "latitude": null, "longitude": null }
  ],
  "relatedQueries": [
    { "query": "coffee near me", "kind": "top", "value": 100, "formattedValue": "100", "isBreakout": false, "queryUrl": "https://trends.google.com/trends/explore?q=coffee+near+me&date=today+12-m&geo=US" },
    { "query": "how to brew pour over coffee", "kind": "rising", "value": 3350, "formattedValue": "+3,350%", "isBreakout": false, "queryUrl": "https://trends.google.com/trends/explore?q=how+to+brew+pour+over+coffee&date=today+12-m&geo=US" }
  ],
  "url": "https://trends.google.com/trends/explore?date=today+12-m&geo=US&q=coffee",
  "scrapedAt": "2026-09-29T21:37:32.830Z"
}
```

A **Trending Now** record:

```json
{
  "recordType": "trendingNow",
  "term": "czechia vs england",
  "rank": 1,
  "geo": "GB",
  "geoName": "United Kingdom",
  "hours": 24,
  "searchVolume": 500000,
  "increasePercent": 1000,
  "startedAt": "2026-09-29T17:30:00.000Z",
  "endedAt": null,
  "isActive": true,
  "trendBreakdown": ["czechia vs england", "england football", "nations league"],
  "categoryIds": [17],
  "categories": ["Sports"],
  "exploreUrl": "https://trends.google.com/trends/explore?date=now+7-d&geo=GB&q=czechia+vs+england",
  "url": "https://trends.google.com/trending?geo=GB&hours=24",
  "scrapedAt": "2026-09-29T21:37:29.974Z"
}
```

A query that fails (for example an invalid location) is saved as a free `"recordType": "error"` record that explains what to fix. The run's `RUN_SUMMARY` key-value record has totals and request statistics.

### Pricing

Pay per event. Proxy and platform costs are **included**, so there is nothing else to pay.

| Event | Free plan | Starter | Scale | Business |
|---|---|---|---|---|
| Actor start (once per run) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| Keyword report (one keyword × location × time range, all sections) | $0.003 | $0.0025 | $0.0022 | $0.002 |
| Trending Now item | $0.0005 | $0.0004 | $0.00035 | $0.0003 |

**Examples (Free plan):**

- The prefilled input (2 keywords, US, 12 months) costs **$0.0065**.
- 100 keywords × 1 location = **$0.30**. 1,000 keyword reports = **$3.00**.
- Trending Now for 3 countries × 25 trends = **$0.038**.
- Keywords where Google has *not enough data*, and failed queries, are **free**.

Set **Maximum cost per run** in the run options to cap spending; the Actor stops cleanly when the limit is reached.

### FAQ

**Is it legal to scrape Google Trends?** This Actor collects only publicly available, aggregated and anonymised search-interest indices, the same numbers anyone sees on trends.google.com. It does not log in and does not collect personal data. Trending Now terms and related queries are aggregate searches and may mention public figures. Your results may still contain personal data, which is protected by GDPR and other regulations. Do not scrape personal data unless you have a legitimate reason. If you are unsure, consult your lawyers.

**What do the 0–100 values mean?** Google normalises interest: 100 is the peak popularity for the chosen terms, location and time; 50 is half as popular; 0 means not enough data. Values are relative, so compare terms by putting them in one **comparison**, not by comparing separate reports.

**Why are separate reports and comparisons different?** Each separate keyword is scaled to its own peak. Terms in one comparison share a scale, like typing them together on trends.google.com.

**Why do values change slightly between runs?** Google Trends is computed from a sample of searches, and Google refreshes that sample. Re-running the same query later can move some points by 1–2, the same as on trends.google.com. Runs a few minutes apart return identical data.

**Why are there no related topics?** Google currently returns an empty related-topics list to anyone who is not signed in to a Google account, while related queries still work. This Actor never logs in, so it does not offer (or charge for) a field that would always be empty. If Google changes this, we will add it back.

**Why does a keyword say "not enough data"?** Google hides very rare searches. The report is saved with `hasData: false` and is not charged. Try a broader location or a longer time range.

**Can I get daily data for a whole year?** Google decides the step size: ranges up to about 9 months return daily points, and longer ranges return weekly or monthly points. For daily data over longer periods, run consecutive `customTimeRange` windows. Note that each window has its own 0–100 scale.

**Do I need proxies?** No. The default Apify Proxy setting is included in the price and handles Google's limits for you.

**Can I use it with AI agents?** Yes. Through the Apify MCP server or API, one call such as `{"comparisons": ["a, b"], "geos": ["US"]}` returns typed JSON in seconds.

**Where can I try Apify?** New to Apify? A free account includes monthly free usage to try this Actor.

### Limitations

- Google Trends data is **relative (0–100)**, not absolute search volume. Trending Now volumes are Google's rounded buckets (e.g. 200,000 = "200K+").
- Related **topics** are not available (see the FAQ).
- Metro (DMA) and city levels are available only for some locations. If Google refuses a level, the Actor falls back to Google's default level and logs a warning.
- Google changes its internal endpoints from time to time. The Actor checks every response and fails loudly instead of returning empty data. We run daily health checks and fix breakages quickly.
- At most 2,000 queries (keywords × locations) per run. Split larger jobs into several runs.

### Changelog

See the [changelog](./CHANGELOG.md) (the **Changelog** tab on the Store page).

### Support

Found a bug or need a feature? Open an issue on the **Issues** tab. We respond within 48 hours. Please include the run ID so we can reproduce the problem.

# Changelog

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

# Actor input Schema

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

Search terms to look up. Each keyword gets its own report on its own 0–100 scale. You can also use a Google Knowledge Graph topic ID, e.g. "/m/09gbxjr". To put terms on one shared scale, use "Comparisons" instead. Example: \["coffee", "tea"].

## `comparisons` (type: `array`):

Groups of 2–5 comma-separated terms compared on one shared 0–100 scale, exactly like typing them into Google Trends together. Each group returns one report per term, and each report lists the others in "comparedWith". Example: \["coffee, tea, matcha", "iphone, pixel"].

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

Where to measure interest. Use a country code ("US", "GB", "DE"), a region ("US-CA", "GB-SCT"), a US metro area ("US-NY-501") or "worldwide". Leave empty for worldwide. Every keyword and comparison runs once per location. Example: \["US", "GB"].

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

The period to cover. Shorter ranges give finer granularity: past hour/4 hours = by minute, past day = 8-minute steps, past 7 days = hourly, 1–3 months = daily, 12 months–5 years = weekly, 2004–present = monthly. Ignored when "Custom time range" is set. Example: "today 12-m".

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

Optional exact date range as "YYYY-MM-DD YYYY-MM-DD" (UTC), from 2004-01-01 to today. Overrides "Time range". Up to ~9 months gives daily points; longer ranges give weekly or monthly points. Example: "2024-01-01 2024-06-30".

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

Which Google search to measure: web search (default), image search, news search, Google Shopping or YouTube search. Example: "youtube".

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

Narrow results to a Google Trends category. 0 = all categories. Common IDs: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 8 Games, 12 Business & Industrial, 13 Internet & Telecom, 16 News, 18 Shopping, 20 Sports, 29 Real Estate, 44 Beauty & Fitness, 45 Health, 47 Autos & Vehicles, 67 Travel, 71 Food & Drink, 174 Science, 958 Jobs & Education. The README links the full list. Example: 7.

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

Include the timeline of 0–100 interest values (field "interestOverTime"), plus average, peak and latest values. Example: true.

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

Include the 0–100 interest per country, region, metro or city (field "interestByRegion"). Example: true.

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

Include the top and rising related search queries, with "Breakout" flags (field "relatedQueries"). Example: true.

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

The level of "Interest by region". AUTO uses Google's default: countries for worldwide, regions (states) for a country, metros for a region. Metro (DMA) and city levels work for US locations and some other countries. If Google does not offer the level for a location, the default is used and a warning is logged. Example: "CITY".

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

Also list regions where Google has too little search volume to show a value. Their "value" is null. Off by default, so only regions with data are returned. Example: false.

## `trendingNowGeos` (type: `array`):

Fetch the live Trending Now list (what people are searching for right now) for these country codes. Each trend includes search volume, % increase, start and end time, related breakdown queries and categories. Leave empty to skip. Example: \["US", "GB"].

## `trendingNowHours` (type: `string`):

How far back Trending Now looks: past 4 hours, 24 hours, 48 hours or 7 days. Example: "24".

## `trendingNowCategory` (type: `string`):

Only return trends in this category. Example: "17" (Sports).

## `trendingNowActiveOnly` (type: `boolean`):

Only return trends that are still active (no end time yet). Example: false.

## `maxTrendingNowItemsPerGeo` (type: `integer`):

The most trends to return per country, ranked as on trends.google.com. 0 = all (usually 200–450). Example: 25.

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

Stop after this many results in total (keyword reports + trending items). Keeps the cost predictable. 0 = no limit. Example: 100.

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

Language for region names and Trending Now, as a code like "en-US", "de" or "pt-BR". It does not filter which searches are counted. Example: "en-US".

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

Apify Proxy settings. The default (datacenter proxy with automatic IP rotation) works reliably and is included in the price. You do not need to change this. Example: {"useApifyProxy": true}.

## `residentialFallback` (type: `boolean`):

If Google blocks every datacenter IP tried for a query, retry that query once more through residential proxies. It is included in the price at no extra cost. Example: true.

## Actor input object example

```json
{
  "keywords": [
    "coffee",
    "tea"
  ],
  "comparisons": [
    "coffee, tea, matcha"
  ],
  "geos": [
    "US",
    "GB"
  ],
  "timeframe": "today 12-m",
  "customTimeRange": "2024-01-01 2024-06-30",
  "property": "youtube",
  "category": 7,
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "includeRelatedQueries": true,
  "regionResolution": "CITY",
  "includeLowVolumeRegions": false,
  "trendingNowGeos": [
    "US",
    "GB"
  ],
  "trendingNowHours": "24",
  "trendingNowCategory": "17",
  "trendingNowActiveOnly": false,
  "maxTrendingNowItemsPerGeo": 25,
  "maxItems": 100,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `overview` (type: `string`):

One record per keyword report, Trending Now item or error, with the key fields.

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

Interest-over-time points (ISO dates, 0-100 values, isPartial flag) per keyword and comparison.

## `regions` (type: `string`):

Interest by country, region, metro or city.

## `related` (type: `string`):

Top and rising related queries per keyword.

## `trendingNow` (type: `string`):

Currently trending searches per country, with search volume and related terms.

## `errors` (type: `string`):

Queries that failed or had not enough data, with an explanation of what to fix. Not charged.

## `runSummary` (type: `string`):

Totals and request statistics for the run.

# 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": [
        "coffee",
        "tea"
    ],
    "geos": [
        "US"
    ],
    "timeframe": "today 12-m",
    "property": "",
    "category": 0,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cylindrical_lighthouse/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": [
        "coffee",
        "tea",
    ],
    "geos": ["US"],
    "timeframe": "today 12-m",
    "property": "",
    "category": 0,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("cylindrical_lighthouse/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": [
    "coffee",
    "tea"
  ],
  "geos": [
    "US"
  ],
  "timeframe": "today 12-m",
  "property": "",
  "category": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call cylindrical_lighthouse/google-trends --silent --output-dataset

```

## MCP server setup

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