← Planets

Toydaria

Rotation period21
Orbital period184
Diameter7900
Climatetemperate
Gravity1
Terrainswamps, lakes
Surface waterunknown
Population11000000

Residents

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/34').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":34}
GET /api/planets/34 200
{
  "climate": "temperate",
  "created": "2014-12-19T17:47:54.403000Z",
  "diameter": "7900",
  "edited": "2014-12-20T20:58:18.476000Z",
  "films": [],
  "gravity": "1",
  "name": "Toydaria",
  "orbital_period": "184",
  "population": "11000000",
  "residents": [
    "https://swapi.build/api/people/40"
  ],
  "rotation_period": "21",
  "surface_water": "unknown",
  "terrain": "swamps, lakes",
  "url": "https://swapi.build/api/planets/34"
}