Word API
Word Endpoints
GET/api/v1/words/random
Requires API key
Returns random word(s) from the Anagrama dictionary. Supports optional query parameters to control count and filter by word length.
Query Parameters
| Name | Description |
|---|---|
count | integerNumber of words to return. Clamped to 1–10 — values outside this range are automatically adjusted. Defaults to 1. |
minLength | integerMinimum word length (inclusive). Clamped to 3–15. Defaults to 3. |
maxLength | integerMaximum word length (inclusive). Clamped to 3–15. If minLength is greater than maxLength, they are automatically swapped. Defaults to 15. |
Request
bash
curl "https://api.playanagrama.com/api/v1/words/random?count=3&minLength=5&maxLength=7" \
-H "Authorization: Bearer ak_your_key_here"Response Fields
| Name | Description |
|---|---|
words | string[]Array of randomly selected words. May be empty if no words match the length criteria (e.g. minLength=15&maxLength=15 has very few matches). |
count | integerNumber of words returned. May be 0 if no words match the length criteria. |
Response 200
JSON
{
"words": [
"crane",
"plume",
"spire"
],
"count": 3
}Response 200 — No matches
JSON
{
"words": [],
"count": 0
}Response 400 — Invalid params
JSON
{
"error": {
"code": "INVALID_PARAMS",
"message": "count, minLength, and maxLength must be positive integers."
}
}Response 401 — Missing API key
JSON
{
"error": {
"code": "UNAUTHORIZED",
"message": "A valid API key is required. Pass it as a Bearer token."
}
}Response 429 — Rate limited
JSON
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Daily API limit of 100 requests exceeded. Resets at 2026-02-11T14:30:00.000Z.",
"resetAt": "2026-02-11T14:30:00.000Z"
}
}Words are selected using a cryptographically secure RNG. Each request returns a fresh set of words — results are not cached or deduplicated across requests. If no words match your length filter, the response returns an empty array with
count: 0 (not an error).Was this page helpful?