/planets/18

homecaret-rightplanetscaret-right

18

API Endpoint:

Request:

fetch("https://swapi.info/api/planets/18")
    .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": "Cato Neimoidia",
  "rotation_period": "25",
  "orbital_period": "278",
  "diameter": "0",
  "climate": "temperate, moist",
  "gravity": "1 standard",
  "terrain": "mountains, fields, forests, rock arches",
  "surface_water": "unknown",
  "population": "10000000",
  "residents": [
    "https://swapi.info/api/people/33"
  ],
  "films": [
    "https://swapi.info/api/films/6"
  ],
  "created": "2014-12-10T13:46:28.704000Z",
  "edited": "2014-12-20T20:58:18.449000Z",
  "url": "https://swapi.info/api/planets/18"
}
eye-open
Good