For the past days, I have been searching for Dictionary APIs that would provide definitions for a few different languages.
With this text, I hope to make the task easier for others out there in the wild.
Part 1: Where is Google Dictionary?
So: Google Dictionary API might be one of the first thoughts you come up with (right after “[just] google ‘dictionary API’!” 😜 ).
I also thought of 1, and obviously did 2. Many times.
The first one yields — uh — 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.
Nope. Strange. I was:
Part 2: A list of Dictionary APIs
Googling for Dictionary APIs is more useful. Soon I found myself skimming through 51 Dictionary APIs.
51 sounds good.
But digging deeper, the language-related API ecosystem seems to be a bit of a mess
- Quite a few of the APIs are deprecated or not available
- some are listed twice or even thrice
- others were interesting oddities, e.g. owlbot by Payam Nj, also on GitHub (and — the secret has been lifted — it’s not the same person as this owlbot… 🦉😜), the Acronym API, or the No-Swearing API. There’s also weblaws, which is a cool idea, but not a dictionary (+ where’s the API?)
- and yet others are too proprietary or 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.
In general, there are two limitations that dictionary-API-land seems to have:
1) Either it’s all about English (boasting definitions, part of speech, synonyms, thesaurus, etc.)
2) Or it’s all about translations
And yep, I’ve looked through all of them…
Finding definitions in common languages other than English, that are API-accessible, seems to be difficult. So regarding How to find those I can only stockphoto-wisdom you:
Part 3: Making a new list of Dictionary APIs
So, here are some potentially useful APIs, filtered down to half the size and rudimentarily annotated, for other searchers of the trade:
GREAT STUFF (IMO):
- Datamuse: you can do “sounds like” and “means like” queries. Very neat!
- Oxford: 3000 queries/month, solid source. ATTENTION: doesn’t currently support client-side requests (thanks for noting Steven Anderson!)
- A JS wrapper for Oxford Dictionary API by Suraj Jain — this one is open source so everyone can contribute to making it even better!
- Merriam-Webster: 1000/day with an API key (needs to be requested). According to Jesse DeWitt it has a couple of actively maintained APIs — mostly in English, but there’s also a Spanish-English dictionary API available.
to try and sort:
- 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:
- OpenThesaurus: for German (includes word data downloads)
proprietary (and most of them probably 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 interesting, less commonly computer-processed languages:
- Tamil Dictionary: Tamil
- Tvärslå: Nordic languages
- Longdo: Thai
- EAST: Japanese
- IsZulu: Zulu(-eng) you can request an API key per email :)
- Kateglo: from Indonesia (didn’t check which specific languages)
- Kasahorow: not really an API, but features some African languages
sadly no more:
- wordreference (however, do check out their great site)
- dictionary.com (same, worth a hop)
- Pearson: Used to be useful, but now deprecated (thanks for noting Mithun Madhav)
not-very-dictionary-related NLP APIs:
Another option that I have not yet fully explored is the Wikimedia API.
I spent a few hours on that task, but since I am looking for a unified way to get definitions, the makeshift architecture of the different wiktionary entries might prove too much of a post-processing effort.