{"id":16720430,"url":"https://github.com/exciteabletom/wordle-api","last_synced_at":"2025-04-10T09:54:17.339Z","repository":{"id":40455493,"uuid":"455565366","full_name":"exciteabletom/wordle-API","owner":"exciteabletom","description":"Flask/Vue template for creating wordle variations","archived":false,"fork":false,"pushed_at":"2022-11-17T18:39:42.000Z","size":412,"stargazers_count":20,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T08:48:03.895Z","etag":null,"topics":["api","flask","python","template"],"latest_commit_sha":null,"homepage":"https://word.digitalnook.net","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exciteabletom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-04T13:52:28.000Z","updated_at":"2024-04-21T17:46:30.000Z","dependencies_parsed_at":"2023-01-21T04:43:24.910Z","dependency_job_id":null,"html_url":"https://github.com/exciteabletom/wordle-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exciteabletom%2Fwordle-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exciteabletom%2Fwordle-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exciteabletom%2Fwordle-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exciteabletom%2Fwordle-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exciteabletom","download_url":"https://codeload.github.com/exciteabletom/wordle-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198659,"owners_count":21063626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","flask","python","template"],"created_at":"2024-10-12T22:07:06.167Z","updated_at":"2025-04-10T09:54:17.318Z","avatar_url":"https://github.com/exciteabletom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wordle API\nPublic JSON API for Wordle with an example Vue.js [frontend](https://word.digitalnook.net).\n\nThis repo is a great base for making your own [variations](https://github.com/momonala/nerdle) of Wordle.\nOr you can use the API to quickly integrate Wordle logic into your own apps.\n\n\n## Architecture\nWhat's notable about this rendition of Wordle is that the guessing logic is completely server-side. As opposed to the original, which stores all the answers in the browser.\n\nThis means that it is impossible to know the answer without playing through the game.\n\nEven looking at the backend source code will not reveal the answer, as the wordlist is shuffled before it is inserted into the database.\n\n## Dev environment quick start\n`python3 -m venv .venv`\n\n`. .venv/bin/activate`\n\n`python3 -m pip install --upgrade wheel pip`\n\n`python3 -m pip install -r requirements.txt -r requirements-dev.txt`\n\n`pre-commit install`\n\n`python3 init.py`\n\n`FLASK_DEBUG=1 flask run --cert=adhoc --host=0.0.0.0`\n\nThe dev server is accessible on https://localhost:5000 and on your local IP address from another device.\n\nhttps is necessary for the async clipboard API to work on IOS.\nYou may have to click through a warning about an invalid certificate.\n\n\n## API Documentation\nIf you need any help with using this API, please open an issue!\n\n### POST `/api/v1/start_game/`\n### Request body (optional)\n```\n{\n  \"wordID\": int\n}\n```\nIf you don't include `wordID`, a random word is chosen.\n\n### Response body\n```\n{\n  \"id\": int,\n  \"key\": string,\n  \"wordID\": int\n}\n```\n`id` is a unique ID for this game.\n\n`key` is a random string used to validate future actions for this game.\n\n`wordID` is a unique ID identifying this word. You can use this ID to play the same game again, without leaking the answer.\n\n### POST `/api/v1/guess/`\n### Request body\n```\n{\n  \"id\": int,\n  \"key\": string,\n  \"guess\": string\n}\n```\n\n### Response body\n```\n[\n  {\n    \"letter\": char,\n    \"status\": int\n  },\n  cont...\n]\n```\n`status` is an int of value `0`, `1`, or `2`. `0` means the letter is not present in the word. `1` means the letter is present in the word. `2` means the letter is present in the word **and** is in the correct position.\n\nFor example: ⬛🟨🟨🟩⬛ is represented as `0 1 1 2 0`\n\n### Errors\n- `400 Bad Request` if the word is the wrong length, contains non-letters, or is not in the dictionary\n- `403 Forbidden` if the game has been finished, or already has 6 guesses\n\n\n### POST `/api/v1/finish_game`\n### Request body\n```\n{\n  \"id\": int,\n  \"key\": string\n}\n```\n\n### Response body\n```\n{\n   \"answer\": string\n}\n```\nAfter calling this, you will be unable to make more guesses as the answer has been revealed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexciteabletom%2Fwordle-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexciteabletom%2Fwordle-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexciteabletom%2Fwordle-api/lists"}