← Planets

Bespin

Rotation period12
Orbital period5110
Diameter118000
Climatetemperate
Gravity1.5 (surface), 1 standard (Cloud City)
Terraingas giant
Surface water0
Population6000000

Residents

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/6').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":6}
GET /api/planets/6 200
{
  "climate": "temperate",
  "created": "2014-12-10T11:43:55.240000Z",
  "diameter": "118000",
  "edited": "2014-12-20T20:58:18.427000Z",
  "films": [
    "https://swapi.build/api/films/2"
  ],
  "gravity": "1.5 (surface), 1 standard (Cloud City)",
  "name": "Bespin",
  "orbital_period": "5110",
  "population": "6000000",
  "residents": [
    "https://swapi.build/api/people/26"
  ],
  "rotation_period": "12",
  "surface_water": "0",
  "terrain": "gas giant",
  "url": "https://swapi.build/api/planets/6"
}