Dungeons and Dragons API

Beginner's Pick Games & Comics / No Auth Required Beginner HTTP
Free to Use 100 per window (99 remaining at test time)
29 F
Measured Score 0 50 100 Speed 2/30 Consistency 1/20 Security 0/20 Browser access 15/15 Transparency 11/15 TESTED 2026-08-10

Overview

The Dungeons and Dragons API provides reference data for D&D 5th Edition, including spells, monsters, classes, equipment, and more from the official System Reference Document (SRD). No authentication is needed, making it instantly accessible for building character sheets, spell lookup tools, or campaign aids. Note that this API currently uses HTTP (not HTTPS).

Beginner Tip

This API uses HTTP instead of HTTPS, so avoid sending sensitive data. Start with /api/spells or /api/monsters to browse available content — each returns a list with an index, name, and URL for detailed lookup.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET http://www.dnd5eapi.co/api/spells/fireball
Result
HTTP 200 · application/json · 1,650 bytes
Response time
1051 ms (median of 3) · fastest 354 ms
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Rate limit
100 per window (99 remaining at test time)
Served by
Heroku
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
index string fireball
name string Fireball
desc array [1 item]
higher_level array [1 item]
range string 150 feet
components array [1 item]
material string A tiny ball of bat guano and sulfur.
ritual boolean false
duration string Instantaneous
concentration boolean false
casting_time string 1 action
level integer 3
damage object {2 fields}
dc object {2 fields}

Captured Response

Captured from a real request to http://www.dnd5eapi.co/api/spells/fireball on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "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 creat…"
  ],
  "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"
  ],
  "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"
  },
  "…": "(6 more fields)"
}

Field Reference

index URL-friendly identifier for the resource (e.g., fireball).
name Display name of the resource (e.g., Fireball).
desc Array of strings describing the spell or item in detail.
level Spell level (0 for cantrips, 1-9 for leveled spells).
url API path to retrieve the full details of this resource.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://www.dnd5eapi.co/docs/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/plain
Not Found

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

404 Not Found The resource index (e.g., spell name) is incorrect or does not exist in the SRD.
Use the list endpoint (e.g., /api/spells) to retrieve valid index values before requesting specific items.
Mixed content error in browser The API uses HTTP while your site may use HTTPS, causing a browser security block.
Make requests from a server-side environment (Node.js) to avoid mixed content restrictions.
CORS error in browser Direct browser requests may be blocked by CORS policy.
Proxy requests through your own server or use a backend environment like Node.js to fetch data.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 2/30
Consistency 1/20
Security 0/20
Browser access 15/15
Transparency 11/15
Endpoint Response Time 1051ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS NO
Category Games & Comics
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →