/people/25

homecaret-rightpeoplecaret-right

25

API Endpoint:

Request:

fetch("https://swapi.info/api/people/25")
    .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": "Lando Calrissian",
  "height": "177",
  "mass": "79",
  "hair_color": "black",
  "skin_color": "dark",
  "eye_color": "brown",
  "birth_year": "31BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/30",
  "films": [
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3"
  ],
  "species": [],
  "vehicles": [],
  "starships": [
    "https://swapi.info/api/starships/10"
  ],
  "created": "2014-12-15T12:56:32.683000Z",
  "edited": "2014-12-20T21:17:50.357000Z",
  "url": "https://swapi.info/api/people/25"
}
eye-open
Good