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.
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
- 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.
- Install the Apify client. Run pip install apify-client and copy your API token from Apify Console → Settings → API & Integrations.
- Replace your pytrends calls. Instead of TrendReq().build_payload(...) followed by interest_over_time(), start the Actor with searchTerms, geo and timeRange. Each term comes back as one keyword report with the timeline, regions and related queries already parsed.
- 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).
- 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.
- 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.
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
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.