Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Hoth
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Hoth")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Hoth",
3 "rotation_period": "23",
4 "orbital_period": "549",
5 "diameter": "7200",
6 "climate": "frozen",
7 "gravity": "1.1 standard",
8 "terrain": "tundra, ice caves, mountain ranges",
9 "surface_water": "100",
10 "population": "unknown",
11 "residents": [],
12 "films": [
13 "https://swapi.mimo.dev/api/films/2/"
14 ],
15 "created": "2014-12-10T11:39:13.934000Z",
16 "edited": "2014-12-20T20:58:18.423000Z",
17 "url": "https://swapi.mimo.dev/api/planets/4/"
18}