Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many 429 error responses. Max retries exceeded. #578 #622

Open
MohammedN-hash opened this issue May 16, 2024 · 3 comments
Open

Too many 429 error responses. Max retries exceeded. #578 #622

MohammedN-hash opened this issue May 16, 2024 · 3 comments

Comments

@MohammedN-hash
Copy link

MohammedN-hash commented May 16, 2024

related keywords:An error occurred while fetching related queries: The request failed: Google returned a response with code 429

@john-m24
Copy link

Are you using proxies? I'm starting to think that this issue only occurs when you use proxies. I wonder if it has something to do with the way we're using cookies for each proxy

@MohammedN-hash
Copy link
Author

MohammedN-hash commented May 23, 2024

I am not using any proxies, this is the code I have:

pytrend = TrendReq()

def related_suggestions_queries(term,language):

    pytrend = TrendReq(hl=language)

    pytrend.build_payload(kw_list=[term])

    related_terms = pytrend.related_queries()

    return related_terms 

could it be a problem with the rate limit? because sometimes it works sometimes not? is there a way to avoid the rate limit if it is the issue here?

@marambelhouchet
Copy link

The error code 429 indicates that your requests to the Google Trends API have exceeded the rate limit. To resolve this issue, you can Introduce a delay between requests or Reduce the number of requests or use batch processing or simply use proxies (pytrends = TrendReq(hl='en-US', tz=360, proxies=['your working proxy']) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants