/starships/31

homecaret-rightstarshipscaret-right

31

API Endpoint:

Request:

fetch("https://swapi.info/api/starships/31")
    .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": "Republic Cruiser",
  "model": "Consular-class cruiser",
  "manufacturer": "Corellian Engineering Corporation",
  "cost_in_credits": "unknown",
  "length": "115",
  "max_atmosphering_speed": "900",
  "crew": "9",
  "passengers": "16",
  "cargo_capacity": "unknown",
  "consumables": "unknown",
  "hyperdrive_rating": "2.0",
  "MGLT": "unknown",
  "starship_class": "Space cruiser",
  "pilots": [],
  "films": [
    "https://swapi.info/api/films/4"
  ],
  "created": "2014-12-19T17:01:31.488000Z",
  "edited": "2014-12-20T21:23:49.912000Z",
  "url": "https://swapi.info/api/starships/31"
}
eye-open
Good