PotterDB is a free, keyless database of the Harry Potter universe covering books, chapters, characters, movies, potions, and spells, reachable through both a JSON:API-style REST interface (api.potterdb.com) and a GraphQL endpoint. Every resource supports filtering, sorting, sparse fieldsets, and pagination in the JSON:API convention, and the REST side publishes a live OpenAPI schema. It's a community-run, open-source project welcoming Hacktoberfest contributions rather than a commercial offering.
PotterDB's REST side is a genuine JSON:API implementation, not a plain-JSON API with JSON:API-flavored docs: a live GET to /v1/spells?page[size]=1 returned content-type: application/vnd.api+json; charset=utf-8, a data array of resource objects, and a meta.pagination block reporting 345 total spell records at probe time.
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSON, GraphQLResponses can be requested as JSON or GraphQL.
GreatAPIs Score
Score100out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs20/20Machine-readable spec file bundled
Formats15/15Supports 2 response formats
Freshness20/20Verified within 6 months
Embed this badge
<a href="https://greatapis.com/api/potterdb/"><img src="https://greatapis.com/badge/potterdb.svg" alt="Scored 100 on greatapis.com"></a>
Auth quickstart
No API key or signup required — the live probe above returned data with no auth header sent at all.
Page through results with the JSON:API page[size] / page[number] query params (bracket syntax, so URL-encode or use a client that does it for you) rather than any offset/limit pair — confirmed live in the links.next/links.last URLs the API itself returned.
Stored keyNo key stored
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
Servers
https://api.potterdb.com
books4
Books
GET/v1/booksRetrieves a list of books
Parameters
Name
In
Required
Type
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of books
—
GET/v1/books/{book_id}/chapters/{id}Retrieves a chapter of a given book
Parameters
Name
In
Required
Type
book_id
path
yes
—
id
path
yes
—
Responses
Status
Description
Schema
200
A single chapter
—
404
Book or Chapter not found
not_found
GET/v1/books/{id}Retrieves a book
Parameters
Name
In
Required
Type
id
path
yes
—
Responses
Status
Description
Schema
200
A single book
—
404
Book not found
not_found
GET/v1/books/{id}/chaptersRetrieves a list of chapters of a given book
Parameters
Name
In
Required
Type
id
path
yes
—
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of chapters
—
404
Chapter not found
not_found
characters2
Characters
GET/v1/charactersRetrieves a list of characters
Parameters
Name
In
Required
Type
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of characters
—
GET/v1/characters/{id}Retrieves a character
Parameters
Name
In
Required
Type
id
path
yes
—
Responses
Status
Description
Schema
200
A single character
—
404
Character not found
not_found
movies2
Movies
GET/v1/moviesRetrieves a list of movies
Parameters
Name
In
Required
Type
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of movies
—
GET/v1/movies/{id}Retrieves a movie
Parameters
Name
In
Required
Type
id
path
yes
—
Responses
Status
Description
Schema
200
A single movie
—
404
Movie not found
not_found
potions2
Potions
GET/v1/potionsRetrieves a list of potions
Parameters
Name
In
Required
Type
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of potions
—
GET/v1/potions/{id}Retrieves a potion
Parameters
Name
In
Required
Type
id
path
yes
—
Responses
Status
Description
Schema
200
A single potion
—
404
Potion not found
not_found
spells2
Spells
GET/v1/spellsRetrieves a list of spells
Parameters
Name
In
Required
Type
page[size]
query
no
integer
page[number]
query
no
integer
sort
query
no
array
filter
query
no
object
Responses
Status
Description
Schema
200
A list of spells
—
GET/v1/spells/{id}Retrieves a spell
Parameters
Name
In
Required
Type
id
path
yes
—
Responses
Status
Description
Schema
200
A single spell
—
404
Spell not found
not_found
Try it
Developer reference
Base URLhttps://api.potterdb.com/v1
Key endpoints
GET/v1/books
GET/v1/characters
GET/v1/spells
GET/v1/potions
Gotchas & limits
The response content type is application/vnd.api+json, not application/json — confirmed on both the listing probe above and a 404 probe below — so a client that only parses a plain-JSON content type will reject or mishandle every response unless it's told to treat this as JSON anyway.
An unknown id doesn't 200 with an empty body — a live GET to /v1/spells/00000000-0000-0000-0000-000000000000 returned HTTP 404 with the JSON:API error envelope {"errors":[{"status":"404","source":null,"title":"Not Found","detail":"Couldn't find Spell with 'id'=00000000-0000-0000-0000-000000000000"}]}.
Pagination metadata is real and derived from the live dataset: the probe above's meta.pagination reported current: 1, next: 2, last: 345, records: 345, and the links.next/links.last URLs echo the same page numbers back as page[number] query params.
CORS is open: a live GET to /v1/spells with an Origin header returned Access-Control-Allow-Origin: * and Access-Control-Allow-Methods: GET, so this API is callable directly from browser JS on any origin.
Availability
Uptime100%
Median latency822 ms
Last checkUp · 200 · Sep 2026
3 checks since Sep 2026. A person runs this check by hand, not an automated monitor.