# Google Trends Scraper & API - Bulk, Trending Now

> Reliable Google Trends API: interest over time, interest by region/city, related queries and topics (top + rising), and Trending Now by country. Compare up to 5 terms, batch hundreds, any geo, time range, category or YouTube/News/Shopping. Auto-retries with fresh sessions.

- Category: Keyword data
- Price: $3 per 1,000 × search term analysed, billed per result by Apify (no subscription); any other billed events are listed on the Store page. Cap any run with `maxTotalChargeUsd`.
- Store page: https://apify.com/wrenfield-data/google-trends-scraper
- Human page: https://wrenfielddata.com/tools/google-trends-scraper/
- OpenAPI 3 spec: https://api.apify.com/v2/acts/wrenfield-data~google-trends-scraper/builds/default/openapi.json
- MCP tool: https://mcp.apify.com?tools=wrenfield-data/google-trends-scraper (appears as `wrenfield-data--google-trends-scraper`)

## Call it

Synchronous run that returns the dataset rows as JSON (use `/runs` for long jobs and poll; see the OpenAPI spec):

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/wrenfield-data~google-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["coffee", "tea, matcha"], "geos": ["US"], "timeRange": "today 12-m", "category": 0, "property": "web", "includeInterestOverTime": true, "includeInterestByRegion": true, "regionResolution": "auto", "includeLowSearchVolumeRegions": false, "maxRegions": 250, "includeRelatedQueries": true, "includeRelatedTopics": false, "maxRelatedItems": 25, "trendingGeos": ["US"], "trendingHours": "24", "trendingActiveOnly": false, "maxTrendingPerGeo": 10, "includeTrendingNews": true, "outputFormat": "flat", "language": "en-US", "timezoneOffsetMinutes": 0, "proxyConfiguration": {"useApifyProxy": true}, "residentialFallback": true, "maxConcurrency": 5, "maxRetries": 8}'
```

## Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchTerms` | array |  |  | One search term (or Google Trends topic ID like /m/02vqfm) per line. To compare up to 5 terms on the same 0-100 scale, put them on one line separated by commas, e.g. coffee, tea, matcha. Add as many lines as you like - each line is scraped separately for every geo. |
| `geos` | array |  | `["US"]` | Country code (US, GB, DE), region (US-CA, GB-SCT) or US metro (US-NY-501). Leave a line empty or write WORLDWIDE for worldwide. Every search term is scraped for every geo. |
| `timeRange` | string |  |  | Preset period. Use Custom time range below for exact dates. |
| `customTimeRange` | string |  |  | Optional, overrides the preset. YYYY-MM-DD YYYY-MM-DD (e.g. 2024-01-01 2024-12-31) or hourly YYYY-MM-DDTHH YYYY-MM-DDTHH within the last 7 days (UTC). |
| `category` | ['integer', 'string'] |  | `0` | Google Trends category ID to narrow ambiguous terms (0 = all categories). A number or a string id (e.g. "71", as in apify/google-trends-scraper) both work. Common: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 18 Shopping, 20 Sports, 44 Beauty & Fitness, 45 Health, 47 Autos & Vehicles, 66 Pets & Animals, 67 Travel, 71 Food & Drink, 958 Jobs & Education (full list in the README). |
| `property` | string |  | `"web"` | Which Google search product the interest comes from. |
| `includeInterestOverTime` | boolean |  | `true` | Timeline of search interest (0-100). |
| `includeInterestByRegion` | boolean |  | `true` | Interest per country / subregion / metro / city. When comparing several terms, values are each term's share (%) of the compared searches in that region, as on the Google Trends website. |
| `regionResolution` | string |  | `"auto"` | Granularity of interest by region. Falls back to Google's default if the resolution isn't available for the geo. |
| `includeLowSearchVolumeRegions` | boolean |  | `false` | Also return regions with too little data (value 0). |
| `maxRegions` | integer |  | `250` | Keep only the top N regions by interest. |
| `includeRelatedQueries` | boolean |  | `true` | Top and rising related searches (rising includes Breakout terms). |
| `includeRelatedTopics` | boolean |  | `false` | Off by default. Top and rising related topics. Google returns empty related topics to regular automated sessions, so when enabled this option requests them through Google Trends' embeddable-widget endpoint, sending a Referer header from a pool of public websites. Enable it only if this method is acceptable for your use case. Adds 2 requests per term; if topics can't be retrieved, the term is still returned with its other data. |
| `maxRelatedItems` | integer |  | `25` | Maximum rows per top / rising list. |
| `trendingGeos` | array |  |  | Get the current Trending Now / daily trending searches for these countries (e.g. US, GB, IN, or a region like US-CA). Works with or without search terms. |
| `trendingHours` | string |  | `"24"` | Trends that started within this window. |
| `trendingCategories` | array |  |  | Optional filter. Empty = all categories. |
| `trendingActiveOnly` | boolean |  | `false` | Skip trends that have already ended. |
| `maxTrendingPerGeo` | integer |  | `25` | Google lists up to ~500 trends per day for big countries; ranked by relevance. |
| `includeTrendingNews` | boolean |  | `true` | Attach up to 3 news articles (title, URL, source, time, image) that Google links to each trending search. One extra request per 50 trends. |
| `outputFormat` | string |  | `"flat"` | Flat: every timeline point, region, related query and topic is its own row with a type column. Per term: one row per search term + geo with arrays inside. Price is the same - you pay per term, not per row. |
| `advancedQueries` | array |  |  | Optional. Fine-grained list of queries, each with its own geo / time range / category / property, e.g. [{"terms": "nike, adidas", "geo": "DE", "timeRange": "today 5-y", "category": 0, "property": "youtube"}]. Missing fields use the values above. |
| `language` | string |  | `"en-US"` | Language of region and topic names, e.g. en-US, de, fr. |
| `timezoneOffsetMinutes` | integer |  | `0` | Google's tz parameter (minutes behind UTC, e.g. 300 = US Eastern standard time). Default 0 = UTC dates. |
| `proxyConfiguration` | object |  | `{"useApifyProxy": true}` | Defaults to Apify datacenter proxy (cheapest) with automatic residential fallback when Google blocks it. Choose the RESIDENTIAL group to always use residential IPs. |
| `residentialFallback` | boolean |  | `true` | When a request is rate-limited (HTTP 429) on datacenter IPs, retry it on a residential IP. Recommended - this is what keeps the success rate above 99%. |
| `maxConcurrency` | integer |  | `5` | Queries processed in parallel. |
| `maxRetries` | integer |  | `8` | Each attempt uses a fresh session (new IP + new cookie) with exponential backoff. |
| `geo` | string |  |  | Country code as a single string (e.g. US). Empty = worldwide. Used when Geo list is empty. Same as geo in apify/google-trends-scraper. |
| `isMultiple` | boolean |  | `true` | Same as isMultiple in apify/google-trends-scraper. On (default): commas in a searchTerms line compare up to 5 terms (Google's limit). Off: each line is one search term, commas included. |
| `maxItems` | integer |  | `0` | Maximum number of term×geo queries to run. 0 = no limit. |
| `startUrls` | array |  |  | Paste Google Trends explore URLs; each is turned into a query (q, geo, date, cat). Also accepts apify/google-trends-scraper's format: [{"url": "…"}] or [{"requestsFromUrl": "…"}]. |
| `viewedFrom` | string |  |  | Same as viewedFrom in apify/google-trends-scraper: 2-letter country for the proxy (e.g. us). Optional. |
| `spreadsheetId` | string |  |  | Same as spreadsheetId in apify/google-trends-scraper: a public Google Sheet (Anyone with the link). Terms are read from the first column; row 1 is the header. Added to Search terms. |
| `maxRequestRetries` | integer |  |  | Same as maxRequestRetries in apify/google-trends-scraper. Used as Max retries when that is not set. |
| `pageLoadTimeoutSecs` | integer |  |  | Accepted so apify/google-trends-scraper inputs work unchanged. Not needed here: we don't load full browser pages per term. |
| `skipDebugScreen` | boolean |  |  | Accepted so apify/google-trends-scraper inputs work unchanged. We never save page snapshots. |
| `dataforseoFallback` | boolean |  | `true` | If the browser scrape fails after retries, fetch interest-over-time from DataForSEO's Google Trends API (~$0.011 per call on the Actor owner's account; you are not charged extra beyond the normal term-result event). Related queries/regions are not included in the fallback. |

