← Planets

Mon Cala

Rotation period21
Orbital period398
Diameter11030
Climatetemperate
Gravity1
Terrainoceans, reefs, islands
Surface water100
Population27000000000

Residents

curl

curl https://swapi.build/api/planets/31

JavaScript

fetch('https://swapi.build/api/planets/31').then((r) => r.json())

Python

requests.get('https://swapi.build/api/planets/31').json()

MCP

Connect your agent once:

claude mcp add --transport http swapi-build https://swapi.build/mcp

then call the tool sw_get with:

{"resource":"PLANETS","id":31}
GET /api/planets/31 200
{
  "climate": "temperate",
  "created": "2014-12-18T11:07:01.792000Z",
  "diameter": "11030",
  "edited": "2014-12-20T20:58:18.471000Z",
  "films": [],
  "gravity": "1",
  "name": "Mon Cala",
  "orbital_period": "398",
  "population": "27000000000",
  "residents": [
    "https://swapi.build/api/people/27"
  ],
  "rotation_period": "21",
  "surface_water": "100",
  "terrain": "oceans, reefs, islands",
  "url": "https://swapi.build/api/planets/31"
}