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

Character limit or request limit while using Google Translate using deep-translator #263

Open
karimkhanc opened this issue Jun 21, 2024 · 4 comments

Comments

@karimkhanc
Copy link

Code

translated = GoogleTranslator(source='auto', target='german').translate(text=text)

# Alternatively, you can pass languages by their abbreviation:
translated = GoogleTranslator(source='en', target='de').translate(text=text)

I tried few examples with Google Translator, which works fine. But if I use this package in production,

  1. Is there any character limit while sending the request. I see 1800-2000 character limit ( https://stackoverflow.com/questions/18754905/google-translate-api-cannot-send-more-than-2000-characters-per-request ) but is there any specific limit from deep-translator documented
  2. IS there any limit in numbers of request to be sent in particular time frame or day

Any help on this is much appreciated.

@ssb22
Copy link

ssb22 commented Jun 26, 2024

Google has a page about their quotas here: https://cloud.google.com/translate/quotas

@SalehDehqanpour
Copy link

Google has a page about their quotas here: https://cloud.google.com/translate/quotas

Those APIs (unlike deep-translator) require API key from google. Are you sure the same limits apply here?

@ssb22
Copy link

ssb22 commented Jul 1, 2024

@SalehDehqanpour good point: deep-translator is using the endpoint https://translate.google.com/m (source: deep_translator/constants.py) and I wasn't able to find any confirmation on Google's site that this endpoint really is OK for third-party use. If it's not, then the limits are undocumented and it could stop working at any time.

@jkmoo
Copy link

jkmoo commented Oct 25, 2024

any update on this?

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

4 participants