SWAPI - Star Wars API website screenshot

SWAPI - Star Wars API

SWAPI (Star Wars API) is a free, open Star Wars REST API exposing canonical Star Wars data — films, people, planets, species, starships, and vehicles. Originally built by Paul Hallett (@phalt) at swapi.co, it is now maintained as community mirrors at swapi.dev (Python/Django, @juriy) and www.swapi.tech (Node/MongoDB, @semperry). SWAPI is one of the most widely cited "teaching APIs" in the developer ecosystem.

2 APIs 0 Features
Star WarsOpen SourceTeaching APIPublic APIRESTGraphQLEntertainmentDatasets

APIs

SWAPI REST API (swapi.dev)

The primary live REST mirror of SWAPI, maintained by @juriy at swapi.dev. Preserves the canonical SWAPI response shape (count / next / previous / results paginators and flat res...

SWAPI REST API (swapi.tech)

The Node/MongoDB community rebuild of SWAPI, maintained by @semperry at swapi.tech. Wraps the canonical SWAPI payloads inside `result.properties` envelopes and adds Discord/Redd...

Collections

GraphQL

Pricing Plans

Swapi Plans Pricing

1 plans

PLANS

Rate Limits

Swapi Rate Limits

1 limits

RATE LIMITS

Semantic Vocabularies

Swapi Context

6 classes · 61 properties

JSON-LD

API Governance Rules

SWAPI - Star Wars API API Rules

34 rules · 10 errors 19 warnings 5 info

SPECTRAL

JSON Structure

Swapi Film Structure

0 properties

JSON STRUCTURE

Swapi Person Structure

0 properties

JSON STRUCTURE

Swapi Planet Structure

0 properties

JSON STRUCTURE

Swapi Species Structure

0 properties

JSON STRUCTURE

Swapi Starship Structure

0 properties

JSON STRUCTURE

Swapi Vehicle Structure

0 properties

JSON STRUCTURE

Example Payloads

Swapi Getfilm Example

5 fields

EXAMPLE

Swapi Getperson Example

5 fields

EXAMPLE

Swapi Getplanet Example

5 fields

EXAMPLE

Swapi Getspecies Example

5 fields

EXAMPLE

Swapi Getstarship Example

5 fields

EXAMPLE

Swapi Getvehicle Example

5 fields

EXAMPLE

Swapi Listfilms Example

5 fields

EXAMPLE

Swapi Listpeople Example

5 fields

EXAMPLE

Resources

🔗
Website
Website
🔗
PublicAPIsListing
PublicAPIsListing
👥
GitHubOrganization
GitHubOrganization
🔗
License
License
🔧
MCP Server (johnpapa)
Tools
🔧
MCP Server (olaekdahl)
Tools
🔧
MCP Server (glaucia86)
Tools
🔧
MCP Server (Qwizi)
Tools
📦
Android SDK (Oleur)
SDKs
📦
Swift SDK (bratwursted)
SDKs
📦
R Client (LionyxML)
SDKs
💻
Java + Spring Sample
CodeExamples
💻
Flutter + GraphQL Sample
CodeExamples
🔗
Community OpenAPI (kamilkodzi)
OpenAPI
🔗
JSONLDContext
JSONLDContext
🔗
SpectralRuleset
SpectralRuleset
🔗
APICommonsPlans
APICommonsPlans
🔗
APICommonsRateLimits
APICommonsRateLimits

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: SWAPI - Star Wars API
  version: '1.0'
items:
- info:
    name: Films
    type: folder
  items:
  - info:
      name: List All Films
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/films/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of all Star Wars films known to SWAPI.
  - info:
      name: Get Film By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/films/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single film by its numeric SWAPI id.
- info:
    name: People
    type: folder
  items:
  - info:
      name: List All People
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/people/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of characters from the Star Wars universe.
  - info:
      name: Get Person By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/people/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single Star Wars character by its numeric SWAPI id.
- info:
    name: Planets
    type: folder
  items:
  - info:
      name: List All Planets
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/planets/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of planets featured in the Star Wars films.
  - info:
      name: Get Planet By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/planets/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single planet by its numeric SWAPI id.
- info:
    name: Species
    type: folder
  items:
  - info:
      name: List All Species
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/species/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of sentient and non-sentient species of the Star Wars universe.
  - info:
      name: Get Species By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/species/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single species record by its numeric SWAPI id.
- info:
    name: Starships
    type: folder
  items:
  - info:
      name: List All Starships
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/starships/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of hyperdrive-capable starships.
  - info:
      name: Get Starship By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/starships/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single starship by its numeric SWAPI id.
- info:
    name: Vehicles
    type: folder
  items:
  - info:
      name: List All Vehicles
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/vehicles/
      params:
      - name: search
        value: ''
        type: query
        description: Case-insensitive partial match against the resource's main name/title field.
      - name: page
        value: ''
        type: query
        description: One-based page number for paginated list responses (10 items per page).
    docs: Returns a paginated list of non-hyperdrive vehicles.
  - info:
      name: Get Vehicle By Id
      type: http
    http:
      method: GET
      url: https://swapi.dev/api/vehicles/:id/
      params:
      - name: id
        value: ''
        type: path
        description: Numeric SWAPI identifier for the resource.
    docs: Returns a single vehicle by its numeric SWAPI id.
bundled: true