Finding A Useful Dictionary API
Tags: api, nlp, dictionary, language
Published: 2020-03-08 11:22:19

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](https://dev-to-uploads.s3.amazonaws.com/i/m8k4iekjs7e8zke88jih.jpeg)


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](https://dev-to-uploads.s3.amazonaws.com/i/jl2i3abfzh40ozwsfhjr.png)

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](https://www.programmableweb.com/category/dictionary/api). 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](https://owlbot.info/api/v1/dictionary/owl?format=json) by [Payam Nj](https://medium.com/@payamnj), also [on GitHub](https://github.com/payamnj/owlbot) (and - the secret has been lifted - it's not the same person as [this owlbot](https://vimeo.com/200330457)... 🦉😜)
    - the [Acronym API](http://acronyms.silmaril.ie/#0)
    - the [No-Swearing API](http://www.noswearing.com/about.php)
    - or [weblaws](https://www.weblaws.org/), 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](https://developer.oxforddictionaries.com/), 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](https://forum.oxforddictionaries.com/api/discussion/18/error-message-no-access-control-allow-origin-or-i-can-t-get-my-client-side-request-to-work).

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](https://dev-to-uploads.s3.amazonaws.com/i/5hvtqy8hnhanciya5wae.png)

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](https://dev-to-uploads.s3.amazonaws.com/i/hm4z387qohvezjbxkg7h.jpeg)

`¯\_(ツ)_/¯`

# 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](http://www.datamuse.com/api/): you can do "sounds like" and "means like" queries. Very neat!
- [Oxford](https://developer.oxforddictionaries.com/): 3000 queries/month, solid source. **ATTENTION**: [doesn't currently support client-side requests](https://forum.oxforddictionaries.com/api/discussion/18/error-message-no-access-control-allow-origin-or-i-can-t-get-my-client-side-request-to-work) (thanks for noting [Steven Anderson](https://medium.com/@saanderson1987)!)
- [(unofficial) Google Dictionary API](https://dictionaryapi.dev/): A JS wrapper for the Oxford Dictionary API by [Suraj Jain](https://medium.com/@srjjain1996) - this one is open source so [everyone can contribute](https://github.com/meetDeveloper/googleDictionaryAPI) to making it even better!
- [Merriam-Webster](http://dictionaryapi.com/): 1000/day with an API key (needs to be requested). According to [Jesse DeWitt](https://medium.com/@screeny) it has a couple of actively maintained APIs - [mostly in English](https://dictionaryapi.com/products/index), but there's also a Spanish-English dictionary API available.

### Maybe Useful

- [Hablaa](http://hablaa.com/api/): a crowdsourced thing made in Switzerland
- [Aspect](http://www.embedplus.com/dictionary/how-to-pronounce-aspect-and-use-it): 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](http://www.onelook.com/?c=faq): an aggregator of other dictionary providers, returns links

### Useful For English

- [W{}rds](https://www.wordsapi.com/)
- [Wordnik](http://developer.wordnik.com/)
- [definitions.net](http://www.definitions.net/definitions_api.php): relatively small quota (has English definitions)

### Other (More Common) Languages

- [OpenThesaurus](https://www.openthesaurus.de/about/api#json): for German (includes word data downloads)

### Proprietary (and most of them expensive)

- [Yandex](https://tech.yandex.com/dictionary/) (lots of translation from and into Russian)
- [MacMillan](http://www.macmillandictionary.com/us/tools/aboutapi.html) (English)
- [Cambridge](http://dictionary-api.cambridge.org/apply): makes you fill an endless form (API only for English)
- [Collins](https://www.collinsdictionary.com/api/): 5000 requests/month free (but you need to apply first; English monolingual)

### Some Less Commonly Computer-Processed Languages

- [Tamil Dictionary](http://agarathi.com/): Tamil
- [Tvärslå](http://ordbok.nada.kth.se/): Nordic languages
- [Longdo](http://dict.longdo.com/page/api): Thai
- [EAST](https://www.programmableweb.com/api/east-web-dictionary-search): Japanese
- [IsZulu](https://api.isizulu.net/doc/): Zulu(-eng) you can request an API key per email :)
- [Kateglo](http://kateglo.com/): from Indonesia (didn't check which specific languages)
- [Cevir](http://www.cevir.im/api): Turkish
- [Kasahorow](http://www.kasahorow.org/app): not really an API, but features some African languages

### Sadly Discontinued

- [wordreference](http://www.wordreference.com/docs/api.aspx#service) (however, do check out their [great site](http://www.wordreference.com/))
- [dictionary.com](https://www.programmableweb.com/api/dictionarycom) (same, [worth a hop](http://www.dictionary.com/))
- [Pearson](http://developer.pearson.com/apis/dictionaries): Used to be useful, but now deprecated (thanks for noting [Mithun Madhav](https://medium.com/@mithunm))

### Not-Very-Dictionary-Related NLP APIs

- [Twinword](https://market.mashape.com/twinword/word-associations#word-associations-get): synonyms, semantic relations
- [Rhymebrain](http://rhymebrain.com/api.html): get rhymes (sweet page)
- [Acromine](http://www.nactem.ac.uk/software/acromine/rest.html) (abbreviations), and also other NLP tools, e.g. for bio STEM
- [Glosbe](https://glosbe.com/a-api): the only implementation of [Translation Memory](https://en.wikipedia.org/wiki/Translation_memory) I found
- [Systrans](https://platform.systran.net/reference/translation): a company offering a variety of NLP related APIs

Another option might be the [Wikimedia API](https://www.mediawiki.org/wiki/API:Main_page). 
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!