2

After hours of messing around with the DeepL API and HTTP, I finally managed to get a JSON response object for translation, but it contains only one translation in the JSON.

However, when I use the DeepL desktop application, and I enter a sentence that results in multiple alternative translations, if I then use the same sentence as an API call (REST) in my application, it only returns one translation.

I could have sworn that in my hours of playing around, I saw multiple translation JSON objects, but that doesn't seem to be the case anymore.

Is there an additional parameter you have to pass for alternatives?

Note - I am using the DeepL Free API version.

Thanks.

clemens
  • 16,716
  • 11
  • 50
  • 65
ByteCarp
  • 41
  • 6
  • Why don't you subscribe to the free trial of a paid version and see what's what. Free versions of paid services always have limitations. – Jimi Sep 13 '21 at 14:44
  • While may be a limitation of the free version, you might also want to edit your question to include the request you're making, what you're doing with the response, the actual and expected output – Hursey Sep 13 '21 at 20:28

1 Answers1

4

The DeepL API does not currently offer translation alternatives, this feature is only available in the web translator and desktop apps.

The response JSON contains a translations array with one translation object per input. If you provide multiple input texts, the response will contain multiple translation objects; maybe this is what you remember. You can find documentation about the response here: https://www.deepl.com/docs-api/translating-text/response/

The free and paid API versions accept the same input parameters and provide the same responses. However the endpoint is different (api.deepl.com and api-free.deepl.com), and there are differences in usage limits and data security, see https://www.deepl.com/pro#developer

Daniel Jones
  • 116
  • 1
  • 4