← Planets

Endor

Rotation period18
Orbital period402
Diameter4900
Climatetemperate
Gravity0.85 standard
Terrainforests, mountains, lakes
Surface water8
Population30000000

curl

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

JavaScript

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

Python

requests.get('https://swapi.build/api/planets/7').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":7}
GET /api/planets/7 200
{
  "climate": "temperate",
  "created": "2014-12-10T11:50:29.349000Z",
  "diameter": "4900",
  "edited": "2014-12-20T20:58:18.429000Z",
  "films": [
    "https://swapi.build/api/films/3"
  ],
  "gravity": "0.85 standard",
  "name": "Endor",
  "orbital_period": "402",
  "population": "30000000",
  "residents": [
    "https://swapi.build/api/people/30"
  ],
  "rotation_period": "18",
  "surface_water": "8",
  "terrain": "forests, mountains, lakes",
  "url": "https://swapi.build/api/planets/7"
}