Public APIs
Harry Potter favicon

Harry Potter

Books

API to get data from Harry Potter books, movies and characters.

Harry Potter's website screenshot

About Harry Potter

PotterAPI is a REST API built with Express.js that provides information and images related to the Harry Potter book series, covering books, characters, houses, and spells. Data is available in multiple languages, including English, Spanish, French, Italian, Portuguese, and Ukrainian, accessed by prefixing endpoints with the corresponding two-letter language code.

Each endpoint returns structured data: book endpoints include title, original title, release date, description, page count, and cover image; character endpoints include full name, nickname, Hogwarts house, actor, children, image, and birthdate; house endpoints include name, emoji, founder, colors, and animal; spell endpoints include name and description. Endpoints support query parameters for retrieving a single item by index, limiting and paginating results, and searching, and each also has a /random variant that returns one random item.

The API is deployed as serverless functions and can be run locally for development, with source code, tests, and TypeScript types included in the repository. It is intended for developers building applications that need structured Harry Potter reference data.

Key features

  • REST API for Harry Potter books, characters, houses, and spells data
  • Available in six languages: English, Spanish, French, Italian, Portuguese, Ukrainian
  • Random item endpoint for each resource (e.g. /en/spells/random)
  • Query params for search, pagination, and index-based filtering
  • Interactive Swagger UI documentation
  • Built with Express.js, free and open source under MIT license

Frequently asked questions

Is this API free to use?

Yes, it is a free, open-source REST API released under the MIT license.

What languages does the API support?

Endpoints are available in English, Spanish, French, Italian, Portuguese, and Ukrainian, selected via a language code in the URL path.

What data can I retrieve from the API?

It returns information and images for Harry Potter books, characters, Hogwarts houses, and spells.

How do I query the API, e.g. for search or pagination?

Endpoints accept query params like search, index, max, and page, plus a /random suffix for a random item from any list.

What technology is the API built with and where is it hosted?

It is built with Express.js and deployed as serverless functions on Vercel, with an older Render-hosted URL still available.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product