Superhero API — free mock REST API for testing

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

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.

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.

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

answers 200 OK with:

{
  "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

What you can practise here

heroes

capes, powers and their sworn enemies

All 39 mock REST APIs

Use this response elsewhere

Last updated