/planets/39
Request:
fetch("https://swapi.info/api/planets/39")
.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": "Vulpter",
"rotation_period": "22",
"orbital_period": "391",
"diameter": "14900",
"climate": "temperate, artic",
"gravity": "1",
"terrain": "urban, barren",
"surface_water": "unknown",
"population": "421000000",
"residents": [
"https://swapi.info/api/people/48"
],
"films": [],
"created": "2014-12-20T09:56:58.874000Z",
"edited": "2014-12-20T20:58:18.485000Z",
"url": "https://swapi.info/api/planets/39"
}