/starships/5

homecaret-rightstarshipscaret-right

5

API Endpoint:

Request:

fetch("https://swapi.info/api/starships/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": "Sentinel-class landing craft",
  "model": "Sentinel-class landing craft",
  "manufacturer": "Sienar Fleet Systems, Cyngus Spaceworks",
  "cost_in_credits": "240000",
  "length": "38",
  "max_atmosphering_speed": "1000",
  "crew": "5",
  "passengers": "75",
  "cargo_capacity": "180000",
  "consumables": "1 month",
  "hyperdrive_rating": "1.0",
  "MGLT": "70",
  "starship_class": "landing craft",
  "pilots": [],
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "created": "2014-12-10T15:48:00.586000Z",
  "edited": "2014-12-20T21:23:49.873000Z",
  "url": "https://swapi.info/api/starships/5"
}
eye-open
Good