Categories API
NewGet Category Words
Fetch words from a curated or seasonal category with difficulty, length, and random sampling filters. Pass includeDefinitions=true to hydrate every returned word with its dictionary definition, part of speech, syllables, Scrabble score, and frequency tier in a single batched query.
GET/api/v1/categories/:slug
Requires API key
Returns words for category :slug (e.g. animals, science, sat-vocab, palindromes).
Path Parameters
| Name | Description |
|---|---|
:slugrequired | stringCategory slug from GET /api/v1/categories (e.g. animals, food, space, sat-vocab). |
Query Parameters
| Name | Description |
|---|---|
difficulty | stringFilter by word length tier: easy (≤5 letters), medium (6–8 letters), or hard (9+ letters). |
minLength | integerMinimum word length. |
maxLength | integerMaximum word length. |
count | integerNumber of words to return (1–200, or 1–50 when includeDefinitions=true). Alias: limit. Defaults to 50. |
random | booleanWhen true, randomly samples matching words using cryptographic shuffling. Defaults to false. |
includeDefinitions | booleanWhen true, returns rich objects with definition, partOfSpeech, syllables, scrabbleScore, and frequencyBand instead of plain strings. Defaults to false. |
Request
bash
curl "https://api.playanagrama.com/api/v1/categories/space?difficulty=medium&count=10&random=true&includeDefinitions=true" \
-H "Authorization: Bearer ak_your_key_here"Response Fields
| Name | Description |
|---|---|
slug | stringCategory slug. |
name | stringDisplay name. |
group | stringtopics, education, wordplay, or seasonal. |
description | stringCategory description. |
source | stringcurated or seasonal. |
words | string[] | object[]Array of word strings by default, or enriched word objects when includeDefinitions=true. |
count | integerNumber of words returned. |
totalWords | integerTotal words in this category matching your filters before applying count. |
Response 200 (default)
JSON
{
"slug": "animals",
"name": "Animals",
"group": "topics",
"description": "Mammals, birds, reptiles, amphibians, and wildlife from around the world.",
"source": "curated",
"words": [
"bear",
"wolf",
"fox",
"deer",
"lion",
"tiger",
"zebra",
"otter"
],
"count": 8,
"totalWords": 20
}Response 200 (includeDefinitions=true)
JSON
{
"slug": "space",
"name": "Space & Astronomy",
"group": "topics",
"description": "Planets, stars, cosmic phenomena, and space exploration.",
"source": "curated",
"words": [
{
"word": "nebula",
"length": 6,
"syllables": 3,
"scrabbleScore": 8,
"frequencyBand": "known",
"partOfSpeech": "noun",
"definition": "A cloud in outer space consisting of gas or dust."
},
{
"word": "quasar",
"length": 6,
"syllables": 2,
"scrabbleScore": 15,
"frequencyBand": "rare",
"partOfSpeech": "noun",
"definition": "An extragalactic object, starlike in appearance, that is among the most luminous and distant objects in the universe."
}
],
"count": 2,
"totalWords": 38
}Response 404 — Category not found
JSON
{
"error": {
"code": "CATEGORY_NOT_FOUND",
"message": "Category 'unknown' not found. Use GET /v1/categories for available categories."
}
}Was this page helpful?