BYTETOOLS

D&D 5e API

Free Dungeons & Dragons 5th Edition API with no key: spells, monsters, classes, races, equipment and rules from the SRD. Tested curl example and live JSON.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the D&D 5e API?

The D&D 5e API is a free, key-free REST API serving Dungeons & Dragons 5th Edition reference data from the System Reference Document — spells, monsters, classes, races, equipment, features and rules.

This API covers the System Reference Document, the portion of D&D 5th Edition that Wizards of the Coast released under an open licence. That is an important distinction: SRD content is legally reusable, while material from the full published books is not included and should not be assumed available.

One practical note that older API lists get wrong: the endpoints are now versioned by ruleset year. Spells live under `/api/2014/spells/...` rather than the older unversioned path, which is exactly the kind of silent breakage that makes verified examples worth having.

Quick facts

Base URL
https://www.dnd5eapi.co/api
Authentication
No key required. Content is limited to the openly licensed SRD.
Rate limit
No published limit.
Pricing
Free. SRD content under the Open Gaming Licence.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the D&D 5e API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Fetch a spell's full rules text

GET https://www.dnd5eapi.co/api/2014/spells/fireball

curl
curl 'https://www.dnd5eapi.co/api/2014/spells/fireball'
JavaScript (fetch)
const res = await fetch("https://www.dnd5eapi.co/api/2014/spells/fireball");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.dnd5eapi.co/api/2014/spells/fireball", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "index": "fireball",
  "name": "Fireball",
  "desc": [
    "A bright streak flashes from your pointing finger to a point you choose within range and then blossoms with a low roar into an explosion of flame. Each creature in a 20-foot-radius sphere centered on that point must make a dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one.",
    "The fire spreads around corners. It ignites flammable objects in the area that aren't being worn or carried."
  ],
  "higher_level": [
    "When you cast this spell using a spell slot of 4th level or higher, the damage increases by 1d6 for each slot level above 3rd."
  ],
  "range": "150 feet",
  "components": [
    "V",
    "S",
    "M"
  ],
  "material": "A tiny ball of bat guano and sulfur.",
  "ritual": false,
  "duration": "Instantaneous",
  "concentration": false,
  "casting_time": "1 action",
  "level": 3,
  "damage": {
    "damage_type": {
      "index": "fire",
      "name": "Fire",
      "url": "/api/2014/damage-types/fire"
    },
    "damage_at_slot_level": {
      "3": "8d6",
      "4": "9d6",
      "5": "10d6",
      "6": "11d6",
      "7": "12d6",
      "8": "13d6",
      "9": "14d6"
    }
  },
  "dc": {
    "dc_type": {
      "index": "dex",
      "name": "DEX",
      "url": "/api/2014/ability-scores/dex"
    },
    "dc_success": "half"
  },
  "area_of_effect": {
    "type": "sphere",
    "size": 20
  },
  "school": {
    "index": "evocation",
    "name": "Evocation",
    "url": "/api/2014/magic-schools/evocation"
  },
  "classes": [
    {
      "index": "

Parameters

ParameterTypeRequiredDescription
<version>pathRequiredRuleset version segment, currently `2014`. 2014
<resource>pathRequiredspells, monsters, classes, races, equipment and more. spells
<index>pathOptionalResource index, lowercase and hyphenated. fireball

Response fields

index / namestring
URL-safe identifier and display name.
descarray
Rules text as an array of paragraphs.
higher_levelarray
Additional effect when cast with a higher-level slot.
range / duration / casting_timestring
Core spell mechanics.
damageobject
Damage type and per-level scaling, where applicable.
classesarray
Classes that can use the resource, with links.

What you can build with the D&D 5e API

  • Build a spell and monster lookup tool for players and DMs
  • Create a character builder using SRD classes and races
  • Generate random encounters from the monster list
  • Add rules reference search to a virtual tabletop

Common errors and how to fix them

404 on /api/spells/fireball

The unversioned path is no longer served.

Fix: Use the versioned path /api/2014/spells/fireball — many older tutorials and API lists still show the old form.

Resource not found

Index names are lowercase and hyphenated.

Fix: Use `fireball`, `magic-missile` — not display capitalisation.

D&D 5e API — frequently asked questions

Is the D&D 5e API free?

Yes, completely free with no API key. It serves System Reference Document content, which Wizards of the Coast released under an open licence.

Why does my old D&D API URL return 404?

The API added ruleset versioning, so spells now live at /api/2014/spells/{index} rather than the older unversioned path. Many published examples still show the outdated URL.

Does it include content from all the D&D books?

No, only the SRD — the openly licensed subset. Material exclusive to published sourcebooks is not included and is not legally redistributable.

How are resource names formatted?

As lowercase hyphenated indexes, so Magic Missile is `magic-missile`. Use the list endpoints to discover valid index values.

Tools that pair with this API

D&D 5e API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.