DEV Community

Cover image for Building a Word Unscrambler with JavaScript (part 3)
Bridget Amana
Bridget Amana

Posted on

Building a Word Unscrambler with JavaScript (part 3)

I’m back with another update on my word unscrambler project, and today, it’s all about research. Yep, no code yet, no testing, just good old-fashioned digging through the internet for a free dictionary API that fits our needs.

I stumbled upon an insightful article by Martin Breuss. Though it was written in 2017, it’s still golden.

Why Do I Need a Dictionary API?

So far, the word unscrambler can take any input word, generate all possible combinations, and display the results. But here’s the catch: most of those permutations aren’t real words! Like, let’s be honest, "dowo" isn’t exactly a word you’ll find in any dictionary (at least, I hope not). 😅

To make this tool useful, I needed to figure out how to check if a permutation is a valid English word. That's where a dictionary API comes in!

The Hunt for the Perfect API

Now, I assumed this would be the easy part. Surely there must be dozens of free dictionary APIs floating around the web, right? Well, turns out... it’s a bit more complicated than I thought.

Here are the challenges I faced while searching:

  • Rate Limits: Many APIs had really tight rate limits for free users, only allowing a few requests per minute. And I wasn’t ready to throw down cash for this just yet.
  • Data Completeness: Some APIs didn’t have comprehensive word databases, meaning they were missing common words.
  • Deprecation: Quite a few of the APIs are deprecated.

Here’s a quick breakdown of the APIs I explored:

  • Oxford Dictionaries API – This one has a solid reputation and is highly reliable. However, it does come with rate limits on the free tier, and I’m honestly not sure what went wrong with my requests, but every word I searched (except “ace”) came back not found. 🤔

  • Wordnik API – The registration process is quite stressful, and after that, you need to wait 7 days for your API keys(I'm still waiting for mine).

  • Free Dictionary API – I tweeted about needing an API, and someone recommended this. It’s been fantastic so far—simple, fast, and no API keys required. A dream for beginners!

  • Merriam-Webster API – Free if it’s non-commercial, but with usage limits (1,000 queries/day). Still pretty generous if you’re just experimenting.

  • Cambridge Dictionary API – Isn’t free, unfortunately. 💸

  • Check-word (npm) – I found out this isn’t actually an API but an npm package. However, it was last maintained six years ago. Might be worth trying if you’re open to integrating npm modules!

That’s it for today’s research. Keep following along for the next phase, where I’ll hopefully lock in the perfect API and integrate it into our unscrambler.

Top comments (0)