Harry Potter API

App · Film, TV & Fandom · 8 actions

Look up characters and spells from the wizarding world using the free, keyless Harry Potter API (HP-API): search or page through 400+ characters with their house, species, ancestry, patronus, wand, and the actor who played them, narrow to Hogwarts students, staff, or a single house, and search 70+ spells by incantation or by what they do. No account or API key required. Disclaimer: this is an independent integration with the community-run HP-API (hp-api.onrender.com). It is not affiliated with, endorsed by, or sponsored by J.K. Rowling, Warner Bros., or Pottermore; Harry Potter and all related names, characters, and trademarks are the property of their respective owners.

Actions

ActionWhat it does
Get a characterGet a single character by their API id, the UUID any list or search action returns as 'id'.
List charactersList every character in the Harry Potter API: witches, wizards, muggles, ghosts, and magical creatures.
List characters by houseList the characters sorted into one Hogwarts house: Gryffindor, Hufflepuff, Ravenclaw, or Slytherin.
List Hogwarts staffList every Hogwarts staff member in the API: professors, the headmaster, the groundskeeper, and the caretaker.
List Hogwarts studentsList every Hogwarts student in the API.
List spellsList every spell in the API, each with its incantation and a one-line description of what it does.
Search charactersFind characters whose name or alternate names contain the search text, matched case-insensitively.
Search spellsFind spells whose incantation or description contains the search text, matched case-insensitively.

Get a character

Get a single character by their API id, the UUID any list or search action returns as 'id'. Searching by name first is the usual way to find that id.

Inputs

Character IDcharacter_idtextRequired
The character's API id, such as '9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8' (Harry Potter). Read it off the 'id' field of a list or search result.

Outputs

characterobject
The matching character.
Example output
{
  "character": {
    "actor": "Daniel Radcliffe",
    "alive": true,
    "alternate_actors": [],
    "alternate_names": [
      "The Boy Who Lived",
      "The Chosen One",
      "Undesirable No. 1",
      "Potty"
    ],
    "ancestry": "half-blood",
    "dateOfBirth": "31-07-1980",
    "eyeColour": "green",
    "gender": "male",
    "hairColour": "black",
    "hogwartsStaff": false,
    "hogwartsStudent": true,
    "house": "Gryffindor",
    "id": "9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8",
    "image": "https://ik.imagekit.io/hpapi/harry.jpg",
    "name": "Harry Potter",
    "patronus": "stag",
    "species": "human",
    "wand": {
      "core": "phoenix tail feather",
      "length": 11,
      "wood": "holly"
    },
    "wizard": true,
    "yearOfBirth": 1980
  }
}

List characters

List every character in the Harry Potter API: witches, wizards, muggles, ghosts, and magical creatures. Each record includes their house, species, ancestry, patronus, wand, the actor who played them, and a portrait URL. Use Limit and Offset to take a slice of the 400+ records.

Inputs

Limitlimitnumber
How many records to return at most (defaults to all of them). The API sends the whole collection in one response, so this trims it afterwards.At least 1.
Offsetoffsetnumber
How many records to skip before returning any (defaults to none). Pair it with Limit to walk a large collection a chunk at a time.At least 0.

Outputs

characterslist
The characters in this slice.
countnumber
How many characters this response carries.
totalnumber
How many characters matched before Limit/Offset.
Example output
{
  "characters": [
    {
      "actor": "Daniel Radcliffe",
      "alive": true,
      "alternate_actors": [],
      "alternate_names": [
        "The Boy Who Lived",
        "The Chosen One",
        "Undesirable No. 1",
        "Potty"
      ],
      "ancestry": "half-blood",
      "dateOfBirth": "31-07-1980",
      "eyeColour": "green",
      "gender": "male",
      "hairColour": "black",
      "hogwartsStaff": false,
      "hogwartsStudent": true,
      "house": "Gryffindor",
      "id": "9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8",
      "image": "https://ik.imagekit.io/hpapi/harry.jpg",
      "name": "Harry Potter",
      "patronus": "stag",
      "species": "human",
      "wand": {
        "core": "phoenix tail feather",
        "length": 11,
        "wood": "holly"
      },
      "wizard": true,
      "yearOfBirth": 1980
    }
  ],
  "count": 1,
  "total": 437
}