## Example input

```json
{
  "searchTerms": [
    "coffee",
    "tea, matcha"
  ],
  "geos": [
    "US"
  ],
  "timeRange": "today 12-m",
  "category": 0,
  "property": "web",
  "includeInterestOverTime": true,
  "includeInterestByRegion": true,
  "regionResolution": "auto",
  "includeLowSearchVolumeRegions": false,
  "maxRegions": 250,
  "includeRelatedQueries": true,
  "includeRelatedTopics": false,
  "maxRelatedItems": 25,
  "trendingGeos": [
    "US"
  ],
  "trendingHours": "24",
  "trendingActiveOnly": false,
  "maxTrendingPerGeo": 10,
  "includeTrendingNews": true,
  "outputFormat": "flat",
  "language": "en-US",
  "timezoneOffsetMinutes": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true,
  "maxConcurrency": 5,
  "maxRetries": 8
}
```

## Output fields

One flat row per result:

| Field | Type | Description |
|---|---|---|
| `type` | string | Row type: interest_over_time, interest_by_region, related_query, related_topic, trending_now, term (per-term format) or status (no data / error, free) |
| `searchTerm` | string | Search term (or trending search) |
| `comparedWith` | array | Other terms in the same comparison (values share one 0-100 scale) |
| `geo` | string | Geo code (WORLDWIDE for worldwide) |
| `timeRange` | string | Requested time range |
| `period` | string | Resolved date range from Google |
| `category` | integer | Category ID |
| `property` | string | web, images, news, youtube or shopping |
| `date` | string | Timeline point (YYYY-MM-DD, or ISO datetime for hourly data, UTC) |
| `timestamp` | integer | Unix timestamp of the timeline point |
| `formattedTime` | string | Google's label for the point |
| `value` | integer | Interest 0-100 (region rows of comparisons: share %); related rows: relative value or % growth |
| `formattedValue` | string | Google's formatted value (e.g. +250%, Breakout) |
| `hasData` | boolean | False when Google has too little data |
| `isPartial` | boolean | Last timeline point is still being collected |
| `resolution` | string | Timeline (WEEK, DAY, HOUR...) or region resolution |
| `rank` | integer | Position in its list |
| `geoCode` | string | Region code (e.g. US-CA, DMA 807) |
| `geoName` | string | Region name |
| `valueType` | string | interest (single term) or share (comparison) |
| `lat` | number | City latitude |
| `lng` | number | City longitude |
| `rankType` | string | top or rising |
| `query` | string | Related query |
| `topicId` | string | Knowledge Graph topic ID |
| `topicTitle` | string | Topic name |
| `topicType` | string | Topic type |
| `isBreakout` | boolean | Rising more than 5000% |
| `link` | string | Google Trends link for the related item |
| `searchVolume` | integer | Trending now: approximate searches |
| `searchVolumeFormatted` | string | e.g. 200K+ |
| `increasePercentage` | integer | Trending now: growth % |
| `startedAt` | string | Trend start (UTC) |
| `endedAt` | string | Trend end (UTC), null while active |
| `isActive` | boolean | Trend still active |
| `categories` | array | Trending categories |
| `trendBreakdown` | array | Queries grouped into this trend |
| `newsArticles` | array | News headlines {title, url, source, picture} |
| `status` | string | ok, partial, no_data or error |
| `averageInterest` | number | Per-term format: mean interest |
| `peakInterest` | integer | Per-term: max interest |
| `peakDate` | string | Per-term: date of the peak |
| `latestInterest` | integer | Per-term: last value |
| `interestOverTime` | array | Per-term: timeline |
| `interestByRegion` | array | Per-term: regions |
| `relatedQueriesTop` | array | Per-term |
| `relatedQueriesRising` | array | Per-term |
| `relatedTopicsTop` | array | Per-term |
| `relatedTopicsRising` | array | Per-term |
| `error` | string | Error message (rows with errors are free) |
| `exploreUrl` | string | Open the same query on trends.google.com |
| `scrapedAt` | string | UTC timestamp |

## Notes

- Auth: an Apify API token as `Authorization: Bearer <token>`; the MCP server also supports OAuth sign-in.
- Failed or empty results are not charged on most tools; check the pricing on the Store page.
- Questions: hello@wrenfielddata.com
