/starships/3

homecaret-rightstarshipscaret-right

3

API Endpoint:

Request:

fetch("https://swapi.info/api/starships/3")
    .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": "Star Destroyer",
  "model": "Imperial I-class Star Destroyer",
  "manufacturer": "Kuat Drive Yards",
  "cost_in_credits": "150000000",
  "length": "1,600",
  "max_atmosphering_speed": "975",
  "crew": "47,060",
  "passengers": "n/a",
  "cargo_capacity": "36000000",
  "consumables": "2 years",
  "hyperdrive_rating": "2.0",
  "MGLT": "60",
  "starship_class": "Star Destroyer",
  "pilots": [],
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3"
  ],
  "created": "2014-12-10T15:08:19.848000Z",
  "edited": "2014-12-20T21:23:49.870000Z",
  "url": "https://swapi.info/api/starships/3"
}
eye-open
Good