Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Google Trends Real-Time & Historical API by UnitBytes

Try it for Free
⚑ 1-Click Free Trial: Test live queries using Apify's free monthly credit β€’ No credit card required

πŸ”₯ Google Trends Scraper & API β€” 5 Endpoints, 99.9% Success Rate, Pay-Per-Result

The most reliable, comprehensive, and cost-effective Google Trends extractor on Apify. Extract realtime trending searches, 2004–present historical timelines, geographic heatmaps, and breakout queries with built-in residential proxy rotation. No monthly subscription required β€” pay only for what you extract!


⚑ UnitBytes · Search Trends & Market Demand Intelligence Ecosystem
πŸ“Š Google Trends Fast API
Real-Time & PPE
Flat tabular rows, 5 endpoints
πŸ“ˆ Google Trends Historical
πŸ“ You are here
2004–Present trendlines & compare

⚑ Pre-Configured 1-Click Tasks & Common Use Cases

Skip manual parameter setup. Launch these ready-to-use task presets directly in 1 click:

SEO Keyword / Research Preset Description & Target Query 1-Click Run Link
Compare Brand & Competitor Interest Over Time Track and compare multi-keyword historical search interest over 12 months to analyze market share, brand awareness, and seasonal peaks. ⚑ Launch Task
Discover Rising & Breakout SEO Keywords with Google Trends Extract breakout queries, surging search terms, and top related keywords for any seed topic to optimize content and SEO strategies. ⚑ Launch Task
Analyze Geographic Search Demand by State & Region Map search interest across US states, DMAs, or international regions to optimize geo-targeted Google Ads and local product launches. ⚑ Launch Task
Monitor Real-Time Viral Search Trends & Breaking Topics Fetch hourly breakout queries, viral news events, and real-time trending Google searches to power news feeds, alerts, and content ideas. ⚑ Launch Task
Extract Semantic SEO Related Topics & Knowledge Entities Discover related topical entities and concepts recognized by Google's Knowledge Graph to build topical authority and content clusters. ⚑ Launch Task
Track YouTube Search Interest & Video Keyword Trends Analyze video search behavior on YouTube specifically to discover video topics, tutorial demand, and creator content niches. ⚑ Launch Task

πŸ† Why This Scraper Beats Competitors

Most Google Trends scrapers on the market break frequently due to rate-limiting and anti-scraping protections (429 Too Many Requests). This scraper is built with automated anti-blocking architecture and residential proxy rotation to ensure fast, continuous data delivery.

Here is how this scraper compares directly to alternatives:

Feature / Capability Other Scrapers This Scraper
Available Endpoints Usually only 1 or 2 modes πŸ† All 5 Endpoints in 1 Actor (Realtime, Timeline, Geo, Queries, Topics)
Anti-Blocking & Rate-Limit Handling Basic retries on same IP (high failure rate) πŸ›‘οΈ Automated Anti-Blocking & Dynamic Residential Proxy Rotation
Pricing Model Expensive monthly rentals or unpredictable compute fees πŸ’° Pay-Per-Event (PPE) β€” pay only for delivered results, never for failures
Proxy Costs Requires buying or configuring external proxies ⚑ Automated Apify Residential Proxies Included at no extra charge
Multi-Keyword Support Drops secondary keywords on related searches πŸ”„ Automatic Multi-Keyword Looping across all endpoints up to your limit
Enriched Context Raw keyword strings only πŸ“° News articles, volume growth %, breakout tags (+5000%), & entity categories
AI Agent Readiness Manual integration πŸ€– Native compatibility with Apify MCP, N8N, Make, and LangChain

πŸ“‘ 5 Core Intelligence Endpoints

Select your desired mode using the scrape_type dropdown:

1. πŸš€ trending_now β€” Real-Time Search Pulses

Discover what the world is searching for right now. Monitor viral breakout spikes hourly with search volume estimates, growth percentages, category tags, and context-rich news articles.

  • Best for: News aggregators, social media managers, viral product hunters.
{
  "scrape_type": "trending_now",
  "error": false,
  "error_message": null,
  "data": [
    {
      "keyword": "Champions League Draw",
      "volume": 500000,
      "volume_growth_pct": 850,
      "topic_names": ["Soccer", "Sports"],
      "started_timestamp": "2026-09-12T14:00:00+00:00",
      "news": [
        {
          "title": "Champions League group stage draw results and reactions...",
          "source": "Sky Sports",
          "url": "https://..."
        }
      ]
    }
  ]
}

2. πŸ“ˆ interest_over_time β€” Historical Timelines (2004 – Today)

Analyze relative search interest (0–100 index) over any timeframe. Compare up to 5 keywords side-by-side to track macro market trends, seasonality, and brand trajectory.

  • Best for: E-commerce forecasting, algorithmic market research, brand sentiment analysis.
{
  "scrape_type": "interest_over_time",
  "error": false,
  "error_message": null,
  "data": [
    {
      "date": "2026-09-01T00:00:00+00:00",
      "OpenAI": 85,
      "Anthropic": 42,
      "isPartial": false
    }
  ]
}

