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
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:
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.:
- 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
- the No-Swearing API
- or weblaws, which is a cool idea, but not a dictionary (+ where's the API?)
- 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:
- English-Centric: Many of the listed dictionaries are all about English. These can be quite useful, including definitions, part of speech, synonyms, thesaurus, etc.
- Translations: Most other APIs are about translations
And yep, I've looked through all of them...
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:
¯\_(ツ)_/¯
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)
- 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!)
- (unofficial) Google Dictionary API: A JS wrapper for the 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.
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
- W{}rds
- Wordnik
- definitions.net: relatively small quota (has English definitions)
Other (More Common) Languages
- OpenThesaurus: for German (includes word data downloads)
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
- 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)
- Cevir: Turkish
- Kasahorow: not really an API, but features some African languages
Sadly Discontinued
- 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
- Twinword: synonyms, semantic relations
- Rhymebrain: get rhymes (sweet page)
- Acromine (abbreviations), and also other NLP tools, e.g. for bio STEM
- Glosbe: the only implementation of Translation Memory I found
- Systrans: a company offering a variety of NLP related 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)