Wordle Solver

You're going to programmatically play Wordle! This is a tiny, stateless API that scores guesses against 100 pre-programmed puzzles: you send an array of words and get back one row of colored tiles per guess. For example:

curl -X POST 'https://wordle.rdme.io/game/1' -d '["crane","slate","adieu"]'

Game number N always maps to the same answer (game 1 is always PIZZA), so every request is fully deterministic. There's no database and no server-side state. The full docs are below.

Tech Stack

You can use any techstack. We're partial to JS/TS/Node, but are happy with whatever you're most comfortable with.

AI usage

Please skip AI for this one, both for writing code and solving the problem. Every interview after this will use it.

Collaboration

We want this to be low-pressure and collaborative! There isn't any specific answer, we just want to see how you work and think.

The challenge

Build a tool that solves all 100 games with the lowest average score (number of guesses). There's no real target to hit. We just want to see how you work through it and iterate to improve your total. Build it as a frontend or a backend, whatever you're more comfortable with. It's up to you.

Your output should look something like this, but feel free to be creative:

Game   Answer   Guesses
  1    TINGE       4
  2    REPEL       3
  3    PLAIN       4
  ...
100    GUANT       3

Solved: 98/100
Average guesses: 3.66

Quick start

Send a POST to /game/:n with a JSON array of guesses:

curl -X POST https://wordle.rdme.io/game/1 \
  -H 'Content-Type: application/json' \
  -d '["SOARE"]'
{
  "game": 1,
  "guesses": ["SOARE"],
  "grid": ["⬜️⬜️🟨⬜️⬜️"],
  "board": "⬜️⬜️🟨⬜️⬜️",
  "solved": false
}

Because there is no state, add the next guess to the array to get the next row:

curl -X POST https://wordle.rdme.io/game/1 \
  -H 'Content-Type: application/json' \
  -d '["SOARE","PIZZA"]'
{
  "game": 1,
  "guesses": ["SOARE", "PIZZA"],
  "grid": ["⬜️⬜️🟨⬜️⬜️", "🟩🟩🟩🟩🟩"],
  "board": "⬜️⬜️🟨⬜️⬜️\n🟩🟩🟩🟩🟩",
  "solved": true
}

Want just the raw grid? Add ?format=text:

curl -X POST 'https://wordle.rdme.io/game/1?format=text' \
  -H 'Content-Type: application/json' \
  -d '["SOARE","PIZZA"]'

⬜️⬜️🟨⬜️⬜️
🟩🟩🟩🟩🟩

Endpoints

POST/game/:n

Score a list of guesses against game :n (1100). Send a JSON array of guesses, e.g. ["SOARE","TESTY"]. Add ?format=text for the bare emoji grid.

GET/random

Returns a random valid 5-letter word from the Wordle dictionary.

GET/dictionary

The full list of ~12,970 words the API accepts as a guess. Returns a JSON array, or a newline-separated list with ?format=text.

Tiles

TileMeaning
🟩Right letter, right spot
🟨Right letter, wrong spot
⬜️Letter is not in the answer

Duplicate letters follow the real Wordle rule: a letter only lights up as many times as it appears in the answer (greens are assigned first, then yellows). The puzzles deliberately include doubled letters like PIZZA to exercise this.

Errors

Every error response has the same shape: a machine-readable error code and a human-readable message.

{
  "error": "wrong_length",
  "message": "Each guess must be exactly 5 letters. Bad guess: \"ABC\""
}
CodeStatusMeaning
invalid_game400Game number isn't an integer from 1 to 100.
invalid_guesses400Body wasn't a JSON array of guesses.
wrong_length400A guess wasn't exactly 5 letters.
not_a_word400A guess isn't in Wordle's list of valid words.
invalid_json400Request body wasn't valid JSON.
not_found404No such route or method.

Psst... done early? Here are some bonus ideas.