Google Trends API: Real-Time & Historical Search Trends avatar

Google Trends API: Real-Time & Historical Search Trends

Pricing

from $0.30 / 1,000 result scrapeds

Go to Apify Store
Google Trends API: Real-Time & Historical Search Trends

Google Trends API: Real-Time & Historical Search Trends

Extract real-time Google search trends, historical keyword interest, regional demand, and related queries without rate limits. Fast, proxy-rotated, and pay per event.

Pricing

from $0.30 / 1,000 result scrapeds

Rating

5.0

(1)

Developer

UnitBytes | Enterprise Web Data

UnitBytes | Enterprise Web Data

Maintained by Community

Actor stats

1

Bookmarked

16

Total users

4

Monthly active users

2 hours ago

Last modified

Categories

Share

Google Trends API for Developers & AI Agents by UnitBytes

Try it for Free

⚡ Google Trends API — Real-Time & Historical Search Trends

The fastest, cleanest programmatic Google Trends REST API on Apify. Extract real-time search pulses, 20-year historical timelines, regional demand down to DMA Metros, and breakout queries (+5,000%) formatted as 100% unnested flat JSON records. Built specifically for LLM agents (Claude MCP, Cursor), automated data pipelines, and developer backends.


⚡ UnitBytes · Search Trends & Market Demand Intelligence Ecosystem
📊 Google Trends Fast API
📍 You are here
Flat JSON, low-latency REST API, MCP for AI Agents
📈 Google Trends All-in-One Scraper
Marketers & Spreadsheets
1-Click Excel/CSV rows, visual heatmaps, legacy JSON

✨ Key Features

1. ⚡ High-Speed Execution & Sub-Second Latency

Designed from the ground up for low-latency production pipelines and automated AI workflows:

  • Instant Cold Starts: Boots in milliseconds with zero heavy browser overhead.
  • Ultra-Lightweight Footprint: Highly optimized memory usage running reliably inside the 256MB tier without OOM crashes.
  • Fast Response Times: Delivers near-instant search trend results ideal for synchronous API calls.

2. 📊 100% Unnested Flat JSON Output (Zero Post-Processing Required)

Every data point is pushed as an individual, clean, flat JSON object.

  • Direct insertion into PostgreSQL, BigQuery, MongoDB, ClickHouse, or Snowflake.
  • 1-line ingestion in Python: df = pd.DataFrame(items).
  • Zero nested data: [] arrays or messy envelope parsing.

3. 🎯 All 5 Google Search Properties in One Endpoint (gprop)

Query Google's specialized search databases directly:

  • 🌐 Web Search (web): Broad macro consumer interest.
  • 🎥 YouTube Search (youtube): Video creator topics, game tags, and video SEO.
  • 🛍️ Google Shopping (froogle): High-intent physical product e-commerce trends.
  • 🖼️ Image Search (images): Visual asset demand, design aesthetics, and wallpapers.
  • 📰 News Search (news): Editorial media coverage and PR news cycles.

4. 🛡️ Built-in Rate Limit Resilience & Smart Proxy Rotation

Google Trends frequently rate-limits automated requests. This actor includes smart automatic session rotation and retry logic out of the box. If a rate limit or network slowdown occurs, the actor automatically switches sessions and transparently fulfills the request without crashing or dropping data.

5. 🤖 Native Model Context Protocol (MCP) Server for AI Agents

Connect directly to Cursor IDE, Claude Desktop, Claude Code, or autonomous agent frameworks using Apify's hosted MCP integration. Your AI agent can look up real-time search trends and historical keyword demand on the fly.

6. 💰 Zero Startup Penalty & 4-Tier Volume Pricing

Other scrapers charge a hidden $0.025 penalty every single time they start. With UnitBytes, the start fee is virtually zero ($0.00005) and results cost as low as $0.00030 per extracted data point, making high-frequency micro-queries and agent tools extremely affordable.


💼 High-Value Use Cases & Engineering Playbooks

🤖 1. Autonomous AI Agents & Real-Time RAG

  • The Problem: LLMs have fixed knowledge cutoff dates and cannot gauge whether a topic is currently surging in public interest.
  • The Solution: Wire this actor into your LangChain, LlamaIndex, or AutoGen toolchain via MCP or REST API. Before generating market reports, content plans, or investment memos, the agent retrieves real-time 30-day search volumes and breakout topics.

✍️ 2. Programmatic SEO & Trend-Jacked Content Generation

  • The Problem: Competing for saturated keywords takes months of backlink acquisition.
  • The Solution: Run a daily cron job calling related_queries for your industry seed terms. Automatically identify terms with the +5,000% Breakout flag and trigger automated drafting pipelines before competitors even spot the trend.

🛍️ 3. E-Commerce Product Research & Demand Forecasting

  • The Problem: Amazon and Shopify sellers often stock inventory after a trend has already peaked.
  • The Solution: Query gprop: "froogle" (Google Shopping) across candidate products. Identify items with hockey-stick demand curves 4–8 weeks ahead of holiday peaks and wholesale stockouts.

