For Builders & Agents
Public API
“Lore for players. JSON for your tools.”
DND Name Book exposes a free, public JSON endpoint and ships with llms.txt + structured data so AI agents, dice-roller bots, encounter generators, and tabletop tools can integrate without scraping HTML. No authentication. No signup. Output is CC0.
Quick start
curl
curl 'https://www.dndnamebook.com/api/names?race=tabaxi&count=5'JavaScript
const res = await fetch(
'https://www.dndnamebook.com/api/names?race=dragonborn&gender=female&count=10'
);
const data = await res.json();
data.names.forEach(n => console.log(n.full));Endpoint
Query parameters
| Param | Required | Description |
|---|---|---|
race | Required | Race slug. One of: `dragonborn`, `tiefling`, `tabaxi`, `firbolg`, `kenku`, `harengon`, `owlin`, `tortle`. |
count | Optional | Integer 1–100. Default 5. |
gender | Optional | any, male, or female. Default any. Ignored for races without gendered names (tabaxi, kenku). |
startsWith | Optional | Up to 3 characters. Filters generated names that begin with this prefix. Falls back to seed names if no markov match. |
surname | Optional | true/false. Default depends on race — tortle and kenku have no surnames. |
Rate limits
Rate limits are per IP, sliding window. No authentication or API key required. Designed to be generous for any honest use, tight enough to stop runaway scrapers.
| Tier | Limit | Window |
|---|---|---|
burst | 60 requests | per minute |
daily | 5,000 requests | per 24 hours |
When exceeded, the API returns HTTP 429 with these response headers: Retry-After (seconds), X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (ms epoch), X-RateLimit-Tier (burst or daily). The JSON body includes retryAfterSeconds for convenience. Need more? Email us — happy to whitelist legitimate high-volume use.
Response shape
{
"race": "dragonborn",
"raceDisplayName": "Dragonborn",
"count": 5,
"gender": "any",
"includeSurname": true,
"surnameLabel": "Clan",
"names": [
{ "given": "Akvash", "surname": "Emberforge", "full": "Akvash Emberforge" },
{ "given": "Yssira", "surname": "Stormcoil", "full": "Yssira Stormcoil" }
],
"attribution": {
"source": "https://www.dndnamebook.com",
"license": "CC0 — names produced by this API are free for any use."
}
}Errors return HTTP 4xx with { error: { code, message } }. Error codes: missing_race, invalid_race, invalid_count, invalid_gender, invalid_startsWith, rate_limit_exceeded (HTTP 429 — see Rate limits).
Built for AI agents
Whether you're building an LLM-powered DM assistant, a Discord bot, a Foundry VTT module, or a Cursor / Claude Code workflow, this site is engineered to be usable without a browser. Concrete provisions:
- llms.txtPlain-Markdown site description at /llms.txt — every race, every URL, every API parameter, every paragraph of lore. Drop it into your agent's context once and it knows the whole site.
- Schema.org structured dataEach generator page emits
WebApplication+BreadcrumbList+FAQPageJSON-LD in a single@graph. - Stable selectorsEvery interactive element carries a
data-testid(e.g.generate-button,name-result). Each generated name carriesdata-name,data-given,data-surname, anddata-raceattributes for direct extraction. - ARIA-clean DOM
role="radiogroup",aria-checked,aria-live="polite"on results, descriptivearia-labelon every control. The accessibility tree maps cleanly to agent perception. - Server-rendered contentAll race lore, naming conventions, and tool UI are in the initial HTML. No JS-only views. Works for crawlers and headless fetches.
- No anti-bot patternsNo cookie banners gating content. No CAPTCHAs. No login walls. No hover-only interactions. No client-side rendering blockers.
Licensing & attribution
Names returned by the API are CC0 — you may use them in any project, commercial or otherwise, without attribution. Attribution to dndnamebook.com is appreciated but not required. Race lore prose on individual generator pages is © DND Name Book and may not be reproduced verbatim.
Building something with this?
We'd love to know. Drop a line at hello@dndnamebook.com — happy to add features, fix edge cases, or stabilize behaviors you depend on. If you're working on an MCP server integration, even more so.