/people/44

homecaret-rightpeoplecaret-right

44

API Endpoint:

Request:

fetch("https://swapi.info/api/people/44")
    .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": "Darth Maul",
  "height": "175",
  "mass": "80",
  "hair_color": "none",
  "skin_color": "red",
  "eye_color": "yellow",
  "birth_year": "54BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/36",
  "films": [
    "https://swapi.info/api/films/4"
  ],
  "species": [
    "https://swapi.info/api/species/22"
  ],
  "vehicles": [
    "https://swapi.info/api/vehicles/42"
  ],
  "starships": [
    "https://swapi.info/api/starships/41"
  ],
  "created": "2014-12-19T18:00:41.929000Z",
  "edited": "2014-12-20T21:17:50.403000Z",
  "url": "https://swapi.info/api/people/44"
}
eye-open
Good