# D&D 5e API
> The complete Dungeons & Dragons 5th-edition System Reference Document as an API — spells, monsters, classes, subclasses, races, backgrounds, equipment, magic items, conditions, features, feats, skills and the full rules reference. Look up a spell by name (e.g. Fireball → 3rd-level evocation, 150 ft, 8d6 fire) or a monster statblock (e.g. Adult Red Dragon → CR 17, AC 19, 256 HP, legendary actions), list and filter any resource type (spells by level or school, monsters by challenge rating), or fetch full detail for any of the 24 SRD categories. Backed by the open dnd5eapi.co dataset. Ideal for character builders, virtual tabletops, encounter and spell-card generators, Discord bots and homebrew tools.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/dnd-api/..."
```

## Pricing
- **Free** (Free) — 6,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 90,000 calls/Mo, 8 req/s
- **Pro** ($13/Mo) — 450,000 calls/Mo, 20 req/s
- **Mega** ($36/Mo) — 2,200,000 calls/Mo, 50 req/s

## Endpoints

### SRD

#### `GET /v1/get` — Full detail for any resource by type + index

**Parameters:**
- `type` (query, required, string) — Resource type, e.g. classes Example: `classes`
- `index` (query, required, string) — Resource index slug, e.g. wizard Example: `wizard`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnd-api/v1/get?type=classes&index=wizard"
```

**Response:**
```json
{
    "data": {
        "type": "classes",
        "resource": {
            "url": "/api/2014/classes/wizard",
            "name": "Wizard",
            "index": "wizard",
            "spells": "/api/2014/classes/wizard/spells",
            "hit_die": 6,
            "subclasses": [
                {
                    "url": "/api/2014/subclasses/evocation",
                    "name": "Evocation",
                    "index": "evocation"
                }
            ],
            "updated_at": "2026-04-01T20:35:36.453Z",
            "class_levels": "/api/2014/classes/wizard/levels",
            "spellcasting": {
                "info": [
                    {
                        "desc": [
                            "At 1st level, you know three cantrips of your choice from the wizard spell list. You learn additional wizard cantrips of your choice at higher levels, as shown in the Cantrips Known column of the Wizard table."
                        ],
                        "name": "Cantrips"
                    },
                    {
                        "desc": [
                            "At 1st level, you have a spellbook containing six 1st- level wizard spells of your choice. Your spellbook is the repository of the wizard spells you know, except your cantrips, which are fixed in your mind."
                        ],
                        "name": "Spellbook"
                    },
                    {
                        "desc": [
                 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/list` — List / filter any resource type

