pytrends 429 error (TooManyRequestsError)? A working pytrends alternative for 2026

pytrends, the unofficial Python client for Google Trends, is archived (read-only) on GitHub, and Google often answers it with "TooManyRequestsError: The request failed: Google returned a response with code 429", especially from servers and notebooks. Google Trends Scraper on Apify returns the same data (interest over time, interest by region and city, top and rising related queries, and what's trending now) from a hosted service that rotates IPs and retries for you. You call it from Python in a few lines and pay $1 per 1,000 keyword reports. If your code already uses pytrends, the quickest fix is pytrends-cloud, a free open-source drop-in replacement: change one import (from pytrends_cloud.request import TrendReq) and the same calls return the same DataFrames.

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 with this Actor, and needs no credit card.
  2. Install pytrends-cloud, or the Apify client. Run pip install git+https://github.com/retracn/pytrends-cloud, set APIFY_TOKEN to the token from Apify Console → Settings → API & Integrations, and change your import to from pytrends_cloud.request import TrendReq. Prefer raw JSON? pip install apify-client instead.
  3. Keep your pytrends calls. build_payload(), interest_over_time(), interest_by_region(), related_queries() and trending_searches() work as before. One query runs once and is cached, so all of them together cost one keyword report per term.
  4. Compare terms on one scale. Set compareAll to true to put all terms on the same 0–100 scale, like a comparison on trends.google.com (the same as passing several keywords to build_payload).
  5. Get what's trending now. Add trendingGeos, for example ["US", "GB"], to get today's trending searches with search volume, growth, related queries and news, like trends.google.com/trending.
  6. Schedule it. Add a daily or weekly schedule in Apify and connect a webhook, Google Sheets, Zapier, Make or n8n, so the data arrives without a cron job of your own.

Try it now in a free notebook: open the Colab notebook (runs in your browser; add your Apify token as a Colab secret).

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 pytrends and add long sleeps plus rotating proxies of your own (it has no built-in IP rotation); pay for SerpApi's Google Trends API (monthly subscription, free tier 250 searches a month, checked October 2026); or use another Google Trends Actor on Apify. See the side-by-side comparison of Google Trends scrapers. See the side-by-side comparison.

FAQ

Do I have to rewrite my pytrends code?

No. pytrends-cloud (github.com/retracn/pytrends-cloud, MIT) mirrors pytrends' TrendReq: change the import, set APIFY_TOKEN and keep the rest. It returns the same pandas DataFrames.

Why does pytrends return 429 Too Many Requests?

Google rate-limits the unofficial endpoints pytrends calls, per IP address. Cloud and shared IPs hit the limit fastest, and pytrends has no built-in IP rotation, so sleeping between calls only helps for a handful of keywords.

Is pytrends still maintained?

No. The GeneralMills/pytrends repository on GitHub is archived (read-only), so fixes for Google's changes won't be released. The last release on PyPI is 4.9.2.

Can I keep my pandas code?

Yes. Each keyword report has a timeline list of points with date and value, so pandas.DataFrame(report['timeline']) gives you the same date and interest columns as interest_over_time().

What does it cost?

$1 per 1,000 keyword reports ($0.27–$0.90 on paid Apify plans) and $0.50 per 1,000 trending searches. Apify's free $5 monthly credit covers about 5,000 keyword reports.

Can an AI assistant use it?

Yes. Add the MCP server URL below to Claude, ChatGPT or Cursor and ask, for example, "compare search interest in chatgpt and claude in the US over the last 90 days".

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