/starships/22

homecaret-rightstarshipscaret-right

22

API Endpoint:

Request:

fetch("https://swapi.info/api/starships/22")
    .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": "Imperial shuttle",
  "model": "Lambda-class T-4a shuttle",
  "manufacturer": "Sienar Fleet Systems",
  "cost_in_credits": "240000",
  "length": "20",
  "max_atmosphering_speed": "850",
  "crew": "6",
  "passengers": "20",
  "cargo_capacity": "80000",
  "consumables": "2 months",
  "hyperdrive_rating": "1.0",
  "MGLT": "50",
  "starship_class": "Armed government transport",
  "pilots": [
    "https://swapi.info/api/people/1",
    "https://swapi.info/api/people/13",
    "https://swapi.info/api/people/14"
  ],
  "films": [
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3"
  ],
  "created": "2014-12-15T13:04:47.235000Z",
  "edited": "2014-12-20T21:23:49.900000Z",
  "url": "https://swapi.info/api/starships/22"
}
eye-open
Good