/starships/40

homecaret-rightstarshipscaret-right

40

API Endpoint:

Request:

fetch("https://swapi.info/api/starships/40")
    .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": "Naboo Royal Starship",
  "model": "J-type 327 Nubian royal starship",
  "manufacturer": "Theed Palace Space Vessel Engineering Corps, Nubia Star Drives",
  "cost_in_credits": "unknown",
  "length": "76",
  "max_atmosphering_speed": "920",
  "crew": "8",
  "passengers": "unknown",
  "cargo_capacity": "unknown",
  "consumables": "unknown",
  "hyperdrive_rating": "1.8",
  "MGLT": "unknown",
  "starship_class": "yacht",
  "pilots": [
    "https://swapi.info/api/people/39"
  ],
  "films": [
    "https://swapi.info/api/films/4"
  ],
  "created": "2014-12-19T17:45:03.506000Z",
  "edited": "2014-12-20T21:23:49.919000Z",
  "url": "https://swapi.info/api/starships/40"
}
eye-open
Good