Introduction
A free, open REST API for the Wizarding World — no key, no signup, no rate limit.
The Hogwarts API serves data from the wizarding world of Harry Potter, Fantastic
Beasts and Hogwarts Legacy as plain JSON over HTTP. It exists so you have something
richer than lorem ipsum and foo@bar.com when you are building, teaching or
demoing something.
Every endpoint is a GET. There is no authentication, no API key and no rate limit.
Base URL
What is in it
| Collection | Records | Endpoint |
|---|---|---|
| Books | 7 | /api/books |
| Movies | 11 | /api/movies |
| Characters | 5,410 | /api/characters |
| Spells | 345 | /api/spells |
| Potions | 168 | /api/potions |
| Creatures | 143 | /api/creatures |
GET /api returns this same directory as JSON, so you can discover the collections
programmatically.
Response shape
Every response is wrapped in a data key. List endpoints add a meta object
describing the current page.
Field names are always snake_case — release_date, box_office, blood_status.
This is part of the API contract and will not change.
Response headers
Every /api response carries three headers. They do nothing useful.
| Header | Value |
|---|---|
X-Sorting-Hat | One of Gryffindor, Hufflepuff, Ravenclaw or Slytherin — re-sorted every request |
X-Wizard-Status | Certified Wizard |
X-Deployment-Location | The Room of Requirement |
Missing data is null, not absent
The source material is uneven: most characters have a name, far fewer have a
patronus. Rather than omitting a field, the API returns null for it. Every record
in a collection therefore has the same keys, and you can rely on the shape.
Do not assume a field is populated just because it exists. On characters, name is
100% filled but patronus is only 4%.
Attribution
Data is compiled from Potter DB and the
Harry Potter Fandom wiki, which is licensed
CC-BY-SA. Every record carries a wiki field linking back to its source article.
Harry Potter and Fantastic Beasts are trademarks of Warner Bros. This is an unofficial fan project with no affiliation to Warner Bros. or J.K. Rowling.

