# D&D 5e API

> Look up Dungeons & Dragons 5e rules content through two free, keyless public APIs: the D&D 5e API (the official SRD served as spells, monsters, classes, races, equipment, magic items, features, conditions, and more, in both the 2014 and 2024 rulesets) and Open5e (full-text search and rich filtering across the SRD plus open content from beyond it, such as Tome of Beasts). No account or API key required.

App · Gaming · 11 actions. Web page: https://docs.lodol.com/docs/integrations/dnd5e

## Actions

### Get a monster (D&D 5e API)

Look up a single monster by index (slug) and get a clean stat block: size, type, alignment, armor class, hit points, ability scores, challenge rating, speeds, senses, and its special abilities, actions, legendary actions, and reactions.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Monster (`index`, text, required): Pick a monster, or reference a monster index (slug) from a previous step.

**Outputs**

- `challenge_rating` (number)
- `hit_points` (number)
- `index` (text)
- `name` (text)

**Example output**

```json
{
  "actions": [
    {
      "desc": "Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.",
      "name": "Scimitar"
    }
  ],
  "alignment": "neutral evil",
  "armor_class": 15,
  "armor_class_detail": [
    {
      "type": "armor",
      "value": 15
    }
  ],
  "challenge_rating": 0.25,
  "charisma": 8,
  "condition_immunities": [],
  "constitution": 10,
  "damage_immunities": [],
  "damage_resistances": [],
  "damage_vulnerabilities": [],
  "dexterity": 14,
  "hit_dice": "2d6",
  "hit_points": 7,
  "image": "/api/images/monsters/goblin.png",
  "index": "goblin",
  "intelligence": 10,
  "languages": "Common, Goblin",
  "legendary_actions": [],
  "name": "Goblin",
  "proficiency_bonus": 2,
  "reactions": [],
  "senses": {
    "darkvision": "60 ft.",
    "passive_perception": 9
  },
  "size": "Small",
  "special_abilities": [
    {
      "desc": "The goblin can take the Disengage or Hide action as a bonus action on each of its turns.",
      "name": "Nimble Escape"
    }
  ],
  "speed": {
    "walk": "30 ft."
  },
  "strength": 8,
  "subtype": "goblinoid",
  "type": "humanoid",
  "url": "/api/2014/monsters/goblin",
  "wisdom": 8,
  "xp": 50
}
```

### Get a record (Open5e)

Get one full Open5e record by collection and slug, such as a complete monster stat block or spell description. Use a slug from a search result.

**Inputs**

- Collection (`endpoint`, text, required): The Open5e collection the record belongs to. One of: `spells`, `spelllist`, `monsters`, `documents`, `backgrounds`, `planes`, `sections`, `feats`, `conditions`, `races`, and 4 more.
- Slug (`slug`, text, required): The record's slug (for example adult-red-dragon or fireball), from a search result or a previous step.

**Outputs**

- `slug` (text)

**Example output**

```json
{
  "armor_class": 15,
  "challenge_rating": "1/4",
  "cr": 0.25,
  "document__slug": "wotc-srd",
  "document__title": "5e Core Rules",
  "hit_points": 7,
  "name": "Goblin",
  "size": "Small",
  "slug": "goblin",
  "type": "Humanoid"
}
```

### Get a resource (D&D 5e API)

Get one full D&D 5e API resource by collection and index, for any collection (a piece of equipment, a feature, a condition, and so on). Returns the resource exactly as the API serves it.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Collection (`category`, text, required): The collection the resource belongs to.
- Resource (`index`, text, required): Pick a resource, or reference an index (slug) from a previous step.

**Outputs**

- `index` (text)

**Example output**

```json
{
  "cost": {
    "quantity": 15,
    "unit": "gp"
  },
  "equipment_category": {
    "index": "weapon",
    "name": "Weapon"
  },
  "index": "longsword",
  "name": "Longsword",
  "url": "/api/2014/equipment/longsword",
  "weight": 3
}
```

### Get a spell (D&D 5e API)

Look up a single spell by index (slug) and get a clean summary: level, school, casting time, range, components, duration, concentration, ritual, damage, the classes that can cast it, and its full description.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Spell (`index`, text, required): Pick a spell, or reference a spell index (slug) from a previous step.

**Outputs**

- `classes` (list)
- `index` (text)
- `level` (number)
- `name` (text)
- `school` (text)

**Example output**

