pytrends 429 TooManyRequestsError: what it means and what to do

Checked on 2026-11-19.

pytrends raises TooManyRequestsError when Google Trends answers one of its requests with HTTP status 429: Google has decided that too many requests came from your address. Your code is not wrong, and upgrading will not help, because the library was archived in April 2025. What is left is to slow down, to wait, or to get the data another way.

What the error means

The full message is:

Terminal
pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429

In the library's source, TooManyRequestsError is a subclass of ResponseError, described as the "Exception raised when the backend returns a 429 error code". Status 429 is the web's standard answer for rate limiting: "the user has sent too many requests in a given amount of time" (RFC 6585).

pytrends is, in its README's words, an "Unofficial API for Google Trends" and "not an official or supported API". Its requests go to addresses under trends.google.com/trends/api, and Google limits how many of them it answers. How many is not known: "Rate Limit is not publicly known", the README says.

The issue tracker shows that it is not only heavy use that meets the limit. One user wrote "I can't get past the first request" (issue 558). Another, on version 4.9.2, got the error "for all requests" from one day to the next (issue 588).

Why no update will fix it

The repository carries this banner: "This repository was archived by the owner on Apr 17, 2025. It is now read-only." The latest release on PyPI is 4.9.2, from April 2023, and the README still says "Looking for maintainers!". The issues about 429 that were open when it was archived are still open, and a read-only repository cannot merge a fix.

So the question is not which version to install. It is whether your use fits inside a limit nobody outside Google knows.

What you can do with pytrends

1. Catch the error and wait

The README's caveats give one number: "60 seconds of sleep between requests (successful or not) appears to be the correct amount once you reach the limit."

Python
import time
from pytrends.request import TrendReq
from pytrends.exceptions import TooManyRequestsError

pytrends = TrendReq(hl="en-US", tz=360)

for attempt in range(3):
    try:
        pytrends.build_payload(["pickleball"], cat=0, timeframe="today 12-m", geo="US", gprop="")
        print(pytrends.interest_over_time())
        break
    except TooManyRequestsError:
        print("429 from Google Trends, waiting 60 seconds")
        time.sleep(60)

That sentence reports a test from the years the library was maintained; it is not a promise by Google. One open issue is titled "Error 429 for the past few days" (issue 614), so stop after a few tries instead of looping forever.

2. Make fewer requests

In the source, build_payload sends a request of its own to get tokens, and interest_over_time(), interest_by_region() and related_queries() each send at least one more. Call only the ones you need, save what you get, and do not fetch the same period twice.

3. Know what retries and backoff_factor do

The README documents two options of TrendReq, retries and backoff_factor. Two things to know before you rely on them:

  • With urllib3 version 2, setting either one fails with TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist'. urllib3 removed that option in 2.0.0, and the issue about it (591) is still open. The reporter's workaround is pip install "urllib3<2".
  • The README's example values, retries=2, backoff_factor=0.1, wait fractions of a second between tries. That is far from the 60 seconds above.

4. Proxies

The README shows a proxies option "if you want to use proxies as you are blocked due to Google rate limit". That is a way around Google's limit, not a way to stay inside it; you would have to buy and run the proxies, and this guide does not go into it.

Google's own routes

  • The Trends API (alpha). Google announced an official Google Trends API on July 24, 2025. It "will be available only to a very limited number of testers", and you apply with a form.
  • The Download button. Charts on trends.google.com can be exported as CSV files, by hand.
  • The BigQuery dataset. Google publishes the top 25 and the top 25 rising queries as a public dataset. You cannot ask it about a term of your choice.

The guide on getting Google Trends data in Python has the details and the code for each.

An HTTP API instead of the library

Pipefetch has a Trends endpoint: one GET request for one term, answered with interest over time, interest by region and the top and rising related queries.

Python
import os
import requests

res = requests.get(
    "https://pipefetch.com/v1/google/trends",
    params={"q": "pickleball", "geo": "US", "period": "12m"},
    headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
    timeout=90,
)
if res.status_code == 404:
    print("Too little search volume for this term")   # not charged
elif res.status_code == 502:
    print("Google Trends turned the request away")    # not charged, send it again
else:
    res.raise_for_status()
    data = res.json()["data"]
    print(data["summary"]["averageInterest"], data["summary"]["trendDirection"])
    for point in data["interestOverTime"]:
        print(point["date"], point["interest"])
    for region in data["interestByRegion"][:5]:
        print(region["regionName"], region["interest"])
    for query in data["relatedQueries"]["rising"][:5]:
        print(query["query"], query["formattedValue"])

It does not make Google's limit disappear. Google Trends limits how many searches one address may make, ours included. When it turns ours away, the request answers 502 upstream_error, costs nothing and can be sent again. A term with too little search volume answers 404 no_data, which is free as well.

What it leaves out compared with pytrends: related topics, comparisons of several terms in one request (pytrends takes up to five), and city or metro resolution. Regions are countries when geo is left out, and the states or regions of the country when it is given. It is not an official API, and Pipefetch is not affiliated with Google. A request costs 1 credit, and a new account has 100 free credits and needs no card. The reference lists every field.

Which one should you use?

SituationUse
A few terms now and then, on your own computerpytrends, with a 60-second wait and a cap on retries
One chart, onceThe Download button on trends.google.com
What is trending, not a term you choseThe BigQuery dataset
A product you will run for years on official dataApply for Google's Trends API alpha
A server or a scheduled job that needs one term's data todayAn HTTP API such as Pipefetch, or pytrends if its errors are rare enough for you

Try it with 100 free credits. No card needed. No scraper to build or maintain. Get an API key or read the docs.

Every source

YouTube

Instagram

Websites

TikTok

Facebook

Threads

LinkedIn

App stores

Steam

X

Pinterest

Airbnb

Real estate

Keywords

Job boards

Eventbrite

Shopify stores

Public tenders

All guides