Apify example task · whoareyouanas/google-trends-batch-research
Track US search interest in coffee with Google Trends
Chart relative Google Search interest for coffee in the United States over the last three months. Review the timeline scores and quality notes before comparing another period.
- Actor
- Google Trends API: Bulk Keyword Trends Export
- Result limit
- 1 (maxAnalyses)
- Estimated cost
- Up to $0.01
- Run options
- 1 GB memory · 180 s timeout
Example updated 2026-11-20 · actor build 1.1.10 · runs in your own Apify account
01 / About the actor
Google Trends API: Bulk Keyword Trends Export
Research Google Trends keywords across geographies and time windows. Export relative interest, regions, and related-query reports with explicit analysis outcomes, quality notes, and resumable batches.
Plan a research matrix
Expand keywords or comparison groups across selected countries and time windows.
Shared comparison scales
Use native comparison groups when keywords need a shared timeline scale.
Review analysis quality
Keep completion status, coverage, effective periods, and source quality distinct.
02 / Input
The exact input this example runs.
Supply keywords for independent research or comparisonGroups for compare mode. The geography/time-window matrix determines planned analyses. maxAnalyses bounds the plan, and planOnly can preview it without a completed-analysis event.
{
"mode": "independent",
"keywords": [
"coffee"
],
"geographies": [
"US"
],
"timeWindows": [
"today 3-m"
],
"surfaces": [
"timeline"
],
"maxAnalyses": 1,
"maxRunSeconds": 120,
"concurrency": 1,
"reviewRelatedQueries": false,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
}| Field | Value in this example | What it controls |
|---|---|---|
| modeChange this | "independent" | Research each keyword independently or compare explicit groups on a native shared timeline scale. |
| keywordsChange this | coffee | Search terms or Google topic IDs. Required in independent mode. |
| geographiesChange this | US | Country/subregion codes, such as US, GB, IN or US-CA. Use an empty string for worldwide. |
| timeWindowsChange this | today 3-m | Google preset or YYYY-MM-DD YYYY-MM-DD. Use fixed dates for repeatable research. |
| surfacesChange this | timeline | Timeline is required. Related queries are available for independent keyword research. |
| maxAnalysesChange this | 1 | Reject a larger expanded matrix before any source requests; maximum 1,000. |
| maxRunSeconds | 120 | Stop new work before this runtime budget and preserve results for resume. |
| concurrency | 1 | Maximum analyses in flight; requests also follow a shared pacing limit. |
| reviewRelatedQueriesChange this | false | Add literal seed-token overlap, URL-looking text and exact promotional-phrase annotations. Never filters or ranks relevance. Disable without changing the research plan, including on resume. |
| proxyConfiguration | 2 settings | Residential sessions are recommended for production. Set useApifyProxy to false for direct local tests. |
Other inputs you can add (8)
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| comparisonGroups | array | Not specified | Compare mode only. Each object contains keywords (2–5 distinct terms) and an optional label. Related queries require independent mode. |
| category | integer | Not specified | Google Trends category ID; zero includes all categories. Minimum: 0 · Maximum: 100000 |
| property | string | Not specified | The Google search surface to measure. Options: web, images, news, youtube, shopping |
| language | string | Not specified | Interface language for source labels; does not translate keywords. |
| timezoneOffsetMinutes | integer | Not specified | Google/JavaScript convention: India is -330, UTC is 0. Does not set research geography. Minimum: -1439 · Maximum: 1439 |
| requestDelayMillis | integer | Not specified | Minimum time between source requests across all workers. Increase when Google rate-limits requests. Minimum: 250 · Maximum: 60000 |
| maxRetries | integer | Not specified | Maximum additional attempts per source operation, excluding the first attempt. Minimum: 0 · Maximum: 3 |
| requestTimeoutSeconds | integer | Not specified | Maximum duration of one HTTP request. Minimum: 5 · Maximum: 60 |
03 / Make it yours
Change these fields for your own research.
01 · mode
Research mode
Research each keyword independently or compare explicit groups on a native shared timeline scale.
Example: "independent"
02 · keywords
Keywords or Google topic IDs
Search terms or Google topic IDs. Required in independent mode.
Example: coffee
03 · geographies
Countries or subregions
Country/subregion codes, such as US, GB, IN or US-CA. Use an empty string for worldwide.
Example: US
04 · timeWindows
Date windows
Google preset or YYYY-MM-DD YYYY-MM-DD. Use fixed dates for repeatable research.
Example: today 3-m
05 · surfaces
Research surfaces
Timeline is required. Related queries are available for independent keyword research.
Example: timeline
06 · maxAnalyses
Maximum expanded analyses
Reject a larger expanded matrix before any source requests; maximum 1,000.
Example: 1
07 · reviewRelatedQueries
Annotate related queries for review
Add literal seed-token overlap, URL-looking text and exact promotional-phrase annotations. Never filters or ranks relevance. Disable without changing the research plan, including on resume.
Example: false
Run it in three steps
- Open the example on Apify and select Try for free to copy it into your Apify account.
- Replace the sample values above with your own target and keep the limit small.
- Start the run, then export the dataset as JSON, CSV or Excel.
04 / Output
What the results table shows.
- Analyst rows include relative-interest summaries, effective periods, status, quality notes, and report references.
- Independent requests have independent scales. Google Trends is relative interest, not absolute search volume or keyword difficulty. Quality state and extraction status answer different questions.
Columns in the “Analyst report” view
keyword
Keyword
geography
Country / region
time
Requested period
effectiveTime
Effective timeline period
analysisStatus
Extraction
qualityState
Timeline quality
latestCompleteInterest
Latest complete index
latestCompleteDate
Latest interval start (UTC)
recentChangePercent
Descriptive change (%)
changeLabel
Change period
coverageLabel
Returned interval coverage
regionMetricLabel
Regional metric
topRegionsText
Regional highlights
risingQueriesText
Rising leads for review
queryReviewEnabled
Lexical review enabled
risingReviewFlagsText
Literal query-review facts
qualityNotesText
Quality notes
metricNotesText
Metric notes
analysisId
Analysis / comparison identifier
keywords
Terms in this analysis
captureScope
Timeline scale scope
sourceUrl
Timeline source context
report
report
A view selects columns for the table. The full JSON export keeps every field, including nested arrays and objects.
05 / Cost
What this example costs to run.
At most about $0.01: up to 1 results at $0.01 each (Completed research analysis). Fewer results cost less. The live Pricing tab on Apify is authoritative.
Completed research analysis
$0.01 per event
Prices checked 2026-11-22. Set a run spending limit in Apify when you widen the input.
06 / API
Run the same input from your code.
This call starts a billable run of Google Trends API: Bulk Keyword Trends Export with this example's input and returns the dataset items when it finishes. Synchronous calls wait up to five minutes; for longer runs, POST to /runs instead and read the run's default dataset when it succeeds. Keep the token in an environment variable.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~google-trends-batch-research/run-sync-get-dataset-items?format=json' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"mode":"independent","keywords":["coffee"],"geographies":["US"],"timeWindows":["today 3-m"],"surfaces":["timeline"],"maxAnalyses":1,"maxRunSeconds":120,"concurrency":1,"reviewRelatedQueries":false,"proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]}}'Coverage & interpretation
Check the result before relying on it.
- Do not compare independently scaled request values as if they were one shared popularity ranking.
- Availability, low-volume data, rate limits, and selected surfaces can affect completeness. Keep effective source periods and quality notes.
Questions
About this example.
What does the "Track US search interest in coffee with Google Trends" example collect?
Chart relative Google Search interest for coffee in the United States over the last three months. Review the timeline scores and quality notes before comparing another period. It runs Google Trends API: Bulk Keyword Trends Export, published by whoareyouanas on Apify.
Which input does this example use?
Research mode (mode) set to "independent"; Keywords or Google topic IDs (keywords) set to coffee; Countries or subregions (geographies) set to US; Date windows (timeWindows) set to today 3-m; Research surfaces (surfaces) set to timeline; Maximum expanded analyses (maxAnalyses) set to 1. The full JSON input is shown on this page.
How much does it cost to run this example?
At most about $0.01: up to 1 results at $0.01 each (Completed research analysis). Fewer results cost less. The live Pricing tab on Apify is authoritative.
How do I change it for my own research?
Open the example on Apify and select Try for free to copy it into your account, then edit Research mode, Keywords or Google topic IDs, Countries or subregions, Date windows, Research surfaces, Maximum expanded analyses, Annotate related queries for review. Keep the result limit small for the first run and check the output before scaling up.
Can I run it from the API or on a schedule?
Yes. Send the same JSON input to the Google Trends API: Bulk Keyword Trends Export run endpoint with your Apify API token, or save the copied task in your Apify account and add a schedule. Results land in the run's default dataset as JSON, CSV or Excel.
More examples
Related tasks you can copy.
Compare tea and coffee search interest in the US
Compare tea and coffee on a shared Google Trends timeline for the United States. Use the same 12-month comparison group to compare relative scores.
View exampleCompare US regional search interest for heat pumps
Use the Google Trends regional breakdown to review relative search interest in heat pumps across the United States over the past year.
View exampleFind related YouTube searches for home workouts
Review top and rising related queries for home workouts using the YouTube Search property in Google Trends. Start with the United States and a recent three-month window.
View exampleGuides