← Planets

Corellia

Rotation period25
Orbital period329
Diameter11000
Climatetemperate
Gravity1 standard
Terrainplains, urban, hills, forests
Surface water70
Population3000000000

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/22').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":22}
GET /api/planets/22 200
{
  "climate": "temperate",
  "created": "2014-12-10T16:49:12.453000Z",
  "diameter": "11000",
  "edited": "2014-12-20T20:58:18.456000Z",
  "films": [],
  "gravity": "1 standard",
  "name": "Corellia",
  "orbital_period": "329",
  "population": "3000000000",
  "residents": [
    "https://swapi.build/api/people/14",
    "https://swapi.build/api/people/18"
  ],
  "rotation_period": "25",
  "surface_water": "70",
  "terrain": "plains, urban, hills, forests",
  "url": "https://swapi.build/api/planets/22"
}