SWAPI
by Mimo
Welcome to the Star Wars API documentation. Here, you can find information on how to use the API.
Example Request
GET/api/films/1
1fetch("https://swapi.mimo.dev/api/films/1")
2 .then((res) => res.json())
3 .then((json) => console.log(json))
4 .catch((error) => console.error(error))
Example Response
response.json
1{
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.mimo.dev/api/people/1",
10 "https://swapi.mimo.dev/api/people/2",
11 "https://swapi.mimo.dev/api/people/3",
12 "https://swapi.mimo.dev/api/people/4",
13 "https://swapi.mimo.dev/api/people/5",
14 "https://swapi.mimo.dev/api/people/6",
15 "https://swapi.mimo.dev/api/people/7",
16 "https://swapi.mimo.dev/api/people/8",
17 "https://swapi.mimo.dev/api/people/9",
18 "https://swapi.mimo.dev/api/people/10",
19 "https://swapi.mimo.dev/api/people/12",
20 "https://swapi.mimo.dev/api/people/13",
21 "https://swapi.mimo.dev/api/people/14",
22 "https://swapi.mimo.dev/api/people/15",
23 "https://swapi.mimo.dev/api/people/16",
24 "https://swapi.mimo.dev/api/people/18",
25 "https://swapi.mimo.dev/api/people/19",
26 "https://swapi.mimo.dev/api/people/81"
27 ],
28 "planets": [
29 "https://swapi.mimo.dev/api/planets/1",
30 "https://swapi.mimo.dev/api/planets/2",
31 "https://swapi.mimo.dev/api/planets/3"
32 ],
33 "starships": [
34 "https://swapi.mimo.dev/api/starships/2",
35 "https://swapi.mimo.dev/api/starships/3",
36 "https://swapi.mimo.dev/api/starships/5",
37 "https://swapi.mimo.dev/api/starships/9",
38 "https://swapi.mimo.dev/api/starships/10",
39 "https://swapi.mimo.dev/api/starships/11",
40 "https://swapi.mimo.dev/api/starships/12",
41 "https://swapi.mimo.dev/api/starships/13"
42 ],
43 "vehicles": [
44 "https://swapi.mimo.dev/api/vehicles/4",
45 "https://swapi.mimo.dev/api/vehicles/6",
46 "https://swapi.mimo.dev/api/vehicles/7",
47 "https://swapi.mimo.dev/api/vehicles/8"
48 ],
49 "species": [
50 "https://swapi.mimo.dev/api/species/1",
51 "https://swapi.mimo.dev/api/species/2",
52 "https://swapi.mimo.dev/api/species/3",
53 "https://swapi.mimo.dev/api/species/4",
54 "https://swapi.mimo.dev/api/species/5"
55 ],
56 "created": "2014-12-10T14:23:31.880000Z",
57 "edited": "2014-12-20T19:49:45.256000Z",
58 "url": "https://swapi.mimo.dev/api/films/1",
59 "id": "1"
60}