Overview
Utility endpoints for building word games and Pokemon features in Discord bots. Generate random 5-letter words from a curated wordlist, validate player guesses against both the wordlist and an external dictionary, and fetch random Pokemon data. All endpoints are public and require no authentication.
// Base URL for all endpoints https://api.bdtools.xyz
/random-word
Returns a random 5-letter word from a curated wordlist. Perfect for starting a new Wordle game. The wordlist contains common English words suitable for word-guessing games.
Responses
{ "word": "apple" }
{ "error": "Word list is empty" }
{ "error": "Failed to load word list", "details": "ENOENT: no such file or directory" }
/validate-word
Validates whether a 5-letter word is a valid English word. First checks the curated wordlist, then falls back to an external dictionary. Returns the validation result and the source of validation (wordlist or dictionary).
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| word | stringrequired | The 5-letter word to validate. Must contain only letters (a-z, A-Z). |
/validate-word?word=apple
Responses
{ "valid": true, "word": "apple", "source": "wordlist" }
{ "valid": true, "word": "zebra", "source": "dictionary" }
{ "valid": false, "word": "xyzqw" }
{ "error": "Missing ?word= parameter" }
{ "error": "Word must be exactly 5 letters" }
{ "error": "Failed to reach dictionary", "details": "Network timeout" }
{ "error": "Dictionary error", "status": 503 }
/random-pokemon
Returns a random Pokemon name from all generations (1-9, over 1000
Pokemon). Can optionally return the Pokemon sprite image by adding
?image=true. Images are sourced from PokeAPI's official artwork collection.
You can also request a specific Pokemon by name using the
?name=
parameter, or filter by generation using
?gen=.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| gen | integer |
Filter by generation (1-9). Examples:
?gen=1 for
Kanto,
?gen=2 for
Johto, etc.
|
| image | string |
Set to
true to
return the Pokemon sprite image instead of JSON
|
| name | string |
Specify a Pokemon name to get that specific Pokemon (e.g.,
?name=pikachu)
|
Generations
// Gen 1: Kanto (1-151) // Gen 2: Johto (152-251) // Gen 3: Hoenn (252-386) // Gen 4: Sinnoh (387-493) // Gen 5: Unova (494-649) // Gen 6: Kalos (650-721) // Gen 7: Alola (722-809) // Gen 8: Galar (810-905) // Gen 9: Paldea (906-1025)
Responses
{ "pokemon": "pikachu" }
Content-Type:
image/png
Returns the Pokemon sprite image
Cached for 24 hours
Example Usage
// Random Pokemon from all generations $httpGet[https://api.bdtools.xyz/random-pokemon] // Random Pokemon from Gen 1 (Kanto) $httpGet[https://api.bdtools.xyz/random-pokemon?gen=1] // Random Pokemon from Gen 2 (Johto) $httpGet[https://api.bdtools.xyz/random-pokemon?gen=2] // Random Gen 1 Pokemon image $image[https://api.bdtools.xyz/random-pokemon?gen=1&image=true] // Specific Pokemon name $httpGet[https://api.bdtools.xyz/random-pokemon?name=charizard] // Specific Pokemon image $image[https://api.bdtools.xyz/random-pokemon?name=pikachu&image=true]
{ "error": "Invalid generation. Must be between 1 and 9." }
{ "error": "Pokemon not found" }
{ "error": "Pokemon image not found", "pokemon": "pikachu" }
{ "error": "Pokemon list is empty" }
{ "error": "Failed to fetch Pokemon image", "details": "Network timeout" }