Sitelet https://funapi.dev/docs/galaxy

Star Wars API — free mock REST API for testing

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

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.

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.

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

answers 200 OK with:

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

What you can practise here

planets

five worlds, one swamp

characters

rebels, empire, and neutral parties

starships

freighters to capital ships

All 39 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