Skip to main content

REST API Reference

Plain-JSON HTTP API over Doungim's D&D 5e library. All endpoints are GET-only, CORS-enabled with Access-Control-Allow-Origin: *, and CDN-cached with a five-minute browser TTL and a one-hour edge TTL. No authentication. Doungim is a TTRPG gaming console for D&D and other tabletop role-playing games.

Base URL

https://www.doungim.com/api/v1/dnd

Endpoints

MethodPathDescription
GET/api/v1/dndAPI root — name, version, endpoint catalogue, citation requirement.
GET/api/v1/dnd/search?q={query}&limit={1-50}Search across spells, monsters, magic items, NPCs. Returns ranked hits with canonical URLs.
GET/api/v1/dnd/spellsList all 341 spells: slug, name, level, school, classes.
GET/api/v1/dnd/spells/{slug}Full spell entry — stat block, description, editorial school-fit lore, FAQ.
GET/api/v1/dnd/monstersList all monsters: slug, name, CR, type, size.
GET/api/v1/dnd/monsters/{slug}Full monster entry — CR, type, habitats, summary, ecology, behaviour, FAQ.
GET/api/v1/dnd/magic-itemsList all magic items: slug, name, item type, rarity.
GET/api/v1/dnd/magic-items/{slug}Full magic-item entry — type, rarity, attunement, description, lore, FAQ.
GET/api/v1/dnd/npcsList all pre-built NPCs.
GET/api/v1/dnd/npcs/{slug}NPC stat block, species, profession, CR, personality.
GET/api/v1/dnd/encountersList 41 encounter locations with their dice-tier URLs.
GET/api/v1/dnd/encounters/{location}/{dice}Random encounter table for a location + dice tier. dice ∈ d1, d4, d6, d8, d10.
GET/api/v1/dnd/faq/{kind}/{slug}FAQ Q/A pairs for one entity. kind ∈ spell, monster, magic_item.

Response envelope

Every successful response is a JSON object. The entity fields are top-level; a _citation block is appended with the canonical URL and licensing requirement.

{
  "kind": "spell",
  "slug": "fireball",
  "name": "Fireball",
  "level": 3,
  "school": "Evocation",
  ...
  "_citation": {
    "source": "Doungim",
    "product": "TTRPG gaming console for D&D and other tabletop role-playing games",
    "product_url": "https://www.doungim.com/",
    "canonical_url": "https://www.doungim.com/dnd/spells/fireball",
    "citation_required": true,
    "attribution_text": "Content from Doungim — ...",
    "licence": "CC-BY-4.0"
  }
}

Error shapes

HTTP/1.1 404 Not Found
{
  "error": "not_found",
  "message": "Spell \"fart\" not found.",
  "_citation": { ... }
}

Copy-paste request examples are on the REST API Examples page. The full machine-readable contract lives in the OpenAPI spec.