Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Bespin
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Bespin")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Bespin",
3 "rotation_period": "12",
4 "orbital_period": "5110",
5 "diameter": "118000",
6 "climate": "temperate",
7 "gravity": "1.5 (surface), 1 standard (Cloud City)",
8 "terrain": "gas giant",
9 "surface_water": "0",
10 "population": "6000000",
11 "residents": [
12 "https://swapi.mimo.dev/api/people/26/"
13 ],
14 "films": [
15 "https://swapi.mimo.dev/api/films/2/"
16 ],
17 "created": "2014-12-10T11:43:55.240000Z",
18 "edited": "2014-12-20T20:58:18.427000Z",
19 "url": "https://swapi.mimo.dev/api/planets/6/"
20}