3. πŸ—ΊοΈ interest_by_region β€” Geographic Demand Heatmaps

Pinpoint exactly where consumer demand is centralized. Filter by Country, Region (State/Province), Metro DMA, or City.

  • Best for: Local SEO optimization, targeted PPC ad spend, geographical product rollouts.
{
  "scrape_type": "interest_by_region",
  "error": false,
  "error_message": null,
  "data": [
    {
      "geoName": "California",
      "geo": "US",
      "OpenAI": 92,
      "Anthropic": 84
    },
    {
      "geoName": "New York",
      "geo": "US",
      "OpenAI": 88,
      "Anthropic": 76
    }
  ]
}

4. πŸ” related_queries β€” Long-Tail & Breakout Keyword Mining

Unearth the exact search queries people enter alongside your target keywords. Automatically separates established "Top" queries from explosive "Rising" breakout queries (up to +5000% growth).

  • Best for: SEO keyword discovery, competitor gap analysis, blog post roadmap planning.
{
  "scrape_type": "related_queries",
  "error": false,
  "error_message": null,
  "data": [
    {
      "top": [
        { "query": "chatgpt login", "value": 100, "formattedValue": "100" },
        { "query": "chatgpt 5 release", "value": 85, "formattedValue": "85" }
      ]
    },
    {
      "rising": [
        { "query": "chatgpt voice mode free", "value": 4500, "formattedValue": "+4,500%" }
      ]
    }
  ]
}

5. 🏷️ related_topics β€” Knowledge Graph Entity Intelligence

Extract Google's contextual entity groupings. Understand how Google's AI categorizes concepts, companies, and industries associated with your niche.

  • Best for: Semantic SEO, topical authority building, programmatic entity optimization.
{
  "scrape_type": "related_topics",
  "error": false,
  "error_message": null,
  "data": [
    {
      "top": [
        {
          "topic_title": "Artificial intelligence",
          "value": 100,
          "mid": "/m/0mkz",
          "type": "Field of study"
        }
      ]
    }
  ]
}

⏱️ Timeframe vs. Data Granularity Guide

Google Trends automatically adjusts the time intervals of data points depending on the length of your chosen timeframe. Use this cheat sheet to select the right window:

Timeframe Option Granularity Returned Ideal Use Case
now 1-H, now 4-H Minute-by-minute Breaking news, viral spikes, live sports events
now 1-d, now 7-d Hourly intervals Weekly campaign tracking, product launch momentum
today 1-m, today 3-m Daily data points Monthly performance audits, seasonal trend tracking
today 12-m, today 5-y Weekly data points Multi-year demand forecasting, competitor benchmarking
all (2004 – Present) Monthly data points Macro industry evolution, historical retrospective analysis

πŸ’Ž Transparent Pay-Per-Event Pricing

Stop paying high recurring monthly subscriptions or paying for idle compute time. This actor operates on Apify's Pay-Per-Event (PPE) model:

Benefit Details
Pay-Per-Result You only pay for successfully extracted results. Check the Pricing tab above for the current live rate.
Residential Proxies Included Built-in smart residential proxy rotation is included at no additional charge.
No Compute Time Fees You never pay for startup time, queueing, or scrape runtime delays.
Zero-Risk Guarantee Failed requests or empty queries are never charged.

🎯 Use Cases

πŸ“¦ E-Commerce & Dropshipping

Identify breakout products before they saturate the market. Run trending_now daily across multiple countries and cross-reference with interest_over_time to separate viral fads from sustained commercial demand. Catch consumer product waves on TikTok and Instagram weeks before they peak on Amazon.

✍️ SEO & Content Marketing

Use related_queries to discover explosive long-tail queries with rising search volume (+5000% breakout) that competitors haven't targeted yet. Use interest_over_time to time content publishing to peak seasonal demand.

πŸ’Έ Quantitative Finance & Trading

Correlate interest_over_time spikes for ticker symbols, crypto, commodities, or brand names with market volatility. Search volume trends often predict retail trading volume and momentum shifts.

πŸ“Š Market Research & Brand Intelligence

Track brand awareness over time against rivals using interest_over_time with up to 5 keywords simultaneously. Use interest_by_region to find underserved geographic markets and plan localized expansion campaigns.


πŸ€– AI & Workflow Automations

Easily feed live search trends into your automated workflows and AI agents:

  • πŸ”„ N8N & Make (Integromat): Trigger automated content creation or Slack alerts whenever a keyword spikes.
  • πŸ€– Model Context Protocol (MCP): Connect this scraper directly to Cursor, Claude Desktop, or custom AI Agents via the Apify MCP server to give your LLM live Google Trends research capabilities.
  • 🐍 LangChain & LlamaIndex: Use Apify's official document loaders to build retrieval-augmented market intelligence bots.

