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

[HTTP Error] Is there a maximum amout of translations? #29

Closed
Marki396 opened this issue Jul 27, 2021 · 8 comments
Closed

[HTTP Error] Is there a maximum amout of translations? #29

Marki396 opened this issue Jul 27, 2021 · 8 comments
Labels
question This is a support question

Comments

@Marki396
Copy link

Marki396 commented Jul 27, 2021

After some translations in a for loop i get an error [HTTP Error].
Is there a maximum amount of translations available for a specific amount of time?

const translate = require('@iamtraction/google-translate');

for (const keywordToTranslate of keyWordsList) { await translate(keywordToTranslate, { from: 'de', to: 'en' }).then(res => { keyWordsListEN.push(res.text); }).catch(err => { console.error(err); }); }

@yadavamarjeet
Copy link

according to https://support.google.com/translate/thread/3870393?hl=en "The translate.googleapis.com site use is very limited. It only allows about 100 requests per one hour period and there after returns a 429 error (Too many requests). On the other hand, the Google Translate Api has a default billable limit of 5 requests/second/user and 200,000 requests/day."

The Google Translate API has a specific Google Group where many more people discuss that product since we don't get too many questions about the API so you may find https://groups.google.com/forum/#!forum/google-translate-api very interesting to read.

Google Translate API does come with their own support located at https://cloud.google.com/support-hub/ as well since Google Cloud Platform can cost money (the API is something that can incur costs).

@iamtraction iamtraction pinned this issue Oct 9, 2021
@iamtraction iamtraction added the question This is a support question label Oct 14, 2022
@taishi55
Copy link

taishi55 commented Feb 8, 2023

Can you avoid to hit the limit by changing ip address?

@iamtraction
Copy link
Owner

yes, you can.

@taishi55
Copy link

taishi55 commented Feb 8, 2023

May I ask how to do it??

I already hit the limt and getting the following error.

SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at node_modules/undici/lib/api/readable.js:237:20)

@iamtraction
Copy link
Owner

you've to use a proxy/vpn. or wait for the rate limit to expire.

@taishi55
Copy link

taishi55 commented Feb 8, 2023

Yes I'm trying to integrate http-proxy-agent. I wonder if your module is cabpable for it

@iamtraction
Copy link
Owner

try it out and let me know. i have not tested it.

@taishi55
Copy link

taishi55 commented Feb 9, 2023

I'm not so familiar with proxy...

I found this google translate library. So far I looped so many time, but I don't get any limiations. You want to check this out!!

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

No branches or pull requests

4 participants