Google Translate API as a dictionary?

2.2k views Asked by At

E.g. - translating "amigo" from Spanish to English.

This gives a result ("friend"), which I'd expect in the API.

Does the API also offer the dictionary-like elements from that page like in the following image?

The API is not free to test, so I've been unable to see if it contains the result I want or not.

dictionary elements in google translate

If not possible, can anyone suggest a different API for the purpose (multilingual dictionary, at least English -> other languages)?

1

There are 1 answers

0
rmtheis On BEST ANSWER

No. The Google Translate API doesn't expose an endpoint for retrieving the dictionary-like elements you're asking about.

As of today the functions available through the API are for:

  • Translation of text
  • Detection of the source language of the given text
  • Listing which language codes the API supports.

There's no endpoint available for retrieving the audio for the translations either.

On the plus side, I've seen that the API has had its list of supported languages expanded regularly, though, and its language models have apparently been being updated.

Recommendations for other APIs to use is outside the scope of StackOverflow, but some Google searching should help you find what's available.