Documentation
RESTful public API with data about the Star Wars universe. All successful GETs return 200; nonexistent ids return 404. The same data is also exposed as an MCP server (Streamable HTTP) at /mcp.
OpenAPI 3.1.0 · version 2.15.0 ·
Download the spec and generate a client:
npx @openapitools/openapi-generator-cli generate -i /openapi.json -g typescript-fetch
Root
API entry point
GET
/api
List all available resources — Returns the URLs of every resource collection, built from the request's base URL.
Films
Star Wars films
GET
/api/films?search=hope
List all films — Returns every film, or only those whose title matches the search query.
GET
/api/films/{id}
Get a film by id 200 / 404
GET
/api/films/random
Get a random film
Film fields
| Field | Type | Description |
|---|---|---|
| title | string | Title of this film |
| episode_id | integer | Episode number of this film in the saga |
| opening_crawl | string | Opening crawl text at the beginning of this film |
| director | string | Director of this film |
| producer | string | Producer(s) of this film, comma-separated |
| release_date | string | Release date (ISO 8601 date) at original creator country |
| characters | array of string | URLs of the people resources that appear in this film |
| planets | array of string | URLs of the planet resources that appear in this film |
| starships | array of string | URLs of the starship resources that appear in this film |
| vehicles | array of string | URLs of the vehicle resources that appear in this film |
| species | array of string | URLs of the species resources that appear in this film |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |
People
People within the Star Wars universe
GET
/api/people?search=luke
List all people — Returns every person, or only those whose name matches the search query.
GET
/api/people/{id}
Get a person by id 200 / 404
GET
/api/people/random
Get a random person
People fields
| Field | Type | Description |
|---|---|---|
| name | string | Name of this person |
| height | string | Height in centimeters, as a string; "unknown" when not recorded |
| mass | string | Mass in kilograms, as a string; "unknown" when not recorded |
| hair_color | string | Hair color; "n/a" when the person has no hair |
| skin_color | string | Skin color |
| eye_color | string | Eye color |
| birth_year | string | Birth year, relative to the Battle of Yavin (BBY/ABY), e.g. "19BBY" |
| gender | string | Gender; "n/a" for droids |
| homeworld | string | URL of the planet resource this person was born on |
| films | array of string | URLs of the film resources this person appeared in |
| species | array of string | URLs of the species resources this person belongs to |
| vehicles | array of string | URLs of the vehicle resources this person has piloted |
| starships | array of string | URLs of the starship resources this person has piloted |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |
Planets
Planets in the Star Wars universe
GET
/api/planets?search=tatooine
List all planets — Returns every planet, or only those whose name matches the search query.
GET
/api/planets/{id}
Get a planet by id 200 / 404
GET
/api/planets/random
Get a random planet
Planet fields
| Field | Type | Description |
|---|---|---|
| name | string | Name of this planet |
| rotation_period | string | Rotation period in standard hours, as a string |
| orbital_period | string | Orbital period in standard days, as a string |
| diameter | string | Diameter in kilometers, as a string |
| climate | string | Climate(s), comma-separated |
| gravity | string | Gravity, where "1 standard" is Earth-like, e.g. "1 standard", "2.5 standard" |
| terrain | string | Terrain type(s), comma-separated |
| surface_water | string | Percentage of the surface covered by water, as a string |
| population | string | Average population; "unknown" when not recorded |
| residents | array of string | URLs of the people resources that live on this planet |
| films | array of string | URLs of the film resources this planet appeared in |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |
Species
Species in the Star Wars universe
GET
/api/species?search=wookiee
List all species — Returns every species, or only those whose name matches the search query.
GET
/api/species/{id}
Get a species by id 200 / 404
GET
/api/species/random
Get a random species
Specie fields
| Field | Type | Description |
|---|---|---|
| name | string | Name of this species |
| classification | string | Classification, e.g. "mammal", "reptile" |
| designation | string | Designation, e.g. "sentient" |
| average_height | string | Average height in centimeters, as a string |
| skin_colors | string | Common skin colors, comma-separated; "none" when skinless |
| hair_colors | string | Common hair colors, comma-separated; "none" when hairless |
| eye_colors | string | Common eye colors, comma-separated |
| average_lifespan | string | Average lifespan in standard years, as a string |
| homeworld | string | URL of the planet resource this species originates from |
| language | string | Language commonly spoken by this species |
| people | array of string | URLs of the people resources that belong to this species |
| films | array of string | URLs of the film resources this species appeared in |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |
Starships
Starships in the Star Wars universe
GET
/api/starships?search=falcon
List all starships — Returns every starship, or only those whose name matches the search query.
GET
/api/starships/{id}
Get a starship by id 200 / 404
GET
/api/starships/random
Get a random starship
Starship fields
| Field | Type | Description |
|---|---|---|
| name | string | Common name of this starship |
| model | string | Model or official name, e.g. "T-65 X-wing" |
| manufacturer | string | Manufacturer(s), comma-separated |
| cost_in_credits | string | Cost in galactic credits, as a string |
| length | string | Length in meters, as a string |
| max_atmosphering_speed | string | Maximum speed in atmosphere; "n/a" when incapable of atmospheric flight |
| crew | string | Number of personnel needed to run or pilot this starship |
| passengers | string | Number of non-essential people this starship can transport |
| cargo_capacity | string | Maximum cargo capacity in kilograms, as a string |
| consumables | string | Maximum time this starship can provide consumables for its crew |
| hyperdrive_rating | string | Hyperdrive rating class |
| MGLT | string | Maximum speed in megalights per hour |
| starship_class | string | Class of this starship, e.g. "Starfighter" |
| pilots | array of string | URLs of the people resources that have piloted this starship |
| films | array of string | URLs of the film resources this starship appeared in |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |
Stats
Public, anonymous usage counters
GET
/api/stats
Request counts per route for the last 24 hours, 7 days or 30 days — Totals per route template (for example /api/people/{id} or /mcp) and per group (rest, mcp, pages, seo, other), a trend per hour or per UTC day, and the same totals for the window right before, for comparison. Counted with no IP address, no User-Agent and no other data about the client. Without parameters: the last 7 days, per day.
StatsView fields
| Field | Type | Description |
|---|---|---|
| period | string | |
| granularity | string | |
| from | string | |
| to | string | |
| days | integer | |
| countingSince | string | |
| total | integer | |
| routes | object | |
| groups | object | |
| routeGroups | object | |
| series | array of string | |
| previous | ||
| daily | array of string | |
| performance |
Vehicles
Vehicles in the Star Wars universe
GET
/api/vehicles?search=speeder
List all vehicles — Returns every vehicle, or only those whose name matches the search query.
GET
/api/vehicles/{id}
Get a vehicle by id 200 / 404
GET
/api/vehicles/random
Get a random vehicle
Vehicle fields
| Field | Type | Description |
|---|---|---|
| name | string | Common name of this vehicle |
| model | string | Model or official name, e.g. "All-Terrain Attack Transport" |
| manufacturer | string | Manufacturer(s), comma-separated |
| cost_in_credits | string | Cost in galactic credits, as a string |
| length | string | Length in meters, as a string |
| max_atmosphering_speed | string | Maximum speed in atmosphere |
| crew | string | Number of personnel needed to run or pilot this vehicle |
| passengers | string | Number of non-essential people this vehicle can transport |
| cargo_capacity | string | Maximum cargo capacity in kilograms, as a string |
| consumables | string | Maximum time this vehicle can provide consumables for its crew |
| vehicle_class | string | Class of this vehicle, e.g. "Wheeled" |
| pilots | array of string | URLs of the people resources that have piloted this vehicle |
| films | array of string | URLs of the film resources this vehicle appeared in |
| created | string | ISO 8601 timestamp of when this resource was created |
| edited | string | ISO 8601 timestamp of when this resource was last edited |
| url | string | Canonical URL of this resource, built from the request's base URL |