Star Wars API

App · Film, TV & Fandom · 14 actions

Pull canonical Star Wars reference data into a workflow from SWAPI, the Star Wars API: the six films with their opening crawls, 82 characters, 60 planets, 37 species, 36 starships and 39 vehicles. Search all six collections at once to turn what a person typed into the record you need, then read that record with everything it references already resolved to names, which SWAPI itself leaves as bare URLs. Every quoted measurement comes back as a number you can compare and a phrase you can print, so a workflow can sort characters by height, planets by population or starships by cost without tripping over the strings SWAPI stores them as. No account or API key required.

Actions

ActionWhat it does
Get a characterGet one character in full: height and mass in both metric and imperial, hair, skin and eye colour, gender, birth year as a number you can compare, and their homeworld, species, films and craft, each one named rather than left as the bare URL SWAPI returns.
Get a filmGet one film in full: its episode number, director, producers, release date and opening crawl, plus its whole cast, its planets, its species and every craft in it, each one named.
Get a planetGet one planet in full: its climate and terrain split into lists, its gravity, and its diameter, population, day length and year length as numbers you can compare rather than the strings SWAPI quotes them as.
Get a speciesGet one species in full: its classification and designation, its language, its average height and lifespan, and the colours it comes in, split into lists rather than left as comma-joined strings.
Get a starshipGet one starship in full: its model, manufacturer, class, cost, length, crew, capacity, hyperdrive rating and sublight speed, with every quoted number parsed into one you can compare.
Get a vehicleGet one vehicle in full: its model, manufacturer, class, cost, length, crew and capacity, with every quoted number parsed into one you can compare.
Get an opening crawlGet the opening crawl of one film, in a shape a message can actually use.
List charactersBrowse all 82 of SWAPI's characters at once, or narrow them to the ones worth looking at: one film's cast, one species, one homeworld or one gender.
List filmsList the six films, in either of the two orders people mean by "in order": by episode, which runs from The Phantom Menace, or by release date, which runs from A New Hope.
List planetsBrowse all 60 of SWAPI's planets at once, or narrow them by climate, by terrain or to the ones in one film.
List speciesBrowse all 37 of SWAPI's species at once, or narrow them by classification, designation, language or film.
List starshipsBrowse all 36 of SWAPI's starships at once, or narrow them by class, manufacturer, pilot or film.
List vehiclesBrowse all 39 of SWAPI's vehicles at once, or narrow them by class, manufacturer, pilot or film.
Search Star WarsFind anything in SWAPI whose name matches some text, across the films, characters, planets, species, starships and vehicles at once.

Get a character

Get one character in full: height and mass in both metric and imperial, hair, skin and eye colour, gender, birth year as a number you can compare, and their homeworld, species, films and craft, each one named rather than left as the bare URL SWAPI returns. Name them however you have them, a name or an id. No API key required.

Inputs

CharactercharactertextRequired
The character to fetch. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.

Outputs

One character, with every reference resolved to a name.

birth_yearobject
When the character was born, on the in-universe calendar counted from the Battle of Yavin.
createdtext
When the record was created, ISO 8601.
editedtext
When it was last edited, ISO 8601.
eye_colortext
Eye colour, or null.
eye_colorslist
The same colours split into a list.
film_countnumber
How many films the character appears in there are.
film_listlist
The films the character appears in as id, name, kind and url rows.
film_nameslist
The films the character appears in, by name, ready to write into a sentence.
filmslist
The films the character appears in as the raw SWAPI URLs the API returned.
gendertext
Gender, or null where SWAPI wrote "n/a" or "none", which it does for the droids.
hair_colortext
Hair colour, or null when SWAPI recorded "unknown" or "n/a". A droid has none.
hair_colorslist
The same colours split into a list.
heightobject
How tall the character is, in centimetres.
homeworldtext
The homeworld's SWAPI URL, as the API gave it.
homeworld_idtext
The homeworld's id, for Get a planet.
homeworld_nametext
The homeworld's name, which is the join SWAPI omits.
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
massobject
What the character weighs, in kilograms.
nametext
The record's name, or a film's title.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
skin_colortext
Skin colour, or null.
skin_colorslist
The same colours split into a list.
specieslist
The species the character belongs to as the raw SWAPI URLs the API returned.
species_countnumber
How many species the character belongs to there are.
species_listlist
The species the character belongs to as id, name, kind and url rows.
species_nameslist
The species the character belongs to, by name, ready to write into a sentence.
species_texttext
The species in words, or a sentence saying it was not recorded. SWAPI leaves most human characters' species blank, so check this or species_count rather than reading species_names[0].
starship_countnumber
How many starships the character has piloted there are.
starship_listlist
The starships the character has piloted as id, name, kind and url rows.
starship_nameslist
The starships the character has piloted, by name, ready to write into a sentence.
starshipslist
The starships the character has piloted as the raw SWAPI URLs the API returned.
urltext
The record's own SWAPI URL.
vehicle_countnumber
How many vehicles the character has piloted there are.
vehicle_listlist
The vehicles the character has piloted as id, name, kind and url rows.
vehicle_nameslist
The vehicles the character has piloted, by name, ready to write into a sentence.
vehicleslist
The vehicles the character has piloted as the raw SWAPI URLs the API returned.
Example output
{
  "birth_year": {
    "era": "BBY",
    "known": true,
    "text": "19 years before the Battle of Yavin",
    "value": "19BBY",
    "years_from_yavin": -19
  },
  "created": "2014-12-09T13:50:51.644000Z",
  "edited": "2014-12-20T21:17:56.891000Z",
  "eye_color": "blue",
  "eye_colors": [
    "blue"
  ],
  "film_count": 4,
  "film_list": [
    {
      "id": "1",
      "kind": "film",
      "name": "A New Hope",
      "url": "https://swapi.info/api/films/1"
    }
  ],
  "film_names": [
    "A New Hope"
  ],
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3",
    "https://swapi.info/api/films/6"
  ],
  "gender": "male",
  "hair_color": "blond",
  "hair_colors": [
    "blond"
  ],
  "height": {
    "known": true,
    "max": 172,
    "min": 172,
    "number": 172,
    "number_in": 67.72,
    "text": "172 cm (67.72 in)",
    "unit": "cm",
    "value": "172"
  },
  "homeworld": "https://swapi.info/api/planets/1",
  "homeworld_id": "1",
  "homeworld_name": "Tatooine",
  "id": "1",
  "kind": "character",
  "mass": {
    "known": true,
    "max": 77,
    "min": 77,
    "number": 77,
    "number_lb": 169.76,
    "text": "77 kg (169.76 lb)",
    "unit": "kg",
    "value": "77"
  },
  "name": "Luke Skywalker",
  "resource": "people",
  "skin_color": "fair",
  "skin_colors": [
    "fair"
  ],
  "species": [],
  "species_count": 0,
  "species_list": [],
  "species_names": [],
  "species_text": "not recorded (SWAPI leaves most human characters' species blank)",
  "starship_count": 1,
  "starship_list": [
    {
      "id": "12",
      "kind": "starship",
      "name": "X-wing",
      "url": "https://swapi.info/api/starships/12"
    }
  ],
  "starship_names": [
    "X-wing"
  ],
  "starships": [
    "https://swapi.info/api/starships/12"
  ],
  "url": "https://swapi.info/api/people/1",
  "vehicle_count": 1,
  "vehicle_list": [
    {
      "id": "14",
      "kind": "vehicle",
      "name": "Snowspeeder",
      "url": "https://swapi.info/api/vehicles/14"
    }
  ],
  "vehicle_names": [
    "Snowspeeder"
  ],
  "vehicles": [
    "https://swapi.info/api/vehicles/14"
  ]
}

