How many maximum number of characters allowed per each translation request?

304 views
Skip to first unread message

voleti rajesh

unread,
May 11, 2020, 8:40:13 AM5/11/20
to Google Cloud Translation API
Hi,

We could find the GCP Translation API quota limits per minute/day/month.

However, we couldn't find on how many maximum number of characters allowed per each translation request.

It will be really helpful if any one can share these details and related documentation links.

Thanks.

Music Li

unread,
May 11, 2020, 12:51:08 PM5/11/20
to Google Cloud Translation API
Please take a look at the contents[] field in this page: https://cloud.google.com/translate/docs/reference/rest/v3/projects/translateText?hl=en

The max limit is 30K. But we recommend sending smaller requests if possible. You can use Batch Translation for larger text.

voleti rajesh

unread,
May 11, 2020, 1:27:57 PM5/11/20
to Google Cloud Translation API
Thanks for sharing the link.

Usually, code point represents a single character. Can we consider the max limit as 30K characters per translateText API request?

Is there any recommended limit for text characters per translateText API request?

Looks like, we need to provide file paths in order to use batch translations. Can we provide the larger text directly to the batch translations similar to translateText API?

Music Li

unread,
May 11, 2020, 1:41:12 PM5/11/20
to Google Cloud Translation API
Yes, 30K characters per request.

We recommend to have <2K characters requests.

You cannot provide large text directly to batch translation, you will need to provide file paths.

voleti rajesh

unread,
May 20, 2020, 12:05:23 PM5/20/20
to Google Cloud Translation API
Thanks a lot Music Li for your response.

Can you also please clarify the following items:
  • Can you please advise on whether this max limit is for each string in the array or for all the strings in the array?
  • Since Google Cloud Translation API accepts an array of Strings, is there any limitation on maximum size of array or not? (for ex: array size should never be more than 100 strings something like that)

Bhavishya Mittal

unread,
May 21, 2020, 7:52:34 PM5/21/20
to Google Cloud Translation API
1. The max limit is including all the strings in the array.
2. The maximum size of the array could be 1024.
Reply all
Reply to author
Forward
0 new messages