{
  "id": 10653227,
  "title": "pytrends keeps failing with 429 Too Many Requests? Here's a drop-in fix",
  "url": "https://urgent.news/2026/09/29/pytrends-keeps-failing-with-429-too-many-requests-heres-a-drop-in-fix",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-29T09:01:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/egrarobo/pytrends-keeps-failing-with-429-too-many-requests-heres-a-drop-in-fix-515"
  },
  "original_language": "en",
  "account": "If you're using pytrends to access Google Trends data, you may have encountered the error \"429 Too Many Requests.\" Two recent changes have worsened the situation: pytrends was archived in April 2025, and Google's official Trends API is still in closed alpha. Google is rate-limiting Trends more strictly than ever, especially when accessed from cloud servers, Colab, or CI runners, which is where most scripts run.\n\nThe usual workarounds, such as adding \"time.sleep()\" between calls, setting \"retries\" or \"backoff_factor=\", or rotating your own proxies, only partially solve the problem. These methods require managing proxies, cookies, consent pages, and captchas, which can be more time-consuming than the analysis itself.\n\nA drop-in replacement library was created to maintain the pytrends interface while moving the complex parts (sessions, proxies, retries) to a managed scraper. This library uses Apify's free plan, costing about $4 per 1,000 keywords, only for the keywords where all data is successfully retrieved. The code change involves only one import: \"from gtrends_api import TrendReq\" instead of \"from pytrends.request import TrendReq\".\n\nAfter building the payload with your keywords, timeframe, and location, you can retrieve the data in the same DataFrame shape as pytrends. The API provides functionality for interest over time, regions, related queries, and trending searches. The underlying Google Trends Scraper solves the issue of comparing values from different batches by using an anchor term, putting a stable keyword in every batch and rescaling all batches onto the same 0–100 scale. This is helpful for ranking long keyword lists.\n\nIf you prefer not to use Python, the same scraper is available as a browser-based option, which can be scheduled and exported to Excel or Google Sheets, or integrated with tools like Make, Zapier, or n8n. The library is MIT-licensed, and the project welcomes issues and pull requests on GitHub.",
  "summary": "If you use pytrends for Google Trends data, you have probably seen this more and more often: pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429 Two things changed: pytrends was archived in April 2025. The repository is read-only, so nobody is fixing the blocking. Google's official Trends API is still in closed alpha (announced July 2025), and…",
  "key_points": [
    "pytrends archived in April 2025, causing 429 Too Many Requests error",
    "Google Trends rate-limiting stricter, especially from cloud servers",
    "Drop-in replacement library using Apify's free plan for keyword data"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}