```json
{
  "attack_type": null,
  "casting_time": "1 action",
  "classes": [
    "Sorcerer",
    "Wizard"
  ],
  "components": [
    "V",
    "S"
  ],
  "concentration": false,
  "damage_type": "Force",
  "desc": "You create three glowing darts of magical force.",
  "duration": "Instantaneous",
  "higher_level": "When you cast this spell using a slot of 2nd level or higher, the spell creates one more dart for each slot level above 1st.",
  "index": "magic-missile",
  "level": 1,
  "material": null,
  "name": "Magic Missile",
  "range": "120 feet",
  "ritual": false,
  "school": "Evocation",
  "subclasses": [],
  "url": "/api/2014/spells/magic-missile"
}
```

### Get class level details (D&D 5e API)

Get a class's features, proficiency bonus, ability score improvements, and spell slots at a specific level (1 to 20).

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Class (`class_index`, text, required): The class to look up (for example wizard or fighter).
- Class level (`level`, number, required): The class level, 1 through 20. From 1 to 20.

**Outputs**

- `features` (list)
- `level` (number)
- `prof_bonus` (number)

**Example output**

```json
{
  "ability_score_bonuses": 0,
  "class": {
    "index": "wizard",
    "name": "Wizard"
  },
  "features": [
    {
      "index": "spellcasting-wizard",
      "name": "Spellcasting: Wizard",
      "url": "/api/2014/features/spellcasting-wizard"
    },
    {
      "index": "arcane-recovery",
      "name": "Arcane Recovery",
      "url": "/api/2014/features/arcane-recovery"
    }
  ],
  "index": "wizard-1",
  "level": 1,
  "prof_bonus": 2,
  "spellcasting": {
    "cantrips_known": 3,
    "spell_slots_level_1": 2
  },
  "url": "/api/2014/classes/wizard/levels/1"
}
```

### List monsters (D&D 5e API)

List monsters, optionally filtered by challenge rating and/or name. Returns each monster's index (slug) and name.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Challenge rating (`challenge_rating`, text): Only return monsters with this challenge rating. One of: `0` (CR 0), `0.125` (CR 1/8), `0.25` (CR 1/4), `0.5` (CR 1/2), `1` (CR 1), `2` (CR 2), `3` (CR 3), `4` (CR 4), `5` (CR 5), `6` (CR 6), and 24 more.
- Name filter (`name`, text): Only return monsters whose name contains this text.

**Outputs**

- `count` (number)
- `results` (list)
- `version` (text)

**Example output**

```json
{
  "count": 1,
  "results": [
    {
      "index": "goblin",
      "name": "Goblin",
      "url": "/api/2014/monsters/goblin"
    }
  ],
  "version": "2014"
}
```

### List resources (D&D 5e API)

List a D&D 5e API collection such as spells, monsters, equipment, classes, or races, optionally narrowed by name. Returns each entry's index (slug) and name.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Collection (`category`, text, required): The collection to list (for example spells, monsters, or equipment). The choices depend on the ruleset version.
- Name filter (`name`, text): Only return entries whose name contains this text.

**Outputs**

- `category` (text)
- `count` (number)
- `results` (list)
- `version` (text)

**Example output**

```json
{
  "category": "spells",
  "count": 2,
  "results": [
    {
      "index": "acid-arrow",
      "name": "Acid Arrow",
      "url": "/api/2014/spells/acid-arrow"
    },
    {
      "index": "fireball",
      "name": "Fireball",
      "url": "/api/2014/spells/fireball"
    }
  ],
  "version": "2014"
}
```

### List spells (D&D 5e API)

List spells, optionally filtered by level (0 for cantrips up to 9), magic school, and/or name. Returns each spell's index (slug), name, and level.

**Inputs**

- Ruleset version (`version`, text): Which SRD ruleset to read: 2014 (SRD 5.1, the most complete set) or 2024 (SRD 5.2). Defaults to 2014. One of: `2014` (2014 (SRD 5.1)), `2024` (2024 (SRD 5.2)). Default: `2014`.
- Spell level (`level`, number): Spell level, 0 (cantrip) through 9. From 0 to 9.
- Magic school (`school`, text): Filter to a single magic school. One of: `abjuration`, `conjuration`, `divination`, `enchantment`, `evocation`, `illusion`, `necromancy`, `transmutation`.
- Name filter (`name`, text): Only return spells whose name contains this text.

**Outputs**

- `count` (number)
- `results` (list)
- `version` (text)

**Example output**

```json
{
  "count": 1,
  "results": [
    {
      "index": "fireball",
      "level": 3,
      "name": "Fireball",
      "url": "/api/2014/spells/fireball"
    }
  ],
  "version": "2014"
}
```

