AidanWelch / google-translate-api

An updated free and unlimited API for Google Translate :dollar: :no_entry_sign:
MIT License
143 stars 20 forks source link

AxiosError: Request failed with status code 429 #12

Closed sirEgghead closed 2 years ago

sirEgghead commented 2 years ago

We were doing fine until this morning. It seems that we have now reached a rate limit on the API key.

image

sirEgghead commented 2 years ago

Also, thank you for this fork!

AidanWelch commented 2 years ago

We were doing fine until this morning. It seems that we have now reached a rate limit on the API key.

You're actually not using an API key, instead this package simply is using the public Google Translate endpoints, so what probably happened is Google rate limited just because of the number of requests from your IP, you may benefit from using a proxy.

v10.4.0 supports batch translations in a single request, so you should be to batch what you need translated together and keep requests down. Also, it is probably not only an issue of number of requests but spacing between them, if you are doing a lot of requests you may want to add a delay between them instead of sending them all at once.

sirEgghead commented 2 years ago

I assumed the package was using an API key since it's Google Translate.

My app personally isn't hitting the Google rate limit, as there are less than 20 requests per day.

AidanWelch commented 2 years ago

Moving to [#16]