API Endpoint:


2 .then((res) => res.json()) // Parse the JSON content from the API to be consumed
3 .then((json) => console.log(json)) // Log the JSON response to your console
4 .catch((error) => console.error(error)) // Log the API error (if any) to your console


2 "name": "Star Destroyer",
3 "model": "Imperial I-class Star Destroyer",
4 "manufacturer": "Kuat Drive Yards",
5 "cost_in_credits": "150000000",
6 "length": "1,600",
7 "max_atmosphering_speed": "975",
8 "crew": "47,060",
9 "passengers": "n/a",
10 "cargo_capacity": "36000000",
11 "consumables": "2 years",
12 "hyperdrive_rating": "2.0",
13 "MGLT": "60",
14 "starship_class": "Star Destroyer",
15 "pilots": [],
16 "films": [
17 "https://swapi.info/api/films/1",
18 "https://swapi.info/api/films/2",
19 "https://swapi.info/api/films/3"
20 ],
21 "created": "2014-12-10T15:08:19.848000Z",
22 "edited": "2014-12-20T21:23:49.870000Z",
23 "url": "https://swapi.info/api/starships/3"
What is this ?

The Star Wars API, or "swapi" (Swah-pee) is the world‘s first quantified and programmatically-accessible data source for all the data from the Star Wars canon universe!

We‘ve taken all the rich contextual stuff from the universe and formatted into something easier to consume with software. Then we went and stuck an API on the front so you can access it all!

How can I use it ?

All the data is accessible through our HTTP web API. Consult our explorer pages if you‘d like to get started.

Promise of longevity

Swapi.info is here to stay!. Created as service which runs solely via static files, this service does not require database or expensive hosting to run. Currently hosted on the generosity of Cloudflare Pages, the only barrier to utilization is a public facing domain. No other costs associated with running this project yourself as well. Created as a self-owned alternative to keep my older projects alive, now publicly available and Open Source allows it to be perpetually available to the community.