Middle-earth API — free mock REST API for testing

Fellowship members, quests and artifacts from a fictional fantasy epic. Practice CRUD, Bearer auth, nested resources, pagination and optimistic concurrency.

The Middle-earth API tracks a fellowship, the quests it is assigned and the artifacts it carries. Members join and leave quests, so it is built around association endpoints — the join-table operations that are easy to write and easy to get wrong when the same member is added twice or removed from a quest they were never on.

Base URL: https://funapi.dev/api/middleearth/v1 · 9 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/middleearth/v1/fellowship — List fellowship members (paginated, filter by race). No token, no signup:

curl -i https://funapi.dev/api/middleearth/v1/fellowship

answers 200 OK with:

{
  "page": 1,
  "pageSize": 3,
  "total": 6,
  "totalPages": 2,
  "data": [
    {
      "id": 1,
      "name": "Aldric Underhill",
      "race": "hobbit",
      "skill": "stealth",
      "_v": 1
    },
    {
      "id": 2,
      "name": "Thoren Oakenshield II",
      "race": "dwarf",
      "skill": "axework",
      "_v": 1
    },
    {
      "id": 3,
      "name": "Elarion Swiftarrow",
      "race": "elf",
      "skill": "archery",
      "_v": 1
    }
  ]
}

Open and run this endpoint

What you can practise here

fellowship

six companions, six races

quests

one ring, several detours

artifacts

each bound to a bearer

All 39 mock REST APIs

Use this response elsewhere

Unofficial and fan-made. The Middle-earth 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