/vehicles/8

homecaret-rightvehiclescaret-right

8

API Endpoint:

Request:

fetch("https://swapi.info/api/vehicles/8")
    .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": "TIE/LN starfighter",
  "model": "Twin Ion Engine/Ln Starfighter",
  "manufacturer": "Sienar Fleet Systems",
  "cost_in_credits": "unknown",
  "length": "6.4",
  "max_atmosphering_speed": "1200",
  "crew": "1",
  "passengers": "0",
  "cargo_capacity": "65",
  "consumables": "2 days",
  "vehicle_class": "starfighter",
  "pilots": [],
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3"
  ],
  "created": "2014-12-10T16:33:52.860000Z",
  "edited": "2014-12-20T21:30:21.670000Z",
  "url": "https://swapi.info/api/vehicles/8"
}
eye-open
Good