Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Corellia
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Corellia")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Corellia",
3 "rotation_period": "25",
4 "orbital_period": "329",
5 "diameter": "11000",
6 "climate": "temperate",
7 "gravity": "1 standard",
8 "terrain": "plains, urban, hills, forests",
9 "surface_water": "70",
10 "population": "3000000000",
11 "residents": [
12 "https://swapi.mimo.dev/api/people/14/",
13 "https://swapi.mimo.dev/api/people/18/"
14 ],
15 "films": [],
16 "created": "2014-12-10T16:49:12.453000Z",
17 "edited": "2014-12-20T20:58:18.456000Z",
18 "url": "https://swapi.mimo.dev/api/planets/22/"
19}