📈 4. Quantitative Trading & Consumer Sentiment Signals

  • The Problem: Quarterly earnings and SEC filings are lagging indicators.
  • The Solution: Track multi-year timelines using interest_over_time for publicly traded tickers, consumer brands, retail trends, and cryptocurrencies to feed alternative sentiment data into trading strategies.

🚨 5. Real-Time Viral Spikes & Breaking News Monitoring

  • The Problem: Manual trend tracking on social media is noisy and delayed.
  • The Solution: Poll trending_now with trending_hours: 24 every hour to detect emerging viral news, celebrity spikes, and sports events complete with search volumes, growth percentages, and context news articles.

🤖 30-Second AI Agent Setup (Model Context Protocol - MCP)

Give Claude Desktop, Cursor, Claude Code, or autonomous LLM agents instant live search trend intelligence via Apify's hosted MCP server.

1. Claude Desktop Configuration

Add this to your claude_desktop_config.json:

{
"mcpServers": {
"google-trends": {
"command": "npx",
"args": ["-y", "@apify/mcp-server@latest"],
"env": {
"APIFY_TOKEN": "YOUR_APIFY_API_TOKEN",
"ACTORS": "unitbytes/google-trends-api"
}
}
}
}

2. Sample AI Prompt

"Research the current breakout search queries for artificial intelligence tools in the US over the last 30 days using Google Trends, and tell me which 3 topics have grown over 500%."


🚀 1-Line Synchronous REST API Call (cURL)

Call the actor synchronously and get the parsed flat JSON dataset returned directly in the HTTP response:

curl -X POST "https://api.apify.com/v2/acts/unitbytes~google-trends-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scrape_type": "interest_over_time",
"keywords": ["OpenAI", "ChatGPT"],
"predefined_timeframe": "today 3-m",
"common_geo": "US"
}'

📤 Sample Output Data (Flat Tabular JSON)

Every result is streamed as an individual, unnested flat object ready for immediate programmatic consumption:

1. interest_over_time (Timeline Series)

[
{
"scrape_type": "interest_over_time",
"event_index": 1,
"error": false,
"keyword": "OpenAI",
"value": 84,
"date": "2026-09-14T00:00:00+00:00",
"isPartial": false
},
{
"scrape_type": "interest_over_time",
"event_index": 2,
"error": false,
"keyword": "ChatGPT",
"value": 96,
"date": "2026-09-14T00:00:00+00:00",
"isPartial": false
}
]

2. trending_now (Real-Time Viral Spikes)

[
{
"scrape_type": "trending_now",
"event_index": 1,
"error": false,
"keyword": "Champions League Draw",
"geo": "US",
"volume": 500000,
"volume_growth_pct": 850,
"topic_names": ["Soccer", "Sports"],
"started_timestamp": "2026-10-02T14:00:00+00:00",
"news": [
{
"title": "Champions League group stage draw results and reactions...",
"source": "Sky Sports",
"url": "https://..."
}
]
}
]

3. interest_by_region (Sub-National Demand)

[
{
"scrape_type": "interest_by_region",
"event_index": 1,
"error": false,
"keyword": "Coffee",
"geo": "US-NY-501",
"geoName": "New York NY",
"value": 100,
"max_value_index": 0
},
{
"scrape_type": "interest_by_region",
"event_index": 2,
"error": false,
"keyword": "Coffee",
"geo": "US-NY-555",
"geoName": "Syracuse NY",
"value": 78,
"max_value_index": 0
}
]

4. related_queries (Breakout Mining)

[
{
"scrape_type": "related_queries",
"event_index": 1,
"error": false,
"keyword": "deepseek v3 api",
"original_keyword": "AI tools",
"value": 5000,
"subset": "rising"
},
{
"scrape_type": "related_queries",
"event_index": 2,
"error": false,
"keyword": "chatgpt login",
"original_keyword": "AI tools",
"value": 100,
"subset": "top"
}
]

5. related_topics (Knowledge Graph Entities)

[
{
"scrape_type": "related_topics",
"event_index": 1,
"error": false,
"keyword": "Large language model",
"original_keyword": "ChatGPT",
"value": 5000,
"subset": "rising",
"topic_type": "Topic",
"topic_mid": "/m/012bh6f4"
}
]

⚙️ Input Parameters Reference

ParameterTypeDefaultDescription
scrape_typestring"interest_over_time"Target endpoint: interest_over_time, trending_now, interest_by_region, related_queries, related_topics
keywordsarray[string]["OpenAI", "ChatGPT"]Terms to analyze (up to 5 keywords). Required for all modes except trending_now
output_formatstring"flat"Data layout: "flat" (clean unnested JSON rows) or "legacy" (consolidated nested envelope)
gpropstring""Search property: "" or "web" (Web Search), "youtube" (YouTube), "froogle" (Shopping), "images" (Images), "news" (News)
timeframe_typestring"predefined"Timeframe mode: "predefined" or "custom"
predefined_timeframestring"today 12-m"Preset ranges: 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
custom_timeframestring""Custom date range: 'YYYY-MM-DD YYYY-MM-DD' (e.g. '2025-01-01 2026-01-01')
geo_selection_typestring"Common Countries"Geo selector: "Common Countries" or "Custom Geo Code"
common_geostring"US"2-letter ISO country code (US, GB, DE, FR, CA, etc.) or leave empty for Worldwide
custom_geo_codestring""Sub-national ISO code (e.g. US-CA, US-NY, GB-ENG)
geo_resolutionstring"COUNTRY"Regional granularity for interest_by_region: COUNTRY, REGION, CITY, or DMA
trending_hoursinteger24Hours back for trending_now (1 to 191 hours)
trending_languagestring"en"Language code for real-time trending titles
inc_low_volbooleanfalseInclude low search volume geographies in regional breakdown
max_eventsinteger10000Safety limit on maximum results returned
proxyConfigurationobject{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}Residential proxies automatically provisioned; custom proxies also supported

💻 SDK Integration Snippets

Python (pandas / Polars Ready)

from apify_client import ApifyClient
import pandas as pd
client = ApifyClient("YOUR_APIFY_TOKEN")
# Run Google Trends Fast API synchronously
run = client.actor("unitbytes/google-trends-api").call(run_input={
"scrape_type": "interest_over_time",
"keywords": ["Python", "Rust"],
"predefined_timeframe": "today 12-m",
"common_geo": "US"
})
# Load clean flat records directly into DataFrame
items = client.dataset(run["defaultDatasetId"]).list_items().items
df = pd.DataFrame(items)
print(df.head())

TypeScript / Node.js

import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "YOUR_APIFY_TOKEN" });
async function getTrends() {
const run = await client.actor("unitbytes/google-trends-api").call({
scrape_type: "related_queries",
keywords: ["Next.js"],
common_geo: "US",
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
}
getTrends();

💎 Pay-Per-Event Pricing (Zero Start Penalty)

Operates on Apify's Pay-Per-Event (PPE) model with volume discount tiers:

Apify Plan TierUnit Price per ResultCost per 25-Item QueryRun Start Fee
Free$0.00045~$0.011 (1.1¢)$0.00 ($0.00005)
Starter$0.00040~$0.010 (1.0¢)$0.00 ($0.00005)
Scale$0.00035~$0.008 (0.8¢)$0.00 ($0.00005)
Enterprise / Custom$0.00030~$0.007 (0.7¢)$0.00 ($0.00005)
  • Zero Startup Penalty: Test individual queries for fractions of a cent ($0.00005 vs. the $0.025 tax charged by competing scrapers).
  • Residential Proxies Included: High-performance rotating residential proxies with automatic rate-limit resilience included at no extra cost.
  • No Charge for Errors: You are billed exclusively for valid trend data points successfully extracted.

🤖 Ask an AI Assistant About This Scraper

Open a ready-to-run prompt about Google Trends API in your favorite AI assistant:


❓ Frequently Asked Questions (FAQ)

Q: How fast is this API compared to other Google Trends actors?
A: Most alternative scrapers take 15 to 30 seconds per execution due to heavy browser overhead. This API actor is built with an ultra-lightweight direct protocol architecture, delivering cold starts in milliseconds and returning complete query results in just a few seconds.

Q: What is the difference between this Fast API and the All-in-One Scraper?
A: Both share the exact same resilient engine. However:

  • Fast API (unitbytes/google-trends-api): Defaults to flat unnested JSON records designed for programmatic APIs, database pipelines, and AI agents.
  • All-in-One Scraper (unitbytes/google-trends-scraper): Defaults to legacy nested envelopes and optimized schema definitions for 1-click Excel/CSV spreadsheet exports for non-technical users and marketers.

Q: How do I call this actor synchronously in my application?
A: Use Apify’s synchronous endpoint: POST https://api.apify.com/v2/acts/unitbytes~google-trends-api/run-sync-get-dataset-items?token=YOUR_TOKEN. The HTTP request will hold open and return the parsed JSON array directly in the HTTP response body.

Q: Do I need to buy or configure residential proxies?
A: No. High-performance rotating residential proxies are automatically provisioned and managed by the actor at no extra cost.

Q: How does the engine handle Google rate limits?
A: The actor automatically detects rate limits and temporary blocks, immediately switches to a fresh proxy session, and safely retries the request so your application or pipeline never receives a broken response.

Q: Can I use this with Model Context Protocol (MCP) in Cursor or Claude Desktop?
A: Yes! Use @apify/mcp-server with ACTORS="unitbytes/google-trends-api". Your AI agent can invoke Google Trends live during coding or reasoning sessions.

Q: Is there a startup fee penalty?
A: No. Most actors charge a hidden $0.025 startup tax. UnitBytes charges virtually $0.00 ($0.00005) to start, allowing you to run frequent small queries cost-effectively.


📞 Support, Bug Reports & Feature Requests

Need help integrating Google Trends API, found a bug, or want a custom endpoint / AI integration?