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 19 Aug 2026

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 19 Aug 2026, 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

Alternatives to D&D 5e API

If D&D 5e API does not fit, these game & anime apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
PokéAPIFree Pokémon API with no key: stats, types, abilities, moves, evolutions and sprites for 1,000+ species. The most popular API for learning REST. Tested example.No keyYes19 Aug 2026
Rick and Morty APIFree Rick and Morty API with no key: 800+ characters, episodes and locations with images, filtering and pagination. REST and GraphQL. Tested example.No keyYes19 Aug 2026
Jikan (MyAnimeList)Free unofficial MyAnimeList API with no key: anime and manga data, scores, characters, staff and seasonal listings. Tested curl example and live JSON.No keyYes19 Aug 2026
Deck of CardsFree playing card API with no key: shuffle decks, draw cards, manage piles and get card images. Stateful deck ids. Tested curl example and live JSON.No keyYes19 Aug 2026
Eight Ball APIFree Magic 8 Ball API with no key: random fortune readings, a sentiment-biased variant that reacts to the question asked, and multi-language locales. Tested example.No keyNo21 Aug 2026
FFXIV CollectFree Final Fantasy XIV API with no key: mounts, minions, achievements, emotes, orchestrion rolls and titles with ownership rates and sources. Tested.No keyNo20 Aug 2026
All Game & Anime APIs

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 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.