/people/15

homecaret-rightpeoplecaret-right

15

API Endpoint:

Request:

fetch("https://swapi.info/api/people/15")
    .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": "Greedo",
  "height": "173",
  "mass": "74",
  "hair_color": "n/a",
  "skin_color": "green",
  "eye_color": "black",
  "birth_year": "44BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/23",
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "species": [
    "https://swapi.info/api/species/4"
  ],
  "vehicles": [],
  "starships": [],
  "created": "2014-12-10T17:03:30.334000Z",
  "edited": "2014-12-20T21:17:50.336000Z",
  "url": "https://swapi.info/api/people/15"
}
eye-open
Good