/people/54

homecaret-rightpeoplecaret-right

54

API Endpoint:

Request:

fetch("https://swapi.info/api/people/54")
    .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": "Eeth Koth",
  "height": "171",
  "mass": "unknown",
  "hair_color": "black",
  "skin_color": "brown",
  "eye_color": "brown",
  "birth_year": "unknown",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/45",
  "films": [
    "https://swapi.info/api/films/4",
    "https://swapi.info/api/films/6"
  ],
  "species": [
    "https://swapi.info/api/species/22"
  ],
  "vehicles": [],
  "starships": [],
  "created": "2014-12-20T10:26:47.902000Z",
  "edited": "2014-12-20T21:17:50.427000Z",
  "url": "https://swapi.info/api/people/54"
}
eye-open
Good