Overview
Utility endpoints for building word games, Pokemon features, data formatting, and JSON validation in Discord bots. Generate random 5-letter words from a curated wordlist, validate player guesses against both the wordlist and an external dictionary, fetch random Pokemon data, shorten large numbers, and validate JSON payloads. 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" }
BDFD Example
$httpGet[https://api.bdtools.xyz/random-word]
/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 }
BDFD Example
$httpGet[https://api.bdtools.xyz/validate-word?word=apple]
/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
{ "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" }
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]
/number-shortener
Converts a large number string into a short, human-readable format. Use Case: Displaying large numbers concisely (e.g., 100k, 1M, 1B).
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| n | stringrequired |
The number string to shorten (commas allowed, e.g.,
100,000).
|
Responses
{ "original": "100000", "short": "100k" }
{ "error": "Missing number parameter 'n'." }
{ "error": "Invalid number provided." }
Example Usage
// Basic shortening $httpGet[https://api.bdtools.xyz/number-shortener?n=100000] // Comma-separated input $httpGet[https://api.bdtools.xyz/number-shortener?n=1,250,000] // Very large number $httpGet[https://api.bdtools.xyz/number-shortener?n=9876543210]
/json-validator
Validates a provided JSON payload. Returns
valid: true or
valid: false with
specific error details if invalid.
Request Body
{ "test": 123 }
Responses
{ "valid": true, "message": "JSON is valid." }
{ "valid": false, "error": "Invalid JSON.", "details": "Expected ',' or '}' at position 10" }
{ "error": "Method not allowed. Use POST." }
Example Usage
// Validate a simple JSON object $httpPost[https://api.bdtools.xyz/json-validator; { "name":"BDTools", "count":3 }] // Validate a nested JSON payload $httpPost[https://api.bdtools.xyz/json-validator; { "user":{ "id":123, "tags": ["api","docs"] }, "active":true }]