/planets/29

homecaret-rightplanetscaret-right

29

API Endpoint:

Request:

fetch("https://swapi.info/api/planets/29")
    .then((res) => res.json()) // Parse the JSON content from the API to be consumed
    .then((json) => console.log(json)) // Log the JSON response to your console
    .catch((error) => console.error(error)) // Log the API error (if any) to your console

Result:

{
  "name": "Trandosha",
  "rotation_period": "25",
  "orbital_period": "371",
  "diameter": "0",
  "climate": "arid",
  "gravity": "0.62 standard",
  "terrain": "mountains, seas, grasslands, deserts",
  "surface_water": "unknown",
  "population": "42000000",
  "residents": [
    "https://swapi.info/api/people/24"
  ],
  "films": [],
  "created": "2014-12-15T12:53:47.695000Z",
  "edited": "2014-12-20T20:58:18.468000Z",
  "url": "https://swapi.info/api/planets/29"
}
eye-open
Good