### Search a collection (Open5e)

List or full-text search any Open5e collection (monsters, spells, magic items, documents, and more), including open content from beyond the SRD. Returns a paginated result set with total count and next/previous page links.

**Inputs**

- Collection (`endpoint`, text, required): The Open5e collection to search. One of: `spells`, `spelllist`, `monsters`, `documents`, `backgrounds`, `planes`, `sections`, `feats`, `conditions`, `races`, and 4 more.
- Search text (`search`, text): Full-text search within the collection.
- Sort by (`ordering`, text): Field to sort by; prefix with a hyphen for descending order.
- Page size (`limit`, number): How many results to return per page. From 1 to 500.
- Offset (`offset`, number): How many results to skip (for paging). At least 0.

**Outputs**

- `count` (number)
- `endpoint` (text)
- `next` (text)
- `previous` (text)
- `results` (list)

**Example output**

```json
{
  "count": 1,
  "endpoint": "monsters",
  "next": null,
  "previous": null,
  "results": [
    {
      "cr": 0.25,
      "document__slug": "wotc-srd",
      "name": "Goblin",
      "slug": "goblin"
    }
  ]
}
```

### Search monsters (Open5e)

Search Open5e's monsters with rich filters: full text, challenge rating, creature type, and source document (for example wotc-srd or tob for Tome of Beasts). Returns compact monster summaries.

**Inputs**

- Search text (`search`, text): Full-text search across monster names and text.
- Challenge rating (`challenge_rating`, text): Only return monsters with this challenge rating. One of: `0` (CR 0), `0.125` (CR 1/8), `0.25` (CR 1/4), `0.5` (CR 1/2), `1` (CR 1), `2` (CR 2), `3` (CR 3), `4` (CR 4), `5` (CR 5), `6` (CR 6), and 24 more.
- Creature type (`monster_type`, text): Only return monsters of this creature type. One of: `Aberration`, `Beast`, `Celestial`, `Construct`, `Dragon`, `Elemental`, `Fey`, `Fiend`, `Giant`, `Humanoid`, and 4 more.
- Source document (`document_slug`, text): Only return monsters from this source document's slug (for example wotc-srd, tob, or cc).
- Sort by (`ordering`, text): Field to sort by; prefix with a hyphen for descending order.
- Page size (`limit`, number): How many results to return per page. From 1 to 500.

**Outputs**

- `count` (number)
- `next` (text)
- `previous` (text)
- `results` (list)

**Example output**

```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "alignment": "chaotic evil",
      "armor_class": 19,
      "challenge_rating": "17",
      "cr": 17.0,
      "document__slug": "wotc-srd",
      "document__title": "5e Core Rules",
      "hit_points": 256,
      "name": "Adult Red Dragon",
      "size": "Huge",
      "slug": "adult-red-dragon",
      "subtype": "",
      "type": "Dragon"
    }
  ]
}
```

### Search spells (Open5e)

Search Open5e's spells with rich filters: full text, level, magic school, class, and source document. Returns compact spell summaries.

**Inputs**

- Search text (`search`, text): Full-text search across spell names and text.
- Spell level (`level`, number): Spell level, 0 (cantrip) through 9. From 0 to 9.
- Magic school (`school`, text): Filter to a single magic school. One of: `Abjuration`, `Conjuration`, `Divination`, `Enchantment`, `Evocation`, `Illusion`, `Necromancy`, `Transmutation`.
- Class (`dnd_class`, text): Only return spells this class can cast. One of: `Barbarian`, `Bard`, `Cleric`, `Druid`, `Fighter`, `Monk`, `Paladin`, `Ranger`, `Rogue`, `Sorcerer`, `Warlock`, `Wizard`.
- Source document (`document_slug`, text): Only return spells from this source document's slug (for example wotc-srd).
- Sort by (`ordering`, text): Field to sort by; prefix with a hyphen for descending order.
- Page size (`limit`, number): How many results to return per page. From 1 to 500.

**Outputs**

- `count` (number)
- `next` (text)
- `previous` (text)
- `results` (list)

**Example output**

```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "casting_time": "1 action",
      "concentration": "no",
      "dnd_class": "Sorcerer, Wizard",
      "document__slug": "wotc-srd",
      "document__title": "5e Core Rules",
      "duration": "Instantaneous",
      "level": "3rd-level",
      "level_int": 3,
      "name": "Fireball",
      "range": "150 feet",
      "ritual": "no",
      "school": "Evocation",
      "slug": "fireball"
    }
  ]
}
```
