← Planets

Socorro

Rotation period20
Orbital period326
Diameter0
Climatearid
Gravity1 standard
Terraindeserts, mountains
Surface waterunknown
Population300000000

Residents

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/30').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":30}
GET /api/planets/30 200
{
  "climate": "arid",
  "created": "2014-12-15T12:56:31.121000Z",
  "diameter": "0",
  "edited": "2014-12-20T20:58:18.469000Z",
  "films": [],
  "gravity": "1 standard",
  "name": "Socorro",
  "orbital_period": "326",
  "population": "300000000",
  "residents": [
    "https://swapi.build/api/people/25"
  ],
  "rotation_period": "20",
  "surface_water": "unknown",
  "terrain": "deserts, mountains",
  "url": "https://swapi.build/api/planets/30"
}