← Planets

Eriadu

Rotation period24
Orbital period360
Diameter13490
Climatepolluted
Gravity1 standard
Terraincityscape
Surface waterunknown
Population22000000000

Residents

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/21').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":21}
GET /api/planets/21 200
{
  "climate": "polluted",
  "created": "2014-12-10T16:26:54.384000Z",
  "diameter": "13490",
  "edited": "2014-12-20T20:58:18.454000Z",
  "films": [],
  "gravity": "1 standard",
  "name": "Eriadu",
  "orbital_period": "360",
  "population": "22000000000",
  "residents": [
    "https://swapi.build/api/people/12"
  ],
  "rotation_period": "24",
  "surface_water": "unknown",
  "terrain": "cityscape",
  "url": "https://swapi.build/api/planets/21"
}