Superhero API

Original heroes and villains with powers, teams and nemeses. Practice nested resources (/heroes/{id}/nemesis), filtering and role-based auth.

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

heroes

capes, powers and their sworn enemies

The Superhero API is the smallest resource tree in the catalog and the clearest one for practising nested routes: heroes own powers, and powers are addressed underneath their hero rather than in a flat collection. If you are writing a client that has to build URLs from parent ids, or tests that must clean up children before parents, this is the shape to rehearse on.

What you can practise here

Example request and response

GET https://funapi.dev/api/superheroes/v1/heroes — List heroes (paginated, filterable). No token, no signup:

curl -i https://funapi.dev/api/superheroes/v1/heroes

Response: 200 OK

{
  "page": 1,
  "pageSize": 4,
  "total": 8,
  "totalPages": 2,
  "data": [
    {
      "id": 1,
      "name": "Captain Volt",
      "alias": "Deniz Aksoy",
      "power": "electricity",
      "team": "Alpha Squad",
      "nemesisId": 5,
      "_v": 1
    },
    {
      "id": 2,
      "name": "Night Owl",
      "alias": "Sam Reyes",
      "power": "night vision",
      "team": "Alpha Squad",
      "nemesisId": 6,
      "_v": 1
    },
    {
      "id": 3,
      "name": "Aqua Comet",
      "alias": "Mira Chen",
      "power": "hydrokinesis",
      "team": "Freelance",
      "nemesisId": null,
      "_v": 1
    },
    {
      "id": 4,
      "name": "Turbo Tortoise",
      "alias": "unknown",
      "power": "super speed (eventually)",
      "team": "Freelance",
      "nemesisId": 7,
      "_v": 1
    }
  ]
}

Open and run this endpoint

All 55 mock REST APIs

Use this response elsewhere

Last updated