This script provides api endpoints for getting highly accurate guesses for wordle game
If you want to run it as simple python code, checkout version1
branch from this repo
Integrating a simple frontend to use these API's has been carried out by https://github.com/ayushpuri1012
-
The base url for the api endpoint is
https://wordle-helper-app.herokuapp.com/
On hitting this url, it'll just return textWelcome to Wordle Helper API
-
The main url for getting predictions results is
https://wordle-helper-app.herokuapp.com/suggestion
Following points needs to be considered while accessing this endpoint
Request Type: POST
Header -> Content-Type: application/json
Body: {
"guess_word": "beast",
"guess_word_result": "yyggb",
"iteration": 2,
"word_list": ["abc", "def", "ghi"]
}
guess_word
: Is the word that was actually guessed in wordle game
guess_word_result
: Is the result of the guess word from wordle game. b is for black, y for yellow & g for green
iteration
: The current iteration going on. Make sure it starts with 1
word_list
: For each request sent, server would send back list of possible result words. Pass this list as word_list for next guess
Foriteration
= 1,word_list
should be an empty list -
Response from API: {
"status": 200,
"suggestion_result": [ "boral", "coral", "goral" ]
}User should pick one word from
suggestion_result
, preferably word which is a common word & with distinct characters.
For next guess, while making API call, result ofsuggestion_result
should be sent asword_list
-
If the 1st request is sent with
x
as word length then its upto frontend user to ensure all subsequent request are for same word length & thatguess_word_result
is also of same length asx
. If this is not followed, API might return error response -
A sample web UI is added in this project in the folder frontend. To run this, you can clone this project, go to
frontend/src/App.js
in terminal and runnpm start
-
On running the code it'll have 2 input field. Enter the guess & Enter the response from wordle
The 1st guess should come from user, then enter that word inguess
field & that same word in wordle game and the output from wordle game should be added inEnter the response from wordle
field and pressSubmit
-
It'll return list of possible words for next guess. Pick any one word from this list, preferably word which is common & has distinct characters and enter the same as next guess word in UI as well in wordle game & the result of wordle in
response
field. The next set of suggestions would keep on shrinking and quickly reaching to exact word in few iterations -
Just remember, from the suggested list of words given out by code always try to pick the most common word