Star Wars-themed Mock API (unofficial)

Characters, homeworlds and starships from a fictional space opera. Practice CRUD, Bearer auth, nested resources, pagination and optimistic concurrency.

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

planets

five worlds, one swamp

characters

rebels, empire, and neutral parties

starships

freighters to capital ships

The Star Wars API covers characters, planets and starships — three related collections with enough cross-references to make filtering interesting. It is a good first stop for anyone building a client that has to resolve ids across resources and page through more records than fit in a single response.

What you can practise here

Example request and response

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

curl -i https://funapi.dev/api/galaxy/v1/planets

Response: 200 OK

{
  "total": 5,
  "data": [
    {
      "id": 1,
      "name": "Tatooine",
      "climate": "arid",
      "population": 200000
    },
    {
      "id": 2,
      "name": "Hoth",
      "climate": "frozen",
      "population": 0
    },
    {
      "id": 3,
      "name": "Dagobah",
      "climate": "murky",
      "population": 0
    },
    {
      "id": 4,
      "name": "Coruscant",
      "climate": "temperate",
      "population": 1000000000
    },
    {
      "id": 5,
      "name": "Endor",
      "climate": "temperate",
      "population": 30000000
    }
  ]
}

Open and run this endpoint

All 55 mock REST APIs

Use this response elsewhere

How this Star Wars API differs from SWAPI

Unofficial and fan-made. The Star Wars 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