How to use Google Trends Scraper
Step by step: in the Apify Store, over the API, from JavaScript or Python, in n8n, and from AI agents through MCP or LangChain.
$2.70 per 1,000 result rows on the Free plan, down to $0.27 on higher plans (live Apify price on 2026-10-31).
1. In the Apify Store (no code)
- Open arcadium/google-trends and sign in to Apify (a free account works).
- Fill in the input form. The fields below are the ones the example uses.
- Set a maximum cost per run in the run options if you want a hard cap.
- Start the run. Rows appear in the Output tab as they arrive.
- Export the dataset as JSON, CSV or Excel, or connect an integration.
| Input field | Type | Description |
|---|---|---|
searchTerms | array | Keywords to look up, one result row per keyword. Example: ["electric car", "solar panels"]. Leave empty if you use Trends links, a Google Sheet or Trending now. |
maxRetries | integer | How often a request is retried, each time on a fresh connection, after Google answers too many requests. Higher is slower but fails less. |
proxyCountry | string | Two-letter country of the connection used to ask Google, for example US or DE (default US). 'viewedFrom' is accepted too. The numbers do not depend on it. |
Example input:
{
"searchTerms": [
"webscraping"
],
"maxRetries": 6,
"proxyCountry": "US"
}
2. Over the Apify API
The synchronous endpoint runs the actor and returns its rows in one call (for runs up to about five minutes; use the asynchronous run endpoint for longer ones).
curl -X POST "https://api.apify.com/v2/acts/arcadium~google-trends/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["webscraping"],"maxRetries":6,"proxyCountry":"US"}'
3. From JavaScript
// npm install apify-client
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('arcadium/google-trends').call({
"searchTerms": [
"webscraping"
],
"maxRetries": 6,
"proxyCountry": "US"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
4. From Python
# pip install apify-client
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("arcadium/google-trends").call(run_input={
"searchTerms": ["webscraping"],
"maxRetries": 6,
"proxyCountry": "US",
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
5. In n8n
Paste this node into a workflow (it is a plain HTTP Request node). Create a Header Auth credential with name Authorization and value Bearer <APIFY_TOKEN>; each returned row becomes one item for the next node.
{
"nodes": [
{
"name": "Run arcadium/google-trends",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
0,
0
],
"parameters": {
"method": "POST",
"url": "https://api.apify.com/v2/acts/arcadium~google-trends/run-sync-get-dataset-items",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"searchTerms\":[\"webscraping\"],\"maxRetries\":6,\"proxyCountry\":\"US\"}",
"options": {
"timeout": 300000
}
}
}
],
"connections": {}
}
6. From an AI assistant (MCP)
Add Apify’s MCP server to Claude Desktop, Cursor, VS Code or any MCP client, limited to this actor:
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?tools=arcadium/google-trends",
"headers": {
"Authorization": "Bearer <APIFY_TOKEN>"
}
}
}
}
More on the MCP page.
7. From LangChain
# pip install langchain-apify (reads APIFY_API_TOKEN from the environment)
from langchain_apify import ApifyActorsTool
tool = ApifyActorsTool("arcadium/google-trends")
rows = tool.invoke({"run_input": {
"searchTerms": ["webscraping"],
"maxRetries": 6,
"proxyCountry": "US",
}})
# or give `tool` to an agent: create_react_agent(llm, [tool])
Sample output
One row, from the example in the actor’s README. Long text is shortened and lists are cut to two items.
{
"rowType": "trend",
"searchTerm": "coffee",
"geo": "US",
"timeRange": "today 12-m",
"averageInterest": 77.7,
"interestOverTime_timelineData": [
{
"time": "1760832000",
"formattedTime": "Oct 19 – 25, 2025",
"value": [
63
],
"hasData": [
true
],
"formattedValue": [
"63"
]
}
],
"interestBySubregion": [
{
"geoCode": "US-WY",
"geoName": "Wyoming",
"value": [
100
]
}
],
"relatedQueries_top": [
{
"query": "coffee near me",
"value": 100,
"formattedValue": "100"
}
],
"relatedQueries_rising": [
{
"query": "best coffee near me",
"value": 160,
"formattedValue": "+160%"
}
],
"scale": {
"method": "single",
"keywords": [
"coffee"
]
}
}
| Field | What it holds |
|---|---|
rowType | Kind of row. Filter on this first. 'trend': one keyword (charged). 'trending': one Trending now search (charged). 'error': an input could not be read; see code and message (free). |
searchTerm | The keyword this row is about. |
inputUrlOrTerm | What you typed: the keyword or the Trends link it came from. |
geo | Location measured: country or region code, empty for worldwide. |
timeRange | Period as Google writes it, for example today 12-m. |
category | Google Trends category id, 0 for all categories. |
property | Search type measured: empty for web search, or images, news, youtube, froogle. |
averageInterest | Mean of the timeline values on the 0-100 scale. |
interestOverTime_timelineData | Timeline points with time (Unix seconds), formattedTime, value (0-100), hasData and isPartial. |
interestBy | Interest by country for a worldwide search. |
interestBySubregion | Interest by subregion for a country search. |
interestByCity | Interest by city for a country search. |
interestByMetro | Interest by metro area for a region search. |
relatedQueries_top | Top related search queries. |
relatedQueries_rising | Rising related queries; formattedValue is such as +250% or Breakout. |
relatedTopics_top | Top related topics with Google's topic id and type. |
relatedTopics_rising | Rising related topics with Google's topic id and type. |
scale | How values are scaled: method (single, compare, anchor), keywords, anchor and factorErrorPct. |
change | Monitoring mode only: status (baseline or changed), new rising queries and interestDelta since the last run. |
scrapedAt | ISO timestamp of when the row was read. |
keyword | Trending now rows: the trending search. |
searchVolume | Trending now rows: lower bound of Google's search volume bracket. |
increasePercent | Trending now rows: percent increase in searches. |
startedAt | Trending now rows: when the search started trending. |
active | Trending now rows: true while the search is still trending. |
relatedKeywords | Trending now rows: related searches. |
windowHours | Trending now rows: hours the list looks back (4, 24, 48 or 168). |
code | Error rows: machine-readable error code. |
message | Error rows: short explanation of what could not be read. |
Schedule it
In Apify Console, create a Task from your input and add a Schedule (for example daily). Each run writes a new dataset; integrations can push the rows to Google Sheets, Slack, a webhook or your database.