/species/4

homecaret-rightspeciescaret-right

4

API Endpoint:

Request:

fetch("https://swapi.info/api/species/4")
    .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": "Rodian",
  "classification": "sentient",
  "designation": "reptilian",
  "average_height": "170",
  "skin_colors": "green, blue",
  "hair_colors": "n/a",
  "eye_colors": "black",
  "average_lifespan": "unknown",
  "homeworld": "https://swapi.info/api/planets/23",
  "language": "Galatic Basic",
  "people": [
    "https://swapi.info/api/people/15"
  ],
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "created": "2014-12-10T17:05:26.471000Z",
  "edited": "2014-12-20T21:36:42.144000Z",
  "url": "https://swapi.info/api/species/4"
}
eye-open
Good