/planets/41

homecaret-rightplanetscaret-right

41

API Endpoint:

Request:

fetch("https://swapi.info/api/planets/41")
    .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": "Tund",
  "rotation_period": "48",
  "orbital_period": "1770",
  "diameter": "12190",
  "climate": "unknown",
  "gravity": "unknown",
  "terrain": "barren, ash",
  "surface_water": "unknown",
  "population": "0",
  "residents": [
    "https://swapi.info/api/people/50"
  ],
  "films": [],
  "created": "2014-12-20T10:07:29.578000Z",
  "edited": "2014-12-20T20:58:18.489000Z",
  "url": "https://swapi.info/api/planets/41"
}
eye-open
Good