List characters by house

List the characters sorted into one Hogwarts house: Gryffindor, Hufflepuff, Ravenclaw, or Slytherin. Characters the books never sorted (muggles, creatures, other schools' students) belong to no house and appear in none of the four.

Inputs

HousehousetextRequired
Which Hogwarts house to list.One of: gryffindor, hufflepuff, ravenclaw, slytherin. Default: gryffindor.
Limitlimitnumber
How many records to return at most (defaults to all of them). The API sends the whole collection in one response, so this trims it afterwards.At least 1.
Offsetoffsetnumber
How many records to skip before returning any (defaults to none). Pair it with Limit to walk a large collection a chunk at a time.At least 0.

Outputs

characterslist
The house's characters in this slice.
countnumber
How many characters this response carries.
housetext
The house that was listed, canonically spelled.
totalnumber
How many characters matched before Limit/Offset.
Example output
{
  "characters": [
    {
      "actor": "Daniel Radcliffe",
      "alive": true,
      "alternate_actors": [],
      "alternate_names": [
        "The Boy Who Lived",
        "The Chosen One",
        "Undesirable No. 1",
        "Potty"
      ],
      "ancestry": "half-blood",
      "dateOfBirth": "31-07-1980",
      "eyeColour": "green",
      "gender": "male",
      "hairColour": "black",
      "hogwartsStaff": false,
      "hogwartsStudent": true,
      "house": "Gryffindor",
      "id": "9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8",
      "image": "https://ik.imagekit.io/hpapi/harry.jpg",
      "name": "Harry Potter",
      "patronus": "stag",
      "species": "human",
      "wand": {
        "core": "phoenix tail feather",
        "length": 11,
        "wood": "holly"
      },
      "wizard": true,
      "yearOfBirth": 1980
    }
  ],
  "count": 1,
  "house": "Gryffindor",
  "total": 47
}

List Hogwarts staff

List every Hogwarts staff member in the API: professors, the headmaster, the groundskeeper, and the caretaker.

Inputs

Limitlimitnumber
How many records to return at most (defaults to all of them). The API sends the whole collection in one response, so this trims it afterwards.At least 1.
Offsetoffsetnumber
How many records to skip before returning any (defaults to none). Pair it with Limit to walk a large collection a chunk at a time.At least 0.

Outputs

characterslist
The staff members in this slice.
countnumber
How many characters this response carries.
totalnumber
How many characters matched before Limit/Offset.
Example output
{
  "characters": [
    {
      "actor": "Dame Maggie Smith",
      "alive": true,
      "alternate_actors": [],
      "alternate_names": [],
      "ancestry": "half-blood",
      "dateOfBirth": "04-10-1925",
      "eyeColour": "",
      "gender": "female",
      "hairColour": "black",
      "hogwartsStaff": true,
      "hogwartsStudent": false,
      "house": "Gryffindor",
      "id": "ca3827f0-375a-4891-aaa5-f5e8a5bad225",
      "image": "https://ik.imagekit.io/hpapi/mcgonagall.jpg",
      "name": "Minerva McGonagall",
      "patronus": "tabby cat",
      "species": "human",
      "wand": {
        "core": "dragon heartstring",
        "length": 9.5,
        "wood": "fir"
      },
      "wizard": true,
      "yearOfBirth": 1925
    }
  ],
  "count": 1,
  "total": 25
}

List Hogwarts students

List every Hogwarts student in the API. Same character records as the full catalog, narrowed to those flagged as students.

Inputs

Limitlimitnumber
How many records to return at most (defaults to all of them). The API sends the whole collection in one response, so this trims it afterwards.At least 1.
Offsetoffsetnumber
How many records to skip before returning any (defaults to none). Pair it with Limit to walk a large collection a chunk at a time.At least 0.

Outputs

characterslist
The students in this slice.
countnumber
How many characters this response carries.
totalnumber
How many characters matched before Limit/Offset.
Example output
{
  "characters": [
    {
      "actor": "Emma Watson",
      "alive": true,
      "alternate_actors": [],
      "alternate_names": [
        "Hermy",
        "Know-it-all",
        "Miss Grant",
        "Herm-own-ninny"
      ],
      "ancestry": "muggleborn",
      "dateOfBirth": "19-09-1979",
      "eyeColour": "brown",
      "gender": "female",
      "hairColour": "brown",
      "hogwartsStaff": false,
      "hogwartsStudent": true,
      "house": "Gryffindor",
      "id": "4c7e6819-a91a-45b2-a454-f931e4a7cce3",
      "image": "https://ik.imagekit.io/hpapi/hermione.jpeg",
      "name": "Hermione Granger",
      "patronus": "otter",
      "species": "human",
      "wand": {
        "core": "dragon heartstring",
        "length": 10.75,
        "wood": "vine"
      },
      "wizard": true,
      "yearOfBirth": 1979
    }
  ],
  "count": 1,
  "total": 103
}

List spells

List every spell in the API, each with its incantation and a one-line description of what it does.

Inputs

Limitlimitnumber
How many records to return at most (defaults to all of them). The API sends the whole collection in one response, so this trims it afterwards.At least 1.
Offsetoffsetnumber
How many records to skip before returning any (defaults to none). Pair it with Limit to walk a large collection a chunk at a time.At least 0.

Outputs

countnumber
How many spells this response carries.
spellslist
The spells in this slice.
totalnumber
How many spells matched before Limit.
Example output
{
  "count": 1,
  "spells": [
    {
      "description": "Illuminates the caster's wand",
      "id": "3b7a10ce-3339-4a36-9493-292c8775e47b",
      "name": "Lumos"
    }
  ],
  "total": 77
}

Search characters

Find characters whose name or alternate names contain the search text, matched case-insensitively. The API has no search endpoint, so the whole catalog is fetched and filtered for you. This is how a workflow turns a name into the id the 'Get a character' action needs.

Inputs

Search textquerytextRequired
Text to look for in a character's name or alternate names, for example 'weasley' or 'the chosen one'.
Limitlimitnumber
How many matches to return at most (defaults to all of them).At least 1.

Outputs

characterslist
The matching characters.
countnumber
How many characters this response carries.
totalnumber
How many characters matched before Limit/Offset.
Example output
{
  "characters": [
    {
      "actor": "Daniel Radcliffe",
      "alive": true,
      "alternate_actors": [],
      "alternate_names": [
        "The Boy Who Lived",
        "The Chosen One",
        "Undesirable No. 1",
        "Potty"
      ],
      "ancestry": "half-blood",
      "dateOfBirth": "31-07-1980",
      "eyeColour": "green",
      "gender": "male",
      "hairColour": "black",
      "hogwartsStaff": false,
      "hogwartsStudent": true,
      "house": "Gryffindor",
      "id": "9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8",
      "image": "https://ik.imagekit.io/hpapi/harry.jpg",
      "name": "Harry Potter",
      "patronus": "stag",
      "species": "human",
      "wand": {
        "core": "phoenix tail feather",
        "length": 11,
        "wood": "holly"
      },
      "wizard": true,
      "yearOfBirth": 1980
    }
  ],
  "count": 1,
  "total": 1
}

Search spells

Find spells whose incantation or description contains the search text, matched case-insensitively. Because the description is searched too, a workflow can look a spell up by what it does ('unlock') as easily as by its name ('Alohomora').

Inputs

Search textquerytextRequired
Text to look for in a spell's incantation or description, for example 'alohomora' or 'unlock'.
Limitlimitnumber
How many matches to return at most (defaults to all of them).At least 1.

Outputs

countnumber
How many spells this response carries.
spellslist
The matching spells.
totalnumber
How many spells matched before Limit.
Example output
{
  "count": 1,
  "spells": [
    {
      "description": "Unlocks objects",
      "id": "c9d2f389-a419-4f7e-8d3d-254959638019",
      "name": "Alohomora"
    }
  ],
  "total": 1
}

On this page