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 "title": "A New Hope",
3 "episode_id": 4,
4 "opening_crawl": "It is a period of civil war.\r\nRebel spaceships, striking\r\nfrom a hidden base, have won\r\ntheir first victory against\r\nthe evil Galactic Empire.\r\n\r\nDuring the battle, Rebel\r\nspies managed to steal secret\r\nplans to the Empire's\r\nultimate weapon, the DEATH\r\nSTAR, an armored space\r\nstation with enough power\r\nto destroy an entire planet.\r\n\r\nPursued by the Empire's\r\nsinister agents, Princess\r\nLeia races home aboard her\r\nstarship, custodian of the\r\nstolen plans that can save her\r\npeople and restore\r\nfreedom to the galaxy....",
5 "director": "George Lucas",
6 "producer": "Gary Kurtz, Rick McCallum",
7 "release_date": "1977-05-25",
8 "characters": [
9 "https://swapi.info/api/people/1",
10 "https://swapi.info/api/people/2",
11 "https://swapi.info/api/people/3",
12 "https://swapi.info/api/people/4",
13 "https://swapi.info/api/people/5",
14 "https://swapi.info/api/people/6",
15 "https://swapi.info/api/people/7",
16 "https://swapi.info/api/people/8",
17 "https://swapi.info/api/people/9",
18 "https://swapi.info/api/people/10",
19 "https://swapi.info/api/people/12",
20 "https://swapi.info/api/people/13",
21 "https://swapi.info/api/people/14",
22 "https://swapi.info/api/people/15",
23 "https://swapi.info/api/people/16",
24 "https://swapi.info/api/people/18",
25 "https://swapi.info/api/people/19",
26 "https://swapi.info/api/people/81"
27 ],
28 "planets": [
29 "https://swapi.info/api/planets/1",
30 "https://swapi.info/api/planets/2",
31 "https://swapi.info/api/planets/3"
32 ],
33 "starships": [
34 "https://swapi.info/api/starships/2",
35 "https://swapi.info/api/starships/3",
36 "https://swapi.info/api/starships/5",
37 "https://swapi.info/api/starships/9",
38 "https://swapi.info/api/starships/10",
39 "https://swapi.info/api/starships/11",
40 "https://swapi.info/api/starships/12",
41 "https://swapi.info/api/starships/13"
42 ],
43 "vehicles": [
44 "https://swapi.info/api/vehicles/4",
45 "https://swapi.info/api/vehicles/6",
46 "https://swapi.info/api/vehicles/7",
47 "https://swapi.info/api/vehicles/8"
48 ],
49 "species": [
50 "https://swapi.info/api/species/1",
51 "https://swapi.info/api/species/2",
52 "https://swapi.info/api/species/3",
53 "https://swapi.info/api/species/4",
54 "https://swapi.info/api/species/5"
55 ],
56 "created": "2014-12-10T14:23:31.880000Z",
57 "edited": "2014-12-20T19:49:45.256000Z",
58 "url": "https://swapi.info/api/films/1"
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.