/planets/11
Request:
fetch("https://swapi.info/api/planets/11")
.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": "Geonosis",
"rotation_period": "30",
"orbital_period": "256",
"diameter": "11370",
"climate": "temperate, arid",
"gravity": "0.9 standard",
"terrain": "rock, desert, mountain, barren",
"surface_water": "5",
"population": "100000000000",
"residents": [
"https://swapi.info/api/people/63"
],
"films": [
"https://swapi.info/api/films/5"
],
"created": "2014-12-10T12:47:22.350000Z",
"edited": "2014-12-20T20:58:18.437000Z",
"url": "https://swapi.info/api/planets/11"
}