/planets/16
Request:
fetch("https://swapi.info/api/planets/16")
.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": "Mygeeto",
"rotation_period": "12",
"orbital_period": "167",
"diameter": "10088",
"climate": "frigid",
"gravity": "1 standard",
"terrain": "glaciers, mountains, ice canyons",
"surface_water": "unknown",
"population": "19000000",
"residents": [],
"films": [
"https://swapi.info/api/films/6"
],
"created": "2014-12-10T13:43:39.139000Z",
"edited": "2014-12-20T20:58:18.446000Z",
"url": "https://swapi.info/api/planets/16"
}