/people/11

homecaret-rightpeoplecaret-right

11

API Endpoint:

Request:

fetch("https://swapi.info/api/people/11")
    .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": "Anakin Skywalker",
  "height": "188",
  "mass": "84",
  "hair_color": "blond",
  "skin_color": "fair",
  "eye_color": "blue",
  "birth_year": "41.9BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/1",
  "films": [
    "https://swapi.info/api/films/4",
    "https://swapi.info/api/films/5",
    "https://swapi.info/api/films/6"
  ],
  "species": [],
  "vehicles": [
    "https://swapi.info/api/vehicles/44",
    "https://swapi.info/api/vehicles/46"
  ],
  "starships": [
    "https://swapi.info/api/starships/39",
    "https://swapi.info/api/starships/59",
    "https://swapi.info/api/starships/65"
  ],
  "created": "2014-12-10T16:20:44.310000Z",
  "edited": "2014-12-20T21:17:50.327000Z",
  "url": "https://swapi.info/api/people/11"
}
eye-open
Good