/people/13

homecaret-rightpeoplecaret-right

13

API Endpoint:

Request:

fetch("https://swapi.info/api/people/13")
    .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": "Chewbacca",
  "height": "228",
  "mass": "112",
  "hair_color": "brown",
  "skin_color": "unknown",
  "eye_color": "blue",
  "birth_year": "200BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/14",
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3",
    "https://swapi.info/api/films/6"
  ],
  "species": [
    "https://swapi.info/api/species/3"
  ],
  "vehicles": [
    "https://swapi.info/api/vehicles/19"
  ],
  "starships": [
    "https://swapi.info/api/starships/10",
    "https://swapi.info/api/starships/22"
  ],
  "created": "2014-12-10T16:42:45.066000Z",
  "edited": "2014-12-20T21:17:50.332000Z",
  "url": "https://swapi.info/api/people/13"
}
eye-open
Good