SWAPI - Star Wars API Films API
The Star Wars films (theatrical episodes I-VII supported by the canonical dataset).
The Star Wars films (theatrical episodes I-VII supported by the canonical dataset).
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/swapi:swapi-films-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SWAPI - Star Wars Films API
description: SWAPI (Star Wars API) is a free, open Star Wars REST API.
version: '1.0'
termsOfService: https://swapi.dev/
contact:
name: SWAPI Community
url: https://github.com/Juriy/swapi
license:
name: BSD-3-Clause
url: https://github.com/Juriy/swapi/blob/master/LICENSE
x-generated-from: documentation
x-last-validated: '2026-05-29'
servers:
- url: https://swapi.dev/api
description: swapi.dev — Python/Django mirror (primary)
- url: https://www.swapi.tech/api
description: swapi.tech — Node/MongoDB mirror (alternate)
tags:
- name: Films
description: The Star Wars films (theatrical episodes I-VII supported by the canonical dataset).
paths:
/films/:
get:
tags:
- Films
operationId: listFilms
summary: List All Films
description: Returns a paginated list of all Star Wars films known to SWAPI.
parameters:
- $ref: '#/components/parameters/SearchParam'
- $ref: '#/components/parameters/PageParam'
responses:
'200':
description: A page of films.
content:
application/json:
schema:
$ref: '#/components/schemas/FilmList'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/films/{id}/:
get:
tags:
- Films
operationId: getFilm
summary: Get Film By Id
description: Returns a single film by its numeric SWAPI id.
parameters:
- $ref: '#/components/parameters/IdParam'
responses:
'200':
description: A single film resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Film'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
parameters:
SearchParam:
name: search
in: query
required: false
description: Case-insensitive partial match against the resource's main name/title field.
schema:
type: string
example: luke
IdParam:
name: id
in: path
required: true
description: Numeric SWAPI identifier for the resource.
schema:
type: integer
minimum: 1
example: 1
PageParam:
name: page
in: query
required: false
description: One-based page number for paginated list responses (10 items per page).
schema:
type: integer
minimum: 1
example: 1
schemas:
Film:
type: object
description: A canonical Star Wars film.
required:
- title
- episode_id
- url
properties:
title:
type: string
description: Title of the film.
example: A New Hope
episode_id:
type: integer
description: Episode number.
example: 4
opening_crawl:
type: string
description: Opening crawl text shown at the start of the film.
director:
type: string
description: Name of the film's director.
example: George Lucas
producer:
type: string
description: Comma-separated list of producer names.
example: Gary Kurtz, Rick McCallum
release_date:
type: string
format: date
description: Theatrical release date.
example: '1977-05-25'
characters:
type: array
description: URLs of characters appearing in this film.
items:
type: string
format: uri
planets:
type: array
description: URLs of planets featured in this film.
items:
type: string
format: uri
starships:
type: array
description: URLs of starships appearing in this film.
items:
type: string
format: uri
vehicles:
type: array
description: URLs of vehicles appearing in this film.
items:
type: string
format: uri
species:
type: array
description: URLs of species appearing in this film.
items:
type: string
format: uri
created:
type: string
format: date-time
description: ISO 8601 timestamp of when this resource was created in the SWAPI database.
edited:
type: string
format: date-time
description: ISO 8601 timestamp of when this resource was last edited.
url:
type: string
format: uri
description: Canonical URL of this resource.
Pagination:
type: object
required:
- count
- results
properties:
count:
type: integer
description: Total number of resources in the collection.
example: 82
next:
type:
- string
- 'null'
format: uri
description: URL of the next page, or null if this is the last page.
example: https://swapi.dev/api/people/?page=2
previous:
type:
- string
- 'null'
format: uri
description: URL of the previous page, or null if this is the first page.
example: null
Error:
type: object
properties:
detail:
type: string
example: Not found.
FilmList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Film'
responses:
NotFound:
description: Resource not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
externalDocs:
description: SWAPI Documentation (swapi.dev)
url: https://swapi.dev/documentation