google-trends-api (npm) dailyTrends 404 or 429 errors? A drop-in that works in 2026

The google-trends-api npm package hasn't had a release since June 2022. Its dailyTrends and realTimeTrends calls now get Google's 404 page, because those endpoints are gone, and servers get 429 Too Many Requests from Google. google-trends-api-cloud is a drop-in replacement with the same methods, options, callbacks and JSON-string results. interestOverTime, interestByRegion and relatedQueries run on Google Trends Scraper on Apify, which rotates IPs and retries, and dailyTrends and realTimeTrends are rebuilt in their old format from Google's current trending searches. It costs $1 per 1,000 keyword reports.

Open Google Trends Scraper on Apify $1 per 1,000 keyword reports ($0.27–$0.90 on paid plans) · $0.50 per 1,000 trending searches

Step by step

  1. Create a free Apify account. Sign up at apify.com. The free plan includes $5 of monthly credit, about 5,000 keyword reports, and needs no credit card. Copy your API token from Settings → Integrations.
  2. Install the drop-in. Run npm install github:retracn/google-trends-api-cloud. It depends only on google-trends-api, whose autoComplete and relatedTopics it re-exports unchanged.
  3. Change one require line. Replace require('google-trends-api') with require('google-trends-api-cloud') and set APIFY_TOKEN. Calls take the same options (keyword, startTime, endTime, geo, hl, timezone, category, property, resolution) and resolve to the same JSON strings.
  4. Get daily and real-time trends again. dailyTrends({ geo: 'US' }) returns trendingSearchesDays with query, formattedTraffic, related queries and articles, and realTimeTrends({ geo: 'GB' }) returns storySummaries.trendingStories. Both return the top 25 by default; pass maxItems for more.
  5. Save requests. interestOverTime, interestByRegion and relatedQueries with the same options share one request; the others come from a 5-minute cache.
  6. Or call the Actor directly. Outside Node, POST {"searchTerms": ["coffee"], "geo": "US"} to the google-trends-scraper run-sync-get-dataset-items endpoint for one JSON report per keyword.

Do it from code

Python

# pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automationnation/google-trends-scraper").call(run_input={
  "searchTerms": [
    "chatgpt",
    "gemini",
    "claude ai"
  ],
  "geo": "US",
  "timeRange": "today 12-m"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("searchTerm"), item.get("trendDirection"), item.get("changePercent"), item.get("summary"))

REST API (cURL)

curl -X POST "https://api.apify.com/v2/acts/automationnation~google-trends-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["chatgpt", "gemini", "claude ai"], "geo": "US", "timeRange": "today 12-m"}'

From an AI assistant (MCP)

Add this MCP server URL to Claude, ChatGPT or Cursor and ask in plain English:

https://mcp.apify.com?tools=automationnation/google-trends-scraper

Alternatives

Other options: keep google-trends-api and add retries with long back-off plus your own proxies, which won't bring back dailyTrends; apply for Google's official Trends API alpha (invite-only); or use pytrends-cloud from Python. See the side-by-side comparison of Google Trends scrapers. See the side-by-side comparison.

FAQ

Why does dailyTrends return a 404?

Google retired the daily trends endpoint that google-trends-api calls, and replaced the page with Trending Now. The package's last release predates that, so it gets Google's 404 page instead of JSON.

Is the output really the same?

Yes for interestOverTime, interestByRegion and relatedQueries: same JSON structure, and in a side-by-side test interestOverTime returned identical values. dailyTrends and realTimeTrends keep the old structure, filled from Google's current trending data.

Do callbacks still work?

Yes. Both promise style and (options, callback) style work, as in google-trends-api.

Can I compare different countries in one call?

Not yet: a geo array with different countries is rejected, so request each country separately.

What does it cost?

$1 per 1,000 keyword reports and $0.50 per 1,000 trending searches on your Apify account.

Written by AutomationNation, the developer of Google Trends Scraper. Prices checked October 2026.