'Maximum string size to be translated by google API'

Viewed 1966

I have a text in string format (+30000000 characters). I'm using python, code is ready, but can Google translate API (paid) translate it all at once?

1 Answers

As per the documentation of "Quotas & Limits" of the Cloud Translation API:

The recommended max length for each request is 2K

and the API will reject very large requests (with a 400 INVALID_ARGUMENT error) regardless of the available quota. Thus you'll have to split your text into different files for the translation requests.

Related