user9910379
user9910379

Reputation: 205

'Maximum string size to be translated by google API'

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?

Upvotes: 2

Views: 3523

Answers (1)

JL-V589
JL-V589

Reputation: 1044

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.

Upvotes: 3

Related Questions