← Planets

Chandrila

Rotation period20
Orbital period368
Diameter13500
Climatetemperate
Gravity1
Terrainplains, forests
Surface water40
Population1200000000

Residents

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/32').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":32}
GET /api/planets/32 200
{
  "climate": "temperate",
  "created": "2014-12-18T11:11:51.872000Z",
  "diameter": "13500",
  "edited": "2014-12-20T20:58:18.472000Z",
  "films": [],
  "gravity": "1",
  "name": "Chandrila",
  "orbital_period": "368",
  "population": "1200000000",
  "residents": [
    "https://swapi.build/api/people/28"
  ],
  "rotation_period": "20",
  "surface_water": "40",
  "terrain": "plains, forests",
  "url": "https://swapi.build/api/planets/32"
}