SWAPI - Star Wars API logo

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...

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)
SDK
📦
Swift SDK (bratwursted)
SDK
📦
R Client (LionyxML)
SDK
💻
Java + Spring Sample
CodeExamples
💻
Flutter + GraphQL Sample
CodeExamples
🔗
Community OpenAPI (kamilkodzi)
OpenAPI
🔗
NaftikoVocabulary
NaftikoVocabulary
🔗
JsonLdContext
JsonLdContext
🔗
SpectralRuleset
SpectralRuleset
🔗
APICommonsPlans
APICommonsPlans
🔗
APICommonsRateLimits
APICommonsRateLimits

Sources

Raw ↑
aid: swapi
name: SWAPI - Star Wars API
description: >-
  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.
url: https://swapi.dev/
image: https://avatars.githubusercontent.com/u/2014472?s=200
specificationVersion: '0.20'
created: '2026-05-28'
modified: '2026-05-29'
x-source: public-apis/public-apis
x-category: Video
x-tier: 2
x-tier-reason: enriched-during-pipeline-run
x-type: opensource
tags:
- Star Wars
- Open Source
- Teaching API
- Public API
- REST
- GraphQL
- Entertainment
- Datasets
apis:
- name: SWAPI REST API (swapi.dev)
  description: >-
    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 resource schemas). Six top-level resources: films,
    people, planets, species, starships, vehicles. Read-only, no authentication required.
  humanURL: https://swapi.dev/
  baseURL: https://swapi.dev/api
  tags:
  - REST
  - Star Wars
  - Open Source
  properties:
  - type: Documentation
    url: https://swapi.dev/documentation
  - type: OpenAPI
    url: openapi/swapi-openapi.yml
  - type: SourceCode
    url: https://github.com/Juriy/swapi
  - url: graphql/swapi-graphql.md
    type: GraphQL
- name: SWAPI REST API (swapi.tech)
  description: >-
    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/Reddit community surfaces. Exposes the same six
    top-level resources (films, people, planets, species, starships, vehicles).
  humanURL: https://www.swapi.tech/
  baseURL: https://www.swapi.tech/api
  tags:
  - REST
  - Star Wars
  - Open Source
  properties:
  - type: Documentation
    url: https://www.swapi.tech/
  - type: SourceCode
    url: https://github.com/semperry/swapi
common:
- type: Website
  url: https://swapi.dev/
- type: PublicAPIsListing
  url: https://github.com/public-apis/public-apis
- type: GitHubOrganization
  url: https://github.com/Juriy/swapi
- type: License
  url: https://github.com/Juriy/swapi/blob/master/LICENSE
- type: Tools
  title: MCP Server (johnpapa)
  url: https://github.com/johnpapa/mcp-starwars
- type: Tools
  title: MCP Server (olaekdahl)
  url: https://github.com/olaekdahl/swapi-mcp-server
- type: Tools
  title: MCP Server (glaucia86)
  url: https://github.com/glaucia86/swapi-mcp-server-app
- type: Tools
  title: MCP Server (Qwizi)
  url: https://github.com/Qwizi/swapi-mcp
- type: SDK
  title: Android SDK (Oleur)
  url: https://github.com/Oleur/SWAPI-Android-SDK
- type: SDK
  title: Swift SDK (bratwursted)
  url: https://github.com/bratwursted/swapi-swift
- type: SDK
  title: R Client (LionyxML)
  url: https://github.com/LionyxML/r-swapi-client
- type: CodeExamples
  title: Java + Spring Sample
  url: https://github.com/vininjr/starwars
- type: CodeExamples
  title: Flutter + GraphQL Sample
  url: https://github.com/kranfix/flutter_graphql_swapi
- type: OpenAPI
  title: Community OpenAPI (kamilkodzi)
  url: https://github.com/kamilkodzi/oas-swapi
- type: NaftikoVocabulary
  url: vocabulary/swapi-vocabulary.yaml
- type: JsonLdContext
  url: json-ld/swapi-context.jsonld
- type: SpectralRuleset
  url: rules/swapi-spectral-rules.yml
- type: APICommonsPlans
  url: plans/swapi-plans-pricing.yml
- type: APICommonsRateLimits
  url: rate-limits/swapi-rate-limits.yml
maintainers:
- FN: Kin Lane
  email: kin@apievangelist.com