BYTETOOLS

PotterAPI (Fedeperin) API

Free Harry Potter API with no key: books, characters, houses and spells in eight languages, with covers and images. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the PotterAPI (Fedeperin) API?

PotterAPI is a free, key-free REST API for the Harry Potter universe. It serves the seven books with covers and release dates, characters with images and house affiliations, the four Hogwarts houses and a spell list — all available in eight languages selected by a path segment.

Fan-built Harry Potter APIs have a poor survival rate: several of the best-known ones ran on free Heroku dynos and went dark when that tier ended. This one is deployed on modern serverless hosting and has stayed up, which matters more than feature count when you are picking a dependency for a tutorial or a portfolio project.

Its distinguishing feature is language support. The locale is the first path segment — `/en/books`, `/es/books`, `/fr/books` — covering English, Spanish, French, Italian, Portuguese, Ukrainian, Romanian and Japanese, with titles and descriptions translated rather than just the field names. For a teaching API, that makes it usable well beyond an English-speaking audience.

Quick facts

Base URL
https://potterapi-fedeperin.vercel.app
Authentication
No API key, no account, no rate limiting. The project is open source on GitHub.
Rate limit
No published limit. The dataset is small and served from cache.
Pricing
Free and open source.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the PotterAPI (Fedeperin) API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. List the Harry Potter books in English

GET https://potterapi-fedeperin.vercel.app/en/books

curl
curl 'https://potterapi-fedeperin.vercel.app/en/books'
JavaScript (fetch)
const res = await fetch("https://potterapi-fedeperin.vercel.app/en/books");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://potterapi-fedeperin.vercel.app/en/books", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "number": 1,
    "title": "Harry Potter and the Sorcerer's Stone",
    "originalTitle": "Harry Potter and the Sorcerer's Stone",
    "releaseDate": "Jun 26, 1997",
    "description": "On his birthday, Harry Potter discovers that he is the son of two well-known wizards, from whom he has inherited magical powers. He must attend a famous school of magic and sorcery, where he establishes a friendship with two young men who will become his companions on his adventure. During his first year at Hogwarts, he discovers that a malevolent and powerful wizard named Voldemort is in search of a philosopher's stone that prolongs the life of its owner.",
    "pages": 223,
    "cover": "https://raw.githubusercontent.com/fedeperin/potterapi/main/public/images/covers/1.png",
    "index": 0
  },
  {
    "number": 2,
    "title": "Harry Potter and the Chamber of Secrets",
    "originalTitle": "Harry Potter and the Chamber of Secrets",
    "releaseDate": "Jul 2, 1998",
    "description": "Harry Potter and the sophomores investigate a malevolent threat to their Hogwarts classmates, a menacing beast that hides within the castle.",
    "pages": 251,
    "cover": "https://raw.githubusercontent.com/fedeperin/potterapi/main/public/images/covers/2.png",
    "index": 1
  },
  {
    "number": 3,
    "title": "Harry Potter and the Prisoner of Azkaban",
    "originalTitle": "Harry Potter and the Prisoner of Azkaban",
    "releaseDate": "Jul 8, 1999",
    "description": "Harry's third year of studies at Hogwarts is threatened by Sirius Black's escape from Azkaban prison. Apparently, it is a danger

Parameters

ParameterTypeRequiredDescription
langpath segmentRequiredTwo-letter language code: `en`, `es`, `fr`, `it`, `pt`, `uk`, `ro` or `ja`. en
resourcepath segmentRequired`books`, `characters`, `houses` or `spells`. books
indexqueryOptionalReturn a single item by its zero-based index instead of the whole list. 0
searchqueryOptionalFilter results by name or title. Ron
maxqueryOptionalLimit how many results are returned. 5

Response fields

numberinteger
Position in the series, 1 through 7 for books.
titlestring
Book title in the requested language.
originalTitlestring
The original English title, which differs from `title` for translated locales — and even in English, since the first book has different UK and US titles.
releaseDatestring
Publication date as a human-readable string, not an ISO timestamp. Parse it defensively.
descriptionstring
Plot summary in the requested language.
pagesinteger
Page count for that edition.
coverstring
URL to the book's cover image.

What you can build with the PotterAPI (Fedeperin) API

  • Build a Harry Potter fan site or character browser
  • Provide a friendly dataset for a front-end tutorial or coding exercise
  • Add a character or spell lookup to a Discord bot
  • Demonstrate internationalisation in a demo app using the language path segment

Common errors and how to fix them

404

Unknown language code or resource name.

Fix: Language codes are lowercase two-letter and come first in the path: `/en/books`, never `/books/en`.

Empty array

The `search` term matched nothing.

Fix: Search is a simple substring match and is case-sensitive in places. Try a shorter fragment.

Unparseable date

`releaseDate` is a display string like "Jun 26, 1997".

Fix: It is not ISO 8601. Parse it explicitly rather than passing it to a strict date constructor.

PotterAPI (Fedeperin) API — frequently asked questions

Is this Harry Potter API free and does it need a key?

Yes, free with no API key, no account and no rate limiting. It is open source on GitHub, so you can also run your own copy.

Which languages does the API support?

Eight: English, Spanish, French, Italian, Portuguese, Ukrainian, Romanian and Japanese. The language is the first path segment, and titles and descriptions are genuinely translated rather than only the field names.

Why do title and originalTitle differ?

`originalTitle` is the original English title. It differs in translated locales, and even in English, because the first book was published as "Philosopher's Stone" in the UK and "Sorcerer's Stone" in the US.

Are the other Harry Potter APIs still working?

Several well-known ones were hosted on free Heroku dynos and stopped working when that tier was retired. This one runs on current serverless hosting, which is why it was chosen for this directory over the more frequently linked alternatives.

Tools that pair with this API

PotterAPI (Fedeperin) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.