Endpoint: planets
GEThttps://swapi.mimo.dev/api/planets/Dantooine
Request
GETplanets
1fetch("https://swapi.mimo.dev/api/planets/Dantooine")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Response
response.json
1{
2 "name": "Dantooine",
3 "rotation_period": "25",
4 "orbital_period": "378",
5 "diameter": "9830",
6 "climate": "temperate",
7 "gravity": "1 standard",
8 "terrain": "oceans, savannas, mountains, grasslands",
9 "surface_water": "unknown",
10 "population": "1000",
11 "residents": [],
12 "films": [],
13 "created": "2014-12-10T17:23:29.896000Z",
14 "edited": "2014-12-20T20:58:18.461000Z",
15 "url": "https://swapi.mimo.dev/api/planets/25/"
16}