/planets/33
Request:
fetch("https://swapi.info/api/planets/33")
.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": "Sullust",
"rotation_period": "20",
"orbital_period": "263",
"diameter": "12780",
"climate": "superheated",
"gravity": "1",
"terrain": "mountains, volcanoes, rocky deserts",
"surface_water": "5",
"population": "18500000000",
"residents": [
"https://swapi.info/api/people/31"
],
"films": [],
"created": "2014-12-18T11:25:40.243000Z",
"edited": "2014-12-20T20:58:18.474000Z",
"url": "https://swapi.info/api/planets/33"
}