Dungeons and Dragons API

⭐ Beginner's Pick Games & Comics / No Auth Required Beginner HTTP
Free to Use Varies (check documentation)

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.

Available Data

IP address details
latitude and longitude
city and country
timezone
ISP information

Example Response

JSON Response
{
  "id": 1,
  "name": "Dungeons and Dragons",
  "data": "Reference for 5th edition spells, classes, monsters, and more",
  "source": "Dungeons and Dragons"
}

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

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
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.

Common Errors & Troubleshooting

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.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 5/15
🛠 Developer XP 12/20
✓ Reliability 7/15
Response Time 35ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS NO
Category Games & Comics
Difficulty Beginner
Verified: 2026-04-07

Similar APIs

View All →