πŸ’» Quick Start Code Examples

Integrate effortlessly into any language or workflow using the official Apify Client:

Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

# Run Google Trends Scraper
run = client.actor("unitbytes/google-trends-scraper\").call(run_input={
    "scrape_type": "interest_over_time",
    "keywords": ["OpenAI", "Anthropic", "DeepSeek"],
    "timeframe_type": "predefined",
    "predefined_timeframe": "today 12-m",
    "geo_selection_type": "Common Countries",
    "common_geo": "US",
    "max_events": 100
})

# Fetch and inspect the dataset
dataset = client.dataset(run["defaultDatasetId"]).list_items().items
for result in dataset:
    print(f"Scrape Type: {result.get('scrape_type')}")
    print(result.get("data")[:2])

Node.js / JavaScript

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor("unitbytes/google-trends-scraper\").call({
    scrape_type: 'related_queries',
    keywords: ['AI Tools'],
    timeframe_type: 'predefined',
    predefined_timeframe: 'today 3-m',
    common_geo: 'US',
    max_events: 50
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].data);

βš™οΈ Input Configuration

Parameter Type Description
scrape_type string Endpoint to query: trending_now, interest_over_time, interest_by_region, related_queries, related_topics
keywords array Target search terms (up to 5 keywords). Required for all modes except trending_now
predefined_timeframe string Quick timeframes: 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
common_geo string Country filter (e.g., US, GB, DE, FR, CA, AU) or leave blank for worldwide
geo_resolution string Regional granularity for interest_by_region: COUNTRY, REGION, CITY, or DMA
gprop string Google property filter: "" (Web Search), images, news, froogle (Shopping), youtube
max_events integer Cap on results returned. Controls your total spend

πŸ’‘ Pro Tips for Best Results

  1. Leave Proxies on Default: The scraper automatically assigns Apify Residential Proxies and cycles session IPs. You do not need to configure custom proxies.
  2. Worldwide vs. Country-Specific: For worldwide data, leave common_geo blank. Regional breakdown (interest_by_region) is most detailed when a specific country (e.g. US, GB, DE) is chosen.
  3. Multi-Keyword Comparison: When using interest_over_time or interest_by_region, providing 2 to 5 keywords gives you directly normalized comparison scores on the same 0–100 scale.
  4. Discovering Hidden Breakouts: Check the rising section of related_queriesβ€”queries marked with high percentages or "Breakout" represent emerging search trends with low SEO competition.
  5. Need Flat Rows for Instant CSV/Excel Exports?: If you want individual flat records without nested JSON arrays for immediate export to Google Sheets, Excel, or Airtable, check out our companion actor: Google Trends Fast Scraper (Flat Tabular Output).


πŸ”Œ MCP Server Setup: Claude Code, Cursor & AI Agents

Connect this scraper directly to Claude Code, Claude Desktop, Cursor, or any MCP-compatible AI agent via the hosted Apify MCP server:

{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=actors,docs,unitbytes/google-trends-scraper"
    }
  }
}

No manual API token required in configuration if your client supports Apify OAuth sign-in. Alternatively, pass your Apify API Token in the authorization header.


πŸ€– Ask an AI Assistant About This Scraper

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


❓ Frequently Asked Questions

Q: Do I need to buy or configure my own proxies?
A: No. High-speed residential proxies are integrated directly into the scraping engine at zero extra charge.

Q: What happens if Google returns a 429 rate-limit error?
A: The scraper handles rate limits automatically. It detects blocks, automatically switches proxy sessions, and seamlessly resumes extraction so your scraping jobs finish reliably without manual intervention.

Q: Is scraping Google Trends legal?
A: Yes. This actor extracts publicly available search statistics published by Google Trends. It does not access private account information.

Q: Can I export data to Excel or CSV?
A: Yes. In the Apify Console, click "Export" on your dataset to download cleanly formatted Excel, CSV, JSON, or XML files.

Q: How does billing work?
A: You are billed strictly per successful result extracted via Apify's Pay-Per-Event model (see the Pricing tab for current rates). You are never charged for actor runtime, proxy bandwidth, or failed requests.


Keywords: Google Trends API, Google Trends scraper, Google Trends real-time, interest over time scraper, related queries extractor, Google Trends keyword research, SEO trend analysis, trending searches API, regional interest data, Apify Google Trends.


πŸ’¬ Enterprise Support & Custom Pipelines

Need custom web data feeds, high-frequency scheduled runs, private cluster deployments, or dedicated SLAs?

About

Production Google Trends scraper on Apify. Extract historical interest curves, regional breakdown, related queries, and breakout topics at scale with Pay-Per-Event pricing and zero server compute overhead.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors