/species/5

homecaret-rightspeciescaret-right

5

API Endpoint:

Request:

fetch("https://swapi.info/api/species/5")
    .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": "Hutt",
  "classification": "gastropod",
  "designation": "sentient",
  "average_height": "300",
  "skin_colors": "green, brown, tan",
  "hair_colors": "n/a",
  "eye_colors": "yellow, red",
  "average_lifespan": "1000",
  "homeworld": "https://swapi.info/api/planets/24",
  "language": "Huttese",
  "people": [
    "https://swapi.info/api/people/16"
  ],
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/3"
  ],
  "created": "2014-12-10T17:12:50.410000Z",
  "edited": "2014-12-20T21:36:42.146000Z",
  "url": "https://swapi.info/api/species/5"
}
eye-open
Good