/vehicles/20
Request:
fetch("https://swapi.info/api/vehicles/20")
.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": "Storm IV Twin-Pod cloud car",
"model": "Storm IV Twin-Pod",
"manufacturer": "Bespin Motors",
"cost_in_credits": "75000",
"length": "7",
"max_atmosphering_speed": "1500",
"crew": "2",
"passengers": "0",
"cargo_capacity": "10",
"consumables": "1 day",
"vehicle_class": "repulsorcraft",
"pilots": [],
"films": [
"https://swapi.info/api/films/2"
],
"created": "2014-12-15T12:58:50.530000Z",
"edited": "2014-12-20T21:30:21.681000Z",
"url": "https://swapi.info/api/vehicles/20"
}