Get a film

Get one film in full: its episode number, director, producers, release date and opening crawl, plus its whole cast, its planets, its species and every craft in it, each one named. SWAPI gives those as bare URLs and has no way to expand them, so a film's forty characters would otherwise be forty more requests; here they are already resolved. Name the film by title, by episode or by id. No API key required.

Inputs

FilmfilmtextRequired
Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.

Outputs

One film, with every reference in it resolved to a name.

character_countnumber
How many characters in the film there are.
character_listlist
The characters in the film as id, name, kind and url rows.
character_nameslist
The characters in the film, by name, ready to write into a sentence.
characterslist
The characters in the film as the raw SWAPI URLs the API returned.
createdtext
When the record was created, ISO 8601.
directortext
Who directed it.
editedtext
When it was last edited, ISO 8601.
episodetext
The episode as the films write it, e.g. "Episode IV".
episode_idnumber
The episode number, 1 to 6. Not the same as the id: film 1 is Episode IV.
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
nametext
The record's name, or a film's title.
opening_crawltext
The opening crawl exactly as SWAPI stores it: hard-wrapped at about thirty characters with carriage returns.
opening_crawl_messagetext
The crawl reflowed into paragraphs. This is the one to put in an email, a message or a document.
opening_crawl_paragraphslist
The crawl's stanzas, each unwrapped onto one line.
opening_crawl_texttext
The same crawl with the carriage returns taken out.
planet_countnumber
How many planets in the film there are.
planet_listlist
The planets in the film as id, name, kind and url rows.
planet_nameslist
The planets in the film, by name, ready to write into a sentence.
planetslist
The planets in the film as the raw SWAPI URLs the API returned.
producertext
Who produced it, as SWAPI's own comma-joined string.
producerslist
The same producers split into a list.
release_datetext
The original release date, YYYY-MM-DD.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
specieslist
The species in the film as the raw SWAPI URLs the API returned.
species_countnumber
How many species in the film there are.
species_listlist
The species in the film as id, name, kind and url rows.
species_nameslist
The species in the film, by name, ready to write into a sentence.
starship_countnumber
How many starships in the film there are.
starship_listlist
The starships in the film as id, name, kind and url rows.
starship_nameslist
The starships in the film, by name, ready to write into a sentence.
starshipslist
The starships in the film as the raw SWAPI URLs the API returned.
titletext
The film's title.
urltext
The record's own SWAPI URL.
vehicle_countnumber
How many vehicles in the film there are.
vehicle_listlist
The vehicles in the film as id, name, kind and url rows.
vehicle_nameslist
The vehicles in the film, by name, ready to write into a sentence.
vehicleslist
The vehicles in the film as the raw SWAPI URLs the API returned.
Example output
{
  "character_count": 1,
  "character_list": [
    {
      "id": "1",
      "kind": "character",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "character_names": [
    "Luke Skywalker"
  ],
  "characters": [
    "https://swapi.info/api/people/1"
  ],
  "created": "2014-12-10T14:23:31.880000Z",
  "director": "George Lucas",
  "edited": "2014-12-20T19:49:45.256000Z",
  "episode": "Episode IV",
  "episode_id": 4,
  "id": "1",
  "kind": "film",
  "name": "A New Hope",
  "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.",
  "opening_crawl_message": "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.\n\nDuring the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet.",
  "opening_crawl_paragraphs": [
    "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.",
    "During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet."
  ],
  "opening_crawl_text": "It is a period of civil war.\nRebel spaceships, striking\nfrom a hidden base, have won\ntheir first victory against\nthe evil Galactic Empire.\n\nDuring the battle, Rebel\nspies managed to steal secret\nplans to the Empire's\nultimate weapon, the DEATH\nSTAR, an armored space\nstation with enough power\nto destroy an entire planet.",
  "planet_count": 1,
  "planet_list": [
    {
      "id": "1",
      "kind": "planet",
      "name": "Tatooine",
      "url": "https://swapi.info/api/planets/1"
    }
  ],
  "planet_names": [
    "Tatooine"
  ],
  "planets": [
    "https://swapi.info/api/planets/1"
  ],
  "producer": "Gary Kurtz, Rick McCallum",
  "producers": [
    "Gary Kurtz",
    "Rick McCallum"
  ],
  "release_date": "1977-05-25",
  "resource": "films",
  "species": [
    "https://swapi.info/api/species/1"
  ],
  "species_count": 1,
  "species_list": [
    {
      "id": "1",
      "kind": "species",
      "name": "Human",
      "url": "https://swapi.info/api/species/1"
    }
  ],
  "species_names": [
    "Human"
  ],
  "starship_count": 1,
  "starship_list": [
    {
      "id": "12",
      "kind": "starship",
      "name": "X-wing",
      "url": "https://swapi.info/api/starships/12"
    }
  ],
  "starship_names": [
    "X-wing"
  ],
  "starships": [
    "https://swapi.info/api/starships/12"
  ],
  "title": "A New Hope",
  "url": "https://swapi.info/api/films/1",
  "vehicle_count": 1,
  "vehicle_list": [
    {
      "id": "14",
      "kind": "vehicle",
      "name": "Snowspeeder",
      "url": "https://swapi.info/api/vehicles/14"
    }
  ],
  "vehicle_names": [
    "Snowspeeder"
  ],
  "vehicles": [
    "https://swapi.info/api/vehicles/14"
  ]
}

Get a planet

Get one planet in full: its climate and terrain split into lists, its gravity, and its diameter, population, day length and year length as numbers you can compare rather than the strings SWAPI quotes them as. The characters from it and the films it appears in come back named. No API key required.

Inputs

PlanetplanettextRequired
The planet to fetch. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.

Outputs

One planet, with its residents and films named.

climatetext
The climate, as SWAPI's own comma-joined string, or null.
climateslist
The same climates split into a list.
createdtext
When the record was created, ISO 8601.
diameterobject
The planet's diameter, in kilometres.
editedtext
When it was last edited, ISO 8601.
film_countnumber
How many films the planet appears in there are.
film_listlist
The films the planet appears in as id, name, kind and url rows.
film_nameslist
The films the planet appears in, by name, ready to write into a sentence.
filmslist
The films the planet appears in as the raw SWAPI URLs the API returned.
gravitytext
Gravity relative to standard, e.g. "1 standard".
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
nametext
The record's name, or a film's title.
orbital_periodobject
How long a year is, in standard days.
populationobject
How many people live there.
resident_countnumber
How many characters from this planet there are.
resident_listlist
The characters from this planet as id, name, kind and url rows.
resident_nameslist
The characters from this planet, by name, ready to write into a sentence.
residentslist
The characters from this planet as the raw SWAPI URLs the API returned.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
rotation_periodobject
How long a day is, in standard hours.
surface_waterobject
How much of the surface is water, as a percentage.
terraintext
The terrain, as SWAPI's own comma-joined string, or null.
terrainslist
The same terrains split into a list.
urltext
The record's own SWAPI URL.
Example output
{
  "climate": "arid",
  "climates": [
    "arid"
  ],
  "created": "2014-12-09T13:50:49.641000Z",
  "diameter": {
    "known": true,
    "max": 10465,
    "min": 10465,
    "number": 10465,
    "text": "10,465 km",
    "unit": "km",
    "value": "10465"
  },
  "edited": "2014-12-20T20:58:18.411000Z",
  "film_count": 1,
  "film_list": [
    {
      "id": "1",
      "kind": "film",
      "name": "A New Hope",
      "url": "https://swapi.info/api/films/1"
    }
  ],
  "film_names": [
    "A New Hope"
  ],
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "gravity": "1 standard",
  "id": "1",
  "kind": "planet",
  "name": "Tatooine",
  "orbital_period": {
    "known": true,
    "max": 304,
    "min": 304,
    "number": 304,
    "text": "304 days",
    "unit": "days",
    "value": "304"
  },
  "population": {
    "known": true,
    "max": 200000,
    "min": 200000,
    "number": 200000,
    "text": "200,000 people",
    "unit": "people",
    "value": "200000"
  },
  "resident_count": 1,
  "resident_list": [
    {
      "id": "1",
      "kind": "character",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "resident_names": [
    "Luke Skywalker"
  ],
  "residents": [
    "https://swapi.info/api/people/1"
  ],
  "resource": "planets",
  "rotation_period": {
    "known": true,
    "max": 23,
    "min": 23,
    "number": 23,
    "text": "23 hours",
    "unit": "hours",
    "value": "23"
  },
  "surface_water": {
    "known": true,
    "max": 1,
    "min": 1,
    "number": 1,
    "text": "1%",
    "unit": "%",
    "value": "1"
  },
  "terrain": "desert",
  "terrains": [
    "desert"
  ],
  "url": "https://swapi.info/api/planets/1"
}

Get a species

Get one species in full: its classification and designation, its language, its average height and lifespan, and the colours it comes in, split into lists rather than left as comma-joined strings. Its homeworld, its named characters and its films come back named. No API key required.

Inputs

SpeciesspeciestextRequired
The species to fetch. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.

Outputs

One species, with its homeworld, people and films named.

average_heightobject
Average height, in centimetres.
average_lifespanobject
Average lifespan in years. The Hutt value is "indefinite", which is recorded but not a number.
classificationtext
What kind of thing it is, e.g. "mammal" or "reptile". SWAPI writes these by hand, so both mammal and mammals appear.
createdtext
When the record was created, ISO 8601.
designationtext
Usually "sentient".
editedtext
When it was last edited, ISO 8601.
eye_colorslist
The common eye colours, split into a list.
film_countnumber
How many films the species appears in there are.
film_listlist
The films the species appears in as id, name, kind and url rows.
film_nameslist
The films the species appears in, by name, ready to write into a sentence.
filmslist
The films the species appears in as the raw SWAPI URLs the API returned.
hair_colorslist
The common hair colours, split into a list.
homeworldtext
The homeworld's SWAPI URL, or null for a species with none.
homeworld_idtext
The homeworld's id, for Get a planet.
homeworld_nametext
The homeworld's name.
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
languagetext
The language commonly spoken.
nametext
The record's name, or a film's title.
peoplelist
The named characters of this species as the raw SWAPI URLs the API returned.
person_countnumber
How many named characters of this species there are.
person_listlist
The named characters of this species as id, name, kind and url rows.
person_nameslist
The named characters of this species, by name, ready to write into a sentence.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
skin_colorslist
The common skin colours, split into a list.
urltext
The record's own SWAPI URL.
Example output
{
  "average_height": {
    "known": true,
    "max": 180,
    "min": 180,
    "number": 180,
    "number_in": 70.87,
    "text": "180 cm (70.87 in)",
    "unit": "cm",
    "value": "180"
  },
  "average_lifespan": {
    "known": true,
    "max": 120,
    "min": 120,
    "number": 120,
    "text": "120 years",
    "unit": "years",
    "value": "120"
  },
  "classification": "mammal",
  "created": "2014-12-10T13:52:11.567000Z",
  "designation": "sentient",
  "edited": "2014-12-20T21:36:42.136000Z",
  "eye_colors": [
    "brown",
    "blue",
    "green",
    "hazel",
    "grey",
    "amber"
  ],
  "film_count": 1,
  "film_list": [
    {
      "id": "1",
      "kind": "film",
      "name": "A New Hope",
      "url": "https://swapi.info/api/films/1"
    }
  ],
  "film_names": [
    "A New Hope"
  ],
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "hair_colors": [
    "blonde",
    "brown",
    "black",
    "red"
  ],
  "homeworld": "https://swapi.info/api/planets/9",
  "homeworld_id": null,
  "homeworld_name": null,
  "id": "1",
  "kind": "species",
  "language": "Galactic Basic",
  "name": "Human",
  "people": [
    "https://swapi.info/api/people/1"
  ],
  "person_count": 1,
  "person_list": [
    {
      "id": "1",
      "kind": "character",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "person_names": [
    "Luke Skywalker"
  ],
  "resource": "species",
  "skin_colors": [
    "caucasian",
    "black",
    "asian",
    "hispanic"
  ],
  "url": "https://swapi.info/api/species/1"
}

Get a starship

Get one starship in full: its model, manufacturer, class, cost, length, crew, capacity, hyperdrive rating and sublight speed, with every quoted number parsed into one you can compare. Its pilots and films come back named. A starship in SWAPI is a craft with a hyperdrive; the ones without are vehicles, and the two share one set of ids, so an id that is not a starship is reported as whichever vehicle it is. No API key required.

Inputs

StarshipstarshiptextRequired
The starship to fetch. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.

Outputs

One starship, with its pilots and films named.

MGLTobject
Megalights per hour, SWAPI's own unit for comparing sublight speeds.
cargo_capacityobject
How much it can carry, in kilograms.
classtext
The craft's class. SWAPI's casing is inconsistent (both "Starfighter" and "starfighter" are in the data), so compare it case-insensitively.
consumablesobject
How long it can feed its crew without resupplying. A duration such as "2 months" rather than a number.
cost_in_creditsobject
What it cost new, in galactic credits.
createdtext
When the record was created, ISO 8601.
crewobject
How many people are needed to run it.
editedtext
When it was last edited, ISO 8601.
film_countnumber
How many films it appears in there are.
film_listlist
The films it appears in as id, name, kind and url rows.
film_nameslist
The films it appears in, by name, ready to write into a sentence.
filmslist
The films it appears in as the raw SWAPI URLs the API returned.
hyperdrive_ratingobject
The hyperdrive class. Lower is faster: the Millennium Falcon's 0.5 is the fastest in the data.
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
lengthobject
How long it is, in metres.
manufacturertext
Who built it, as SWAPI's own comma-joined string.
manufacturerslist
The same manufacturers split into a list.
max_atmosphering_speedobject
Top speed in atmosphere. SWAPI's units vary and some values carry them in the string, e.g. "1000km".
modeltext
The official model, e.g. "T-65 X-wing".
nametext
The record's name, or a film's title.
passengersobject
How many non-essential people it can carry.
pilot_countnumber
How many characters who have piloted it there are.
pilot_listlist
The characters who have piloted it as id, name, kind and url rows.
pilot_nameslist
The characters who have piloted it, by name, ready to write into a sentence.
pilotslist
The characters who have piloted it as the raw SWAPI URLs the API returned.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
starship_classtext
The same class under SWAPI's own field name.
urltext
The record's own SWAPI URL.
Example output
{
  "MGLT": {
    "known": true,
    "max": 100,
    "min": 100,
    "number": 100,
    "text": "100 MGLT",
    "unit": "MGLT",
    "value": "100"
  },
  "cargo_capacity": {
    "known": true,
    "max": 110,
    "min": 110,
    "number": 110,
    "text": "110 kg",
    "unit": "kg",
    "value": "110"
  },
  "class": "Starfighter",
  "consumables": {
    "known": true,
    "max": 1,
    "min": 1,
    "number": 1,
    "text": "1",
    "unit": "",
    "value": "1 week"
  },
  "cost_in_credits": {
    "known": true,
    "max": 149999,
    "min": 149999,
    "number": 149999,
    "text": "149,999 credits",
    "unit": "credits",
    "value": "149999"
  },
  "created": "2014-12-12T11:19:05.340000Z",
  "crew": {
    "known": true,
    "max": 1,
    "min": 1,
    "number": 1,
    "text": "1",
    "unit": "",
    "value": "1"
  },
  "edited": "2014-12-20T21:23:49.886000Z",
  "film_count": 1,
  "film_list": [
    {
      "id": "1",
      "kind": "film",
      "name": "A New Hope",
      "url": "https://swapi.info/api/films/1"
    }
  ],
  "film_names": [
    "A New Hope"
  ],
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "hyperdrive_rating": {
    "known": true,
    "max": 1,
    "min": 1,
    "number": 1,
    "text": "1",
    "unit": "",
    "value": "1.0"
  },
  "id": "12",
  "kind": "starship",
  "length": {
    "known": true,
    "max": 12.5,
    "min": 12.5,
    "number": 12.5,
    "number_ft": 41.01,
    "text": "12.5 m (41.01 ft)",
    "unit": "m",
    "value": "12.5"
  },
  "manufacturer": "Incom Corporation",
  "manufacturers": [
    "Incom Corporation"
  ],
  "max_atmosphering_speed": {
    "known": true,
    "max": 1050,
    "min": 1050,
    "number": 1050,
    "text": "1,050",
    "unit": "",
    "value": "1050"
  },
  "model": "T-65 X-wing",
  "name": "X-wing",
  "passengers": {
    "known": true,
    "max": 0,
    "min": 0,
    "number": 0,
    "text": "0",
    "unit": "",
    "value": "0"
  },
  "pilot_count": 1,
  "pilot_list": [
    {
      "id": "1",
      "kind": "character",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "pilot_names": [
    "Luke Skywalker"
  ],
  "pilots": [
    "https://swapi.info/api/people/1"
  ],
  "resource": "starships",
  "starship_class": "Starfighter",
  "url": "https://swapi.info/api/starships/12"
}

Get a vehicle

Get one vehicle in full: its model, manufacturer, class, cost, length, crew and capacity, with every quoted number parsed into one you can compare. Its pilots and films come back named. A vehicle in SWAPI is a craft with no hyperdrive; the ones with are starships, and the two share one set of ids, so an id that is not a vehicle is reported as whichever starship it is. No API key required.

Inputs

VehiclevehicletextRequired
The vehicle to fetch. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.

Outputs

One vehicle, with its pilots and films named.

cargo_capacityobject
How much it can carry, in kilograms.
classtext
The craft's class. SWAPI's casing is inconsistent (both "Starfighter" and "starfighter" are in the data), so compare it case-insensitively.
consumablesobject
How long it can feed its crew without resupplying. A duration such as "2 months" rather than a number.
cost_in_creditsobject
What it cost new, in galactic credits.
createdtext
When the record was created, ISO 8601.
crewobject
How many people are needed to run it.
editedtext
When it was last edited, ISO 8601.
film_countnumber
How many films it appears in there are.
film_listlist
The films it appears in as id, name, kind and url rows.
film_nameslist
The films it appears in, by name, ready to write into a sentence.
filmslist
The films it appears in as the raw SWAPI URLs the API returned.
idtext
The record's id in SWAPI, which is the number at the end of its URL. Every action that takes this record accepts it.
kindtext
The same thing in the singular, e.g. "character".
lengthobject
How long it is, in metres.
manufacturertext
Who built it, as SWAPI's own comma-joined string.
manufacturerslist
The same manufacturers split into a list.
max_atmosphering_speedobject
Top speed in atmosphere. SWAPI's units vary and some values carry them in the string, e.g. "1000km".
modeltext
The official model, e.g. "T-65 X-wing".
nametext
The record's name, or a film's title.
passengersobject
How many non-essential people it can carry.
pilot_countnumber
How many characters who have piloted it there are.
pilot_listlist
The characters who have piloted it as id, name, kind and url rows.
pilot_nameslist
The characters who have piloted it, by name, ready to write into a sentence.
pilotslist
The characters who have piloted it as the raw SWAPI URLs the API returned.
resourcetext
Which SWAPI collection it came from: "films", "people", "planets", "species", "starships" or "vehicles".
urltext
The record's own SWAPI URL.
vehicle_classtext
The same class under SWAPI's own field name.
Example output
{
  "cargo_capacity": {
    "known": true,
    "max": 10,
    "min": 10,
    "number": 10,
    "text": "10 kg",
    "unit": "kg",
    "value": "10"
  },
  "class": "airspeeder",
  "consumables": {
    "known": false,
    "max": null,
    "min": null,
    "number": null,
    "text": "unknown",
    "unit": "",
    "value": "none"
  },
  "cost_in_credits": {
    "known": false,
    "max": null,
    "min": null,
    "number": null,
    "text": "unknown",
    "unit": "credits",
    "value": "unknown"
  },
  "created": "2014-12-15T12:22:12Z",
  "crew": {
    "known": true,
    "max": 2,
    "min": 2,
    "number": 2,
    "text": "2",
    "unit": "",
    "value": "2"
  },
  "edited": "2014-12-20T21:30:21.672000Z",
  "film_count": 1,
  "film_list": [],
  "film_names": [],
  "films": [
    "https://swapi.info/api/films/2"
  ],
  "id": "14",
  "kind": "vehicle",
  "length": {
    "known": true,
    "max": 4.5,
    "min": 4.5,
    "number": 4.5,
    "number_ft": 14.76,
    "text": "4.5 m (14.76 ft)",
    "unit": "m",
    "value": "4.5"
  },
  "manufacturer": "Incom corporation",
  "manufacturers": [
    "Incom corporation"
  ],
  "max_atmosphering_speed": {
    "known": true,
    "max": 650,
    "min": 650,
    "number": 650,
    "text": "650",
    "unit": "",
    "value": "650"
  },
  "model": "t-47 airspeeder",
  "name": "Snowspeeder",
  "passengers": {
    "known": true,
    "max": 0,
    "min": 0,
    "number": 0,
    "text": "0",
    "unit": "",
    "value": "0"
  },
  "pilot_count": 1,
  "pilot_list": [
    {
      "id": "1",
      "kind": "character",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "pilot_names": [
    "Luke Skywalker"
  ],
  "pilots": [
    "https://swapi.info/api/people/1"
  ],
  "resource": "vehicles",
  "url": "https://swapi.info/api/vehicles/14",
  "vehicle_class": "airspeeder"
}

Get an opening crawl

Get the opening crawl of one film, in a shape a message can actually use. SWAPI stores it typeset for a cinema screen, hard-wrapped at about thirty characters with carriage returns on every line, so pasting it into an email gives ragged half-lines. It comes back here three ways: as served, with the carriage returns taken out, and reflowed into the paragraphs it was written in. No API key required.

Inputs

FilmfilmtextRequired
Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.

Outputs

One film's opening crawl, plus what film it is.

directortext
Who directed it.
episodetext
The episode, e.g. "Episode IV".
episode_idnumber
The episode number, 1 to 6.
headingtext
A title line to put above the crawl, e.g. "Episode IV: A New Hope".
idtext
The film's SWAPI id.
opening_crawltext
The crawl exactly as SWAPI stores it, carriage returns and all.
opening_crawl_texttext
The crawl with the carriage returns replaced by plain newlines, still hard-wrapped.
paragraph_countnumber
How many paragraphs the crawl has.
paragraphslist
The same paragraphs as separate strings.
release_datetext
The release date, YYYY-MM-DD.
texttext
The crawl reflowed into paragraphs. This is the one to put in an email, a message or a document.
titletext
The film's title.
urltext
The film's SWAPI url.
word_countnumber
How many words it runs to.
Example output
{
  "director": "George Lucas",
  "episode": "Episode IV",
  "episode_id": 4,
  "heading": "Episode IV: A New Hope",
  "id": "1",
  "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.",
  "opening_crawl_text": "It is a period of civil war.\nRebel spaceships, striking\nfrom a hidden base, have won\ntheir first victory against\nthe evil Galactic Empire.\n\nDuring the battle, Rebel\nspies managed to steal secret\nplans to the Empire's\nultimate weapon, the DEATH\nSTAR, an armored space\nstation with enough power\nto destroy an entire planet.",
  "paragraph_count": 2,
  "paragraphs": [
    "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.",
    "During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet."
  ],
  "release_date": "1977-05-25",
  "text": "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.\n\nDuring the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet.",
  "title": "A New Hope",
  "url": "https://swapi.info/api/films/1",
  "word_count": 54
}

List characters

Browse all 82 of SWAPI's characters at once, or narrow them to the ones worth looking at: one film's cast, one species, one homeworld or one gender. Order them by name, by height, by mass or by age, which works because the birth years are parsed off the in-universe calendar rather than compared as text. No API key required.

Inputs

Filmfilmtext
Optional. Narrow the result to one film. Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.
Speciesspeciestext
Optional. Keep only characters of this species. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter. Note that SWAPI leaves most human characters' species blank, so filtering by "Human" returns only the four it did link.
Homeworldhomeworldtext
Optional. Keep only characters from this planet. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter.
Gendergendertext
Optional. Keep only characters SWAPI records as this gender. Leave it unset for all of them.One of: male, female, hermaphrodite, n/a (Not applicable (the droids)), none (None recorded).
Order bysorttext
Optional. How to order the result. By name by default. A character SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: name (Name (A to Z)), tallest (Tallest first), heaviest (Heaviest first), oldest (Oldest first (by birth year)). Default: name.
Number of resultslimitnumber
Optional. How many characters to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

characterslist
The characters in this page, in the order asked for.
countnumber
How many records are in this page.
film_titletext
The film this result was narrowed to, or null.
has_moretrue/false
Whether there are more records after this page.
homeworld_nametext
The homeworld this was narrowed to, or null.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
sorttext
The order this result was put in.
species_nametext
The species this was narrowed to, or null.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "characters": [
    {
      "birth_year": {
        "era": "BBY",
        "known": true,
        "text": "19 years before the Battle of Yavin",
        "value": "19BBY",
        "years_from_yavin": -19
      },
      "created": "2014-12-09T13:50:51.644000Z",
      "edited": "2014-12-20T21:17:56.891000Z",
      "eye_color": "blue",
      "eye_colors": [
        "blue"
      ],
      "film_count": 4,
      "film_list": [
        {
          "id": "1",
          "kind": "film",
          "name": "A New Hope",
          "url": "https://swapi.info/api/films/1"
        }
      ],
      "film_names": [
        "A New Hope"
      ],
      "films": [
        "https://swapi.info/api/films/1",
        "https://swapi.info/api/films/2",
        "https://swapi.info/api/films/3",
        "https://swapi.info/api/films/6"
      ],
      "gender": "male",
      "hair_color": "blond",
      "hair_colors": [
        "blond"
      ],
      "height": {
        "known": true,
        "max": 172,
        "min": 172,
        "number": 172,
        "number_in": 67.72,
        "text": "172 cm (67.72 in)",
        "unit": "cm",
        "value": "172"
      },
      "homeworld": "https://swapi.info/api/planets/1",
      "homeworld_id": "1",
      "homeworld_name": "Tatooine",
      "id": "1",
      "kind": "character",
      "mass": {
        "known": true,
        "max": 77,
        "min": 77,
        "number": 77,
        "number_lb": 169.76,
        "text": "77 kg (169.76 lb)",
        "unit": "kg",
        "value": "77"
      },
      "name": "Luke Skywalker",
      "resource": "people",
      "skin_color": "fair",
      "skin_colors": [
        "fair"
      ],
      "species": [],
      "species_count": 0,
      "species_list": [],
      "species_names": [],
      "species_text": "not recorded (SWAPI leaves most human characters' species blank)",
      "starship_count": 1,
      "starship_list": [
        {
          "id": "12",
          "kind": "starship",
          "name": "X-wing",
          "url": "https://swapi.info/api/starships/12"
        }
      ],
      "starship_names": [
        "X-wing"
      ],
      "starships": [
        "https://swapi.info/api/starships/12"
      ],
      "url": "https://swapi.info/api/people/1",
      "vehicle_count": 1,
      "vehicle_list": [
        {
          "id": "14",
          "kind": "vehicle",
          "name": "Snowspeeder",
          "url": "https://swapi.info/api/vehicles/14"
        }
      ],
      "vehicle_names": [
        "Snowspeeder"
      ],
      "vehicles": [
        "https://swapi.info/api/vehicles/14"
      ]
    }
  ],
  "count": 1,
  "film_title": null,
  "has_more": false,
  "homeworld_name": null,
  "next_offset": null,
  "sort": "name",
  "species_name": null,
  "total_count": 1
}

List films

List the six films, in either of the two orders people mean by "in order": by episode, which runs from The Phantom Menace, or by release date, which runs from A New Hope. Each film comes back with both numbers and its release date, so a workflow never has to guess which order it is holding. No API key required.

Inputs

Directordirectortext
Optional. Keep only films whose director contains this text. "Lucas" finds the four George Lucas directed.
Order bysorttext
Optional. How to order the result. By episode by default. A film SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: episode (Episode number (I to VI)), release_date (Release date (1977 first)), title (Title (A to Z)). Default: episode.
Number of resultslimitnumber
Optional. How many films to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

countnumber
How many records are in this page.
directortext
The director filter that was applied, or null.
filmslist
The films in this page, in the order asked for.
has_moretrue/false
Whether there are more records after this page.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
sorttext
The order this result was put in.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "count": 1,
  "director": null,
  "films": [
    {
      "character_count": 1,
      "character_list": [
        {
          "id": "1",
          "kind": "character",
          "name": "Luke Skywalker",
          "url": "https://swapi.info/api/people/1"
        }
      ],
      "character_names": [
        "Luke Skywalker"
      ],
      "characters": [
        "https://swapi.info/api/people/1"
      ],
      "created": "2014-12-10T14:23:31.880000Z",
      "director": "George Lucas",
      "edited": "2014-12-20T19:49:45.256000Z",
      "episode": "Episode IV",
      "episode_id": 4,
      "id": "1",
      "kind": "film",
      "name": "A New Hope",
      "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.",
      "opening_crawl_message": "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.\n\nDuring the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet.",
      "opening_crawl_paragraphs": [
        "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.",
        "During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet."
      ],
      "opening_crawl_text": "It is a period of civil war.\nRebel spaceships, striking\nfrom a hidden base, have won\ntheir first victory against\nthe evil Galactic Empire.\n\nDuring the battle, Rebel\nspies managed to steal secret\nplans to the Empire's\nultimate weapon, the DEATH\nSTAR, an armored space\nstation with enough power\nto destroy an entire planet.",
      "planet_count": 1,
      "planet_list": [
        {
          "id": "1",
          "kind": "planet",
          "name": "Tatooine",
          "url": "https://swapi.info/api/planets/1"
        }
      ],
      "planet_names": [
        "Tatooine"
      ],
      "planets": [
        "https://swapi.info/api/planets/1"
      ],
      "producer": "Gary Kurtz, Rick McCallum",
      "producers": [
        "Gary Kurtz",
        "Rick McCallum"
      ],
      "release_date": "1977-05-25",
      "resource": "films",
      "species": [
        "https://swapi.info/api/species/1"
      ],
      "species_count": 1,
      "species_list": [
        {
          "id": "1",
          "kind": "species",
          "name": "Human",
          "url": "https://swapi.info/api/species/1"
        }
      ],
      "species_names": [
        "Human"
      ],
      "starship_count": 1,
      "starship_list": [
        {
          "id": "12",
          "kind": "starship",
          "name": "X-wing",
          "url": "https://swapi.info/api/starships/12"
        }
      ],
      "starship_names": [
        "X-wing"
      ],
      "starships": [
        "https://swapi.info/api/starships/12"
      ],
      "title": "A New Hope",
      "url": "https://swapi.info/api/films/1",
      "vehicle_count": 1,
      "vehicle_list": [
        {
          "id": "14",
          "kind": "vehicle",
          "name": "Snowspeeder",
          "url": "https://swapi.info/api/vehicles/14"
        }
      ],
      "vehicle_names": [
        "Snowspeeder"
      ],
      "vehicles": [
        "https://swapi.info/api/vehicles/14"
      ]
    }
  ],
  "has_more": false,
  "next_offset": null,
  "sort": "episode",
  "total_count": 1
}

List planets

Browse all 60 of SWAPI's planets at once, or narrow them by climate, by terrain or to the ones in one film. Climate and terrain are matched as words inside SWAPI's own comma-joined strings, so "desert" finds a planet recorded as "desert, mountains" too. Order them by name, population, diameter or year length. No API key required.

Inputs

Filmfilmtext
Optional. Narrow the result to one film. Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.
Climateclimatetext
Optional. Keep only planets whose climate mentions this word. Capitals do not matter.
Terrainterraintext
Optional. Keep only planets whose terrain mentions this word. Capitals do not matter.
Order bysorttext
Optional. How to order the result. By name by default. A planet SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: name (Name (A to Z)), population (Most populous first), diameter (Largest first), orbital_period (Longest year first). Default: name.
Number of resultslimitnumber
Optional. How many planets to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

climatetext
The climate filter that was applied, or null.
countnumber
How many records are in this page.
film_titletext
The film this result was narrowed to, or null.
has_moretrue/false
Whether there are more records after this page.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
planetslist
The planets in this page, in the order asked for.
sorttext
The order this result was put in.
terraintext
The terrain filter that was applied, or null.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "climate": null,
  "count": 1,
  "film_title": null,
  "has_more": false,
  "next_offset": null,
  "planets": [
    {
      "climate": "arid",
      "climates": [
        "arid"
      ],
      "created": "2014-12-09T13:50:49.641000Z",
      "diameter": {
        "known": true,
        "max": 10465,
        "min": 10465,
        "number": 10465,
        "text": "10,465 km",
        "unit": "km",
        "value": "10465"
      },
      "edited": "2014-12-20T20:58:18.411000Z",
      "film_count": 1,
      "film_list": [
        {
          "id": "1",
          "kind": "film",
          "name": "A New Hope",
          "url": "https://swapi.info/api/films/1"
        }
      ],
      "film_names": [
        "A New Hope"
      ],
      "films": [
        "https://swapi.info/api/films/1"
      ],
      "gravity": "1 standard",
      "id": "1",
      "kind": "planet",
      "name": "Tatooine",
      "orbital_period": {
        "known": true,
        "max": 304,
        "min": 304,
        "number": 304,
        "text": "304 days",
        "unit": "days",
        "value": "304"
      },
      "population": {
        "known": true,
        "max": 200000,
        "min": 200000,
        "number": 200000,
        "text": "200,000 people",
        "unit": "people",
        "value": "200000"
      },
      "resident_count": 1,
      "resident_list": [
        {
          "id": "1",
          "kind": "character",
          "name": "Luke Skywalker",
          "url": "https://swapi.info/api/people/1"
        }
      ],
      "resident_names": [
        "Luke Skywalker"
      ],
      "residents": [
        "https://swapi.info/api/people/1"
      ],
      "resource": "planets",
      "rotation_period": {
        "known": true,
        "max": 23,
        "min": 23,
        "number": 23,
        "text": "23 hours",
        "unit": "hours",
        "value": "23"
      },
      "surface_water": {
        "known": true,
        "max": 1,
        "min": 1,
        "number": 1,
        "text": "1%",
        "unit": "%",
        "value": "1"
      },
      "terrain": "desert",
      "terrains": [
        "desert"
      ],
      "url": "https://swapi.info/api/planets/1"
    }
  ],
  "sort": "name",
  "terrain": null,
  "total_count": 1
}

List species

Browse all 37 of SWAPI's species at once, or narrow them by classification, designation, language or film. The classifications are written by hand rather than picked from a vocabulary, so both "mammal" and "mammals" are in the data and both spellings are matched. Order them by name, classification, height or lifespan. No API key required.

Inputs

Filmfilmtext
Optional. Narrow the result to one film. Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.
Classificationclassificationtext
Optional. Keep only species whose classification mentions this word. "mammal" also finds the ones SWAPI spelled "mammals".
Designationdesignationtext
Optional. Keep only species with this designation. Almost every species in SWAPI is sentient.
Languagelanguagetext
Optional. Keep only species whose language contains this text.
Order bysorttext
Optional. How to order the result. By name by default. A species SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: name (Name (A to Z)), classification (Classification (A to Z)), tallest (Tallest first), longest_living (Longest lived first). Default: name.
Number of resultslimitnumber
Optional. How many species to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

classificationtext
The classification filter that was applied, or null.
countnumber
How many records are in this page.
designationtext
The designation filter that was applied, or null.
film_titletext
The film this result was narrowed to, or null.
has_moretrue/false
Whether there are more records after this page.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
sorttext
The order this result was put in.
specieslist
The species in this page, in the order asked for.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "classification": null,
  "count": 1,
  "designation": null,
  "film_title": null,
  "has_more": false,
  "next_offset": null,
  "sort": "name",
  "species": [
    {
      "average_height": {
        "known": true,
        "max": 180,
        "min": 180,
        "number": 180,
        "number_in": 70.87,
        "text": "180 cm (70.87 in)",
        "unit": "cm",
        "value": "180"
      },
      "average_lifespan": {
        "known": true,
        "max": 120,
        "min": 120,
        "number": 120,
        "text": "120 years",
        "unit": "years",
        "value": "120"
      },
      "classification": "mammal",
      "created": "2014-12-10T13:52:11.567000Z",
      "designation": "sentient",
      "edited": "2014-12-20T21:36:42.136000Z",
      "eye_colors": [
        "brown",
        "blue",
        "green",
        "hazel",
        "grey",
        "amber"
      ],
      "film_count": 1,
      "film_list": [
        {
          "id": "1",
          "kind": "film",
          "name": "A New Hope",
          "url": "https://swapi.info/api/films/1"
        }
      ],
      "film_names": [
        "A New Hope"
      ],
      "films": [
        "https://swapi.info/api/films/1"
      ],
      "hair_colors": [
        "blonde",
        "brown",
        "black",
        "red"
      ],
      "homeworld": "https://swapi.info/api/planets/9",
      "homeworld_id": null,
      "homeworld_name": null,
      "id": "1",
      "kind": "species",
      "language": "Galactic Basic",
      "name": "Human",
      "people": [
        "https://swapi.info/api/people/1"
      ],
      "person_count": 1,
      "person_list": [
        {
          "id": "1",
          "kind": "character",
          "name": "Luke Skywalker",
          "url": "https://swapi.info/api/people/1"
        }
      ],
      "person_names": [
        "Luke Skywalker"
      ],
      "resource": "species",
      "skin_colors": [
        "caucasian",
        "black",
        "asian",
        "hispanic"
      ],
      "url": "https://swapi.info/api/species/1"
    }
  ],
  "total_count": 1
}

List starships

Browse all 36 of SWAPI's starships at once, or narrow them by class, manufacturer, pilot or film. SWAPI's casing is inconsistent ("Starfighter" and "starfighter" are both in the data), so the class filter matches either. Order them by name, length, cost or crew. No API key required.

Inputs

Filmfilmtext
Optional. Narrow the result to one film. Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.
Classstarship_classtext
Optional. Keep only starships whose class contains this text. "starfighter" finds all eleven, however SWAPI capitalised each one.
Manufacturermanufacturertext
Optional. Keep only craft whose manufacturer contains this text. SWAPI lists several manufacturers in one comma-joined string, so a partial name such as "Incom" matches them all.
Piloted bypilottext
Optional. Keep only the craft this character has piloted. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter. Only a handful of craft have a named pilot in SWAPI.
Order bysorttext
Optional. How to order the result. By name by default. A starship SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: name (Name (A to Z)), longest (Longest first), costliest (Most expensive first), largest_crew (Largest crew first). Default: name.
Number of resultslimitnumber
Optional. How many starships to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

classtext
The class filter that was applied, or null.
countnumber
How many records are in this page.
film_titletext
The film this result was narrowed to, or null.
has_moretrue/false
Whether there are more records after this page.
manufacturertext
The manufacturer filter that was applied, or null.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
pilot_nametext
The pilot this was narrowed to, or null.
sorttext
The order this result was put in.
starshipslist
The starships in this page, in the order asked for.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "class": null,
  "count": 1,
  "film_title": null,
  "has_more": false,
  "manufacturer": null,
  "next_offset": null,
  "pilot_name": null,
  "sort": "name",
  "starships": [
    {
      "MGLT": {
        "known": true,
        "max": 100,
        "min": 100,
        "number": 100,
        "text": "100 MGLT",
        "unit": "MGLT",
        "value": "100"
      },
      "cargo_capacity": {
        "known": true,
        "max": 110,
        "min": 110,
        "number": 110,
        "text": "110 kg",
        "unit": "kg",
        "value": "110"
      },
      "class": "Starfighter",
      "consumables": {
        "known": true,
        "max": 1,
        "min": 1,
        "number": 1,
        "text": "1",
        "unit": "",
        "value": "1 week"
      },
      "cost_in_credits": {
        "known": true,
        "max": 149999,
        "min": 149999,
        "number": 149999,
        "text": "149,999 credits",
        "unit": "credits",
        "value": "149999"
      },
      "created": "2014-12-12T11:19:05.340000Z",
      "crew": {
        "known": true,
        "max": 1,
        "min": 1,
        "number": 1,
        "text": "1",
        "unit": "",
        "value": "1"
      },
      "edited": "2014-12-20T21:23:49.886000Z",
      "film_count": 1,
      "film_list": [
        {
          "id": "1",
          "kind": "film",
          "name": "A New Hope",
          "url": "https://swapi.info/api/films/1"
        }
      ],
      "film_names": [
        "A New Hope"
      ],
      "films": [
        "https://swapi.info/api/films/1"
      ],
      "hyperdrive_rating": {
        "known": true,
        "max": 1,
        "min": 1,
        "number": 1,
        "text": "1",
        "unit": "",
        "value": "1.0"
      },
      "id": "12",
      "kind": "starship",
      "length": {
        "known": true,
        "max": 12.5,
        "min": 12.5,
        "number": 12.5,
        "number_ft": 41.01,
        "text": "12.5 m (41.01 ft)",
        "unit": "m",
        "value": "12.5"
      },
      "manufacturer": "Incom Corporation",
      "manufacturers": [
        "Incom Corporation"
      ],
      "max_atmosphering_speed": {
        "known": true,
        "max": 1050,
        "min": 1050,
        "number": 1050,
        "text": "1,050",
        "unit": "",
        "value": "1050"
      },
      "model": "T-65 X-wing",
      "name": "X-wing",
      "passengers": {
        "known": true,
        "max": 0,
        "min": 0,
        "number": 0,
        "text": "0",
        "unit": "",
        "value": "0"
      },
      "pilot_count": 1,
      "pilot_list": [
        {
          "id": "1",
          "kind": "character",
          "name": "Luke Skywalker",
          "url": "https://swapi.info/api/people/1"
        }
      ],
      "pilot_names": [
        "Luke Skywalker"
      ],
      "pilots": [
        "https://swapi.info/api/people/1"
      ],
      "resource": "starships",
      "starship_class": "Starfighter",
      "url": "https://swapi.info/api/starships/12"
    }
  ],
  "total_count": 1
}

List vehicles

Browse all 39 of SWAPI's vehicles at once, or narrow them by class, manufacturer, pilot or film. SWAPI's spelling is inconsistent ("air speeder" and "airspeeder" are both in the data), so match on the part of the class you are sure of. Order them by name, length, cost or crew. No API key required.

Inputs

Filmfilmtext
Optional. Narrow the result to one film. Name it by title, by episode ("Episode IV" or "Episode 4"), or by its SWAPI id. Note that a bare number is read as the id, and the ids are not the episode numbers: film 1 is Episode IV, because SWAPI numbers the films in release order.
Classvehicle_classtext
Optional. Keep only vehicles whose class contains this text. "walker" finds the assault walkers and the wheeled walkers alike.
Manufacturermanufacturertext
Optional. Keep only craft whose manufacturer contains this text. SWAPI lists several manufacturers in one comma-joined string, so a partial name such as "Incom" matches them all.
Piloted bypilottext
Optional. Keep only the craft this character has piloted. Give its name, its SWAPI id, or the SWAPI url from an earlier step: all three work. Capitals, accents and punctuation do not matter. Only a handful of craft have a named pilot in SWAPI.
Order bysorttext
Optional. How to order the result. By name by default. A vehicle SWAPI never recorded the sorted value for goes to the end rather than to the front.One of: name (Name (A to Z)), longest (Longest first), costliest (Most expensive first), largest_crew (Largest crew first). Default: name.
Number of resultslimitnumber
Optional. How many vehicles to return in this page. Between 1 and 100; 100 by default, which is enough to hold every record SWAPI has of this kind, so lower it only to shorten the result.From 1 to 100. Default: 100.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

classtext
The class filter that was applied, or null.
countnumber
How many records are in this page.
film_titletext
The film this result was narrowed to, or null.
has_moretrue/false
Whether there are more records after this page.
manufacturertext
The manufacturer filter that was applied, or null.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
pilot_nametext
The pilot this was narrowed to, or null.
sorttext
The order this result was put in.
total_countnumber
How many records matched in total, across every page.
vehicleslist
The vehicles in this page, in the order asked for.
Example output
{
  "class": null,
  "count": 1,
  "film_title": null,
  "has_more": false,
  "manufacturer": null,
  "next_offset": null,
  "pilot_name": null,
  "sort": "name",
  "total_count": 1,
  "vehicles": [
    {
      "cargo_capacity": {
        "known": true,
        "max": 10,
        "min": 10,
        "number": 10,
        "text": "10 kg",
        "unit": "kg",
        "value": "10"
      },
      "class": "airspeeder",
      "consumables": {
        "known": false,
        "max": null,
        "min": null,
        "number": null,
        "text": "unknown",
        "unit": "",
        "value": "none"
      },
      "cost_in_credits": {
        "known": false,
        "max": null,
        "min": null,
        "number": null,
        "text": "unknown",
        "unit": "credits",
        "value": "unknown"
      },
      "created": "2014-12-15T12:22:12Z",
      "crew": {
        "known": true,
        "max": 2,
        "min": 2,
        "number": 2,
        "text": "2",
        "unit": "",
        "value": "2"
      },
      "edited": "2014-12-20T21:30:21.672000Z",
      "film_count": 1,
      "film_list": [],
      "film_names": [],
      "films": [
        "https://swapi.info/api/films/2"
      ],
      "id": "14",
      "kind": "vehicle",
      "length": {
        "known": true,
        "max": 4.5,
        "min": 4.5,
        "number": 4.5,
        "number_ft": 14.76,
        "text": "4.5 m (14.76 ft)",
        "unit": "m",
        "value": "4.5"
      },
      "manufacturer": "Incom corporation",
      "manufacturers": [
        "Incom corporation"
      ],
      "max_atmosphering_speed": {
        "known": true,
        "max": 650,
        "min": 650,
        "number": 650,
        "text": "650",
        "unit": "",
        "value": "650"
      },
      "model": "t-47 airspeeder",
      "name": "Snowspeeder",
      "passengers": {
        "known": true,
        "max": 0,
        "min": 0,
        "number": 0,
        "text": "0",
        "unit": "",
        "value": "0"
      },
      "pilot_count": 1,
      "pilot_list": [
        {
          "id": "1",
          "kind": "character",
          "name": "Luke Skywalker",
          "url": "https://swapi.info/api/people/1"
        }
      ],
      "pilot_names": [
        "Luke Skywalker"
      ],
      "pilots": [
        "https://swapi.info/api/people/1"
      ],
      "resource": "vehicles",
      "url": "https://swapi.info/api/vehicles/14",
      "vehicle_class": "airspeeder"
    }
  ]
}

Search Star Wars

Find anything in SWAPI whose name matches some text, across the films, characters, planets, species, starships and vehicles at once. This is how a workflow turns what a person typed into the record the other actions take, and it is the only way there is: SWAPI has no search endpoint. "Tatooine" comes back as a planet and "Millennium Falcon" as a starship without the caller having to know which is which, and every match says what it is and why it matched. No API key required.

Inputs

Search textquerytextRequired
The name to look for. Capitals, accents, punctuation and a leading "the" do not matter, so "the millennium falcon" and "Millennium Falcon" find the same starship. Part of a name works too, and so does a near miss.
Look inresourcestext
Optional. Which collections to search. Pick any number of them; leave it empty to search all six. Narrowing it also makes the step cheaper, because SWAPI serves one file per collection and only the ones searched are fetched.One or more of: films, people (Characters), planets, species, starships, vehicles.
Number of resultslimitnumber
Optional. How many matches to return in this page. Between 1 and 100; 10 by default.From 1 to 100. Default: 10.
Skipoffsetnumber
Optional. How many records to skip before this page. Use the next offset from the previous result to page through. 0 by default.At least 0. Default: 0.

Outputs

countnumber
How many records are in this page.
has_moretrue/false
Whether there are more records after this page.
matcheslist
The matching records in this page, best match first.
next_offsetnumber
The offset to pass to get the next page, or null when this is the last one.
querytext
The text that was searched for.
searchedlist
The collections that were searched.
total_countnumber
How many records matched in total, across every page.
Example output
{
  "count": 1,
  "has_more": false,
  "matches": [
    {
      "id": "1",
      "kind": "character",
      "matched_on": "the name",
      "name": "Luke Skywalker",
      "url": "https://swapi.info/api/people/1"
    }
  ],
  "next_offset": null,
  "query": "luke skywalker",
  "searched": [
    "films",
    "people",
    "planets",
    "species",
    "starships",
    "vehicles"
  ],
  "total_count": 1
}

On this page