The Star Wars API
Species : 37
The Star Wars API is the world's first quantified and programmatically-formatted set of Star Wars data.
After hours of watching films and trawling through content online, we present to you all the People, Films, Species, Starships, Vehicles and Planets from Star Wars.
Unfortulately swapi.co is not maintained anymore, and the service is currently down. This is an branch of SWAPI that will be supported going forward.
Comparing the data from Star Wars has never been easier. Here are some examples using the Python helper library
List the planets in order of size:
import swapi for planet in swapi.get_all("planets").order_by("diameter"): print(planet.name)
View the people who have piloted more than one starship:
import swapi for people in swapi.get_all("people").iter(): if len(people.starships) > 1: print(people.name)
Discover if Jar Jar Binks ruined a film just by being in it:
import swapi pm = swapi.get_film(4) jj = swapi.get_person(36) for c in pm.get_characters().iter(): if c.name == jj.name: print("Why George, why.")
We're using Django and Django REST Framework to serve a RESTish API to you. The data is all formatted in JSON and we also support JSON Schema for programmatically understanding the attributes of each resource.
Seeing the release trailer for Episode VII also made me stupidly enthusiastic for Star Wars again.
This project was originally built and maintained by Paul Hallett.
Star Wars and all associated names are copyright Lucasfilm ltd.
This project is open source and carries a BSD licence.
All data has been freely collected from open sources such as Wookiepedia.
SWAPI would not be possible without contributions from the following people: