/planets/36

homecaret-rightplanetscaret-right

36

API Endpoint:

Request:

fetch("https://swapi.info/api/planets/36")
    .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": "Dathomir",
  "rotation_period": "24",
  "orbital_period": "491",
  "diameter": "10480",
  "climate": "temperate",
  "gravity": "0.9",
  "terrain": "forests, deserts, savannas",
  "surface_water": "unknown",
  "population": "5200",
  "residents": [
    "https://swapi.info/api/people/44"
  ],
  "films": [],
  "created": "2014-12-19T18:00:40.142000Z",
  "edited": "2014-12-20T20:58:18.480000Z",
  "url": "https://swapi.info/api/planets/36"
}
eye-open
Good