**Parameters:**
- `type` (query, required, string) — Resource type, e.g. spells, monsters, classes, races, equipment Example: `spells`
- `level` (query, optional, string) — Spell level filter 0-9 (type=spells) Example: `3`
- `school` (query, optional, string) — Magic school filter (type=spells), e.g. evocation
- `challenge_rating` (query, optional, string) — CR filter (type=monsters), e.g. 17
- `name` (query, optional, string) — Name search

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnd-api/v1/list?type=spells&level=3"
```

**Response:**
```json
{
    "data": {
        "type": "spells",
        "count": 42,
        "results": [
            {
                "name": "Animate Dead",
                "index": "animate-dead"
            },
            {
                "name": "Beacon of Hope",
                "index": "beacon-of-hope"
            },
            {
                "name": "Bestow Curse",
                "index": "bestow-curse"
            },
            {
                "name": "Blink",
                "index": "blink"
            },
            {
                "name": "Call Lightning",
                "index": "call-lightning"
            },
            {
                "name": "Clairvoyance",
                "index": "clairvoyance"
            },
            {
                "name": "Conjure Animals",
                "index": "conjure-animals"
            },
            {
                "name": "Counterspell",
                "index": "counterspell"
            },
            {
                "name": "Create Food and Water",
                "index": "create-food-and-water"
            },
            {
                "name": "Daylight",
                "index": "daylight"
            },
            {
                "name": "Dispel Magic",
                "index": "dispel-magic"
            },
            {
                "name": "Fear",
                "index": "fear"
            },
            {
                "name": "Fireball",
                "index": "fireball"
            },
            {
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/monster` — A monster statblock by index or name

**Parameters:**
- `index` (query, optional, string) — Monster index slug, e.g. adult-red-dragon Example: `adult-red-dragon`
- `q` (query, optional, string) — Monster name to resolve

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnd-api/v1/monster?index=adult-red-dragon"
```

**Response:**
```json
{
    "data": {
        "monster": {
            "xp": 18000,
            "name": "Adult Red Dragon",
            "size": "Huge",
            "type": "dragon",
            "index": "adult-red-dragon",
            "speed": {
                "fly": "80 ft.",
                "walk": "40 ft.",
                "climb": "40 ft."
            },
            "senses": {
                "blindsight": "60 ft.",
                "darkvision": "120 ft.",
                "passive_perception": 23
            },
            "actions": [
                {
                    "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws.",
                    "name": "Multiattack"
                },
                {
                    "desc": "Melee Weapon Attack: +14 to hit, reach 10 ft., one target. Hit: 19 (2d10 + 8) piercing damage plus 7 (2d6) fire damage.",
                    "name": "Bite"
                },
                {
                    "desc": "Melee Weapon Attack: +14 to hit, reach 5 ft., one target. Hit: 15 (2d6 + 8) slashing damage.",
                    "name": "Claw"
                },
                {
                    "desc": "Melee Weapon Attack: +14 to hit, reach 15 ft., one target. Hit: 17 (2d8 + 8) bludgeoning damage.",
                    "name": "Tail"
                },
                {
                    "desc": "Each creature of the dragon's choice that is within 120 ft. of the dragon and aware 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/spell` — A spell by index or name

**Parameters:**
- `index` (query, optional, string) — Spell index slug, e.g. fireball Example: `fireball`
- `q` (query, optional, string) — Spell name to resolve, e.g. Fireball

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnd-api/v1/spell?index=fireball"
```

**Response:**
```json
{
    "data": {
        "spell": {
            "dc": {
                "dc_type": {
                    "url": "/api/2014/ability-scores/dex",
                    "name": "DEX",
                    "index": "dex"
                },
                "dc_success": "half"
            },
            "name": "Fireball",
            "index": "fireball",
            "level": 3,
            "range": "150 feet",
            "damage": {
                "damage_type": {
                    "url": "/api/2014/damage-types/fire",
                    "name": "Fire",
                    "index": "fire"
                },
                "damage_at_slot_level": {
                    "3": "8d6",
                    "4": "9d6",
                    "5": "10d6",
                    "6": "11d6",
                    "7": "12d6",
                    "8": "13d6",
                    "9": "14d6"
                }
            },
            "ritual": false,
            "school": "Evocation",
            "classes": [
                "Sorcerer",
                "Wizard"
            ],
            "duration": "Instantaneous",
            "material": "A tiny ball of bat guano and sulfur.",
            "components": [
                "V",
                "S",
                "M"
            ],
            "subclasses": [
                "Lore",
                "Fiend"
            ],
            "description": "A bright streak flashes from your pointing finger to a point you choose within range and then bloss
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Resource types & usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnd-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Dungeons & Dragons 5e SRD. /v1/spell = a spell by index or name (e.g. index=fireball or q=Fireball); /v1/monster = a monster statblock (e.g. index=adult-red-dragon); /v1/list = list/filter any resource type (type=spells&level=3&school=evocation, type=monsters&challenge_rating=17, or name= to search); /v1/get = full detail for any type+index (type=classes&index=wizard). Types: spells, monsters, classes, races, equipment, magic-items, conditions, features, feats and more.",
        "types": [
            "ability-scores",
            "alignments",
            "backgrounds",
            "classes",
            "conditions",
            "damage-types",
            "equipment",
            "equipment-categories",
            "feats",
            "features",
            "languages",
            "magic-items",
            "magic-schools",
            "monsters",
            "proficiencies",
            "races",
            "rule-sections",
            "rules",
            "skills",
            "spells",
            "subclasses",
            "subraces",
            "traits",
            "weapon-properties"
        ],
        "source": "dnd5eapi.co (D&D 5e SRD, 2014)",
        "endpoints": [
            "/v1/spell",
            "/v1/monster",
            "/v1/list",
            "/v1/get",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:39.783Z",
        "request_id": "e0253c24-4437-4fb4-84cb-491be88fc328"
   
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/dnd-api
OpenAPI spec: https://www.oanor.com/api/dnd-api/openapi.json
