DEV Community

Cover image for Finding A Useful Dictionary API
Martin Breuss
Martin Breuss

Posted on • Originally published at Medium

Finding A Useful Dictionary API

I thought that would be easy, but they are difficult to spot

I have searched extensively for Dictionary APIs that can provide definitions for a few different natural languages. With this text, I hope to make the task easier for others out there in the wild.


Part 1: Looking For Google's Dictionary API

A large image of Where's Waldo's face

Google Dictionary API might be one of the first thoughts you come up with (right after "[just] google 'dictionary API'!" 😜 ).

I also thought of looking for the Google Dictionary API, and obviously did my fair share of googling.

The first one yields no useful results. At least nothing much since 2011. Google's great word info which their search returns when you look up a single term - or use the more explicit "define: your_word_here" - is not accessible other than through the search bar's results. I asked, and looked. I was:

definition of the word surprised

In case someone knows how to get Google Dictionary information programmatically, please do leave a comment!


Part 2: Finding A List Of Dictionary APIs

Googling for Dictionary APIs is more useful. Soon I found myself skimming through 51 Dictionary APIs. 51 sounds good. There should be something useful among those.

But when digging deeper into this list, the language-related API ecosystem seems to be a bit of a mess:

  • Deprecated: Quite a few of the APIs are deprecated or not available
  • Duplicated: Some are listed twice or even thrice
  • Different: Other APIs are interesting oddities, e.g.:
  • Dollars $$$: Yet others are proprietary or too costly for me to consider

Oxford Dictionaries, number 1 on programmableweb's list, is actually quite a neat choice. They allow 3000 requests per month for free, and you're even allowed to use the API for commercial purposes. In case you're into that. However: it doesn't currently support client-side requests.

In general, there are two limitations that dictionary-API-land seems to have:

  1. English-Centric: Many of the listed dictionaries are all about English. These can be quite useful, including definitions, part of speech, synonyms, thesaurus, etc.
  2. Translations: Most other APIs are about translations

And yep, I've looked through all of them...

47 open tabs

For those who counted - it's only 47, not the claimed 51. Finding definitions in common languages other than English, that are API-accessible, seems to be difficult. So regarding how to best find those I can only stockphoto-wisdom you:

the word 'persistence' highlighted in a dictionary

¯\_(ツ)_/¯

Part 3: Making A New List Of Dictionary APIs

As a result of my research, here are some potentially useful APIs, filtered down to half the size of the original list, and rudimentarily annotated. I hope this might help other searchers of the trade:

Great Stuff (IMO)

Maybe Useful

  • Hablaa: a crowdsourced thing made in Switzerland
  • Aspect: real-life video pronunciations (sounds interesting, but I don't know where the API is. I wrote to them, let's see what they'll respond)
  • OneLook: an aggregator of other dictionary providers, returns links

Useful For English

Other (More Common) Languages

Proprietary (and most of them expensive)

  • Yandex (lots of translation from and into Russian)
  • MacMillan (English)
  • Cambridge: makes you fill an endless form (API only for English)
  • Collins: 5000 requests/month free (but you need to apply first; English monolingual)

Some Less Commonly Computer-Processed Languages

Sadly Discontinued

Not-Very-Dictionary-Related NLP APIs

Another option might be the Wikimedia API. 
I spent a few hours on that task, but since I was personally looking for a unified way to get definitions, the makeshift architecture of the different wiktionary entries seemed too much of a post-processing effort.


Hope this list can help someone along their way, and I appreciate your comments and updates if you find something useful!

Top comments (0)