Harry Potter API — free mock REST API for testing

Houses, students and spells from a fictional wizarding school. Practice CRUD, Bearer auth, nested filtering by house, pagination and optimistic concurrency.

The Harry Potter API models a magic school: four houses with point totals, students sorted into them, and a spell book. Points move between houses, which makes it a natural fit for practising the read-modify-write cycle — and for seeing what happens when two clients try it at the same time.

Base URL: https://funapi.dev/api/wizarding/v1 · 10 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.

Example request and response

GET https://funapi.dev/api/wizarding/v1/houses — List all houses. No token, no signup:

curl -i https://funapi.dev/api/wizarding/v1/houses

answers 200 OK with:

{
  "total": 4,
  "data": [
    {
      "id": 1,
      "name": "Gryffindor",
      "founder": "Godric Gryffindor",
      "traits": [
        "courage",
        "bravery",
        "daring"
      ],
      "element": "fire",
      "points": 472
    },
    {
      "id": 2,
      "name": "Slytherin",
      "founder": "Salazar Slytherin",
      "traits": [
        "ambition",
        "cunning",
        "resourcefulness"
      ],
      "element": "water",
      "points": 452
    },
    {
      "id": 3,
      "name": "Hufflepuff",
      "founder": "Helga Hufflepuff",
      "traits": [
        "patience",
        "loyalty",
        "fairness"
      ],
      "element": "earth",
      "points": 428
    },
    {
      "id": 4,
      "name": "Ravenclaw",
      "founder": "Rowena Ravenclaw",
      "traits": [
        "wisdom",
        "wit",
        "creativity"
      ],
      "element": "air",
      "points": 461
    }
  ]
}

Open and run this endpoint

What you can practise here

houses

four houses, four elements

students

sorted, patronus and all

spells

charms, jinxes, and one unforgivable

All 39 mock REST APIs

Use this response elsewhere

Unofficial and fan-made. The Harry Potter API is a practice API that borrows a theme; it is not affiliated with, sponsored or endorsed by the owners of the names it references, which belong to them. Every record it returns is test data for exercising HTTP behaviour, not an authoritative source on the subject.

Last updated