SpaceX (Community API) Ships API

Detailed info about ships in the SpaceX fleet.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

GET /v4/ships List All Ships #
GET /v4/ships/{id} Get One Ship #
POST /v4/ships/query Query Ships #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spacex:spacex-ships-api"
All apis
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.

Get an API 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spacex-ships-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SpaceX REST Ships API
  description: 'Community-maintained, open-source REST API for SpaceX data — launches, rockets,

    capsules, cores, crew, dragons, payloads, ships, landpads, launchpads, Starlink

    satellites, the Tesla Roadster ephemeris, company info, and historical events.

    Source: https://github.com/r-spacex/SpaceX-API (Apache 2.0).


    STATUS: Maintenance-only as of 2024. New launches/missions are NOT being added.

    Existing data remains queryable; project remains hosted for historical lookups

    and as a teaching/sample API.


    Each resource is independently versioned. The Launches resource has both v4 and

    v5 surfaces; v5 omits the v4 response/query transforms (`tdb` typo retained for v4

    parity). All other resources are v4-only.


    Authentication: only required for destructive (create/update/delete) admin routes

    via the `spacex-key` header. All read operations are public.


    Querying: every resource exposes a POST `/{resource}/query` endpoint that accepts

    a mongoose-paginate-v2 body of the form `{ query: , options: {...} }`.'
  version: '4.0'
  contact:
    name: r-spacex community
    url: https://github.com/r-spacex/SpaceX-API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-generated-from: documentation
  x-last-validated: '2026-05-29'
  x-status: maintenance-only
servers:
- url: https://api.spacexdata.com
  description: Canonical hosted REST endpoint (community-operated)
security: []
tags:
- name: Ships
  description: Detailed info about ships in the SpaceX fleet.
paths:
  /v4/ships:
    get:
      operationId: listShips
      summary: List All Ships
      description: Return every ship in the SpaceX fleet (droneships, recovery ships, support).
      tags:
      - Ships
      responses:
        '200':
          description: Array of ship records.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Ship'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v4/ships/{id}:
    get:
      operationId: getShip
      summary: Get One Ship
      description: Return a single ship by its UUID.
      tags:
      - Ships
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Ship record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ship'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v4/ships/query:
    post:
      operationId: queryShips
      summary: Query Ships
      description: Run a mongoose-paginate-v2 query against the ships collection.
      tags:
      - Ships
      requestBody:
        $ref: '#/components/requestBodies/QueryBody'
      responses:
        '200':
          description: Paginated ship result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedShips'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Ship:
      type: object
      description: A ship in the SpaceX fleet (droneship, recovery, support).
      properties:
        id:
          type: string
        name:
          type: string
        legacy_id:
          type:
          - string
          - 'null'
        model:
          type:
          - string
          - 'null'
        type:
          type:
          - string
          - 'null'
        roles:
          type: array
          items:
            type: string
        active:
          type: boolean
        imo:
          type:
          - integer
          - 'null'
        mmsi:
          type:
          - integer
          - 'null'
        abs:
          type:
          - integer
          - 'null'
        class:
          type:
          - integer
          - 'null'
        mass_kg:
          type:
          - number
          - 'null'
        mass_lbs:
          type:
          - number
          - 'null'
        year_built:
          type:
          - integer
          - 'null'
        home_port:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        speed_kn:
          type:
          - number
          - 'null'
        course_deg:
          type:
          - number
          - 'null'
        latitude:
          type:
          - number
          - 'null'
        longitude:
          type:
          - number
          - 'null'
        last_ais_update:
          type:
          - string
          - 'null'
          format: date-time
        link:
          type:
          - string
          - 'null'
          format: uri
        image:
          type:
          - string
          - 'null'
          format: uri
        launches:
          type: array
          items:
            type: string
      required:
      - name
      - active
    QueryRequest:
      type: object
      description: mongoose-paginate-v2 query body.
      properties:
        query:
          type: object
          description: MongoDB find() filter document.
          additionalProperties: true
        options:
          type: object
          description: Pagination + projection options.
          properties:
            select:
              description: Fields to include/exclude (string or object).
              oneOf:
              - type: string
              - type: object
            sort:
              description: Sort order (string or object).
              oneOf:
              - type: string
              - type: object
            offset:
              type: integer
            page:
              type: integer
            limit:
              type: integer
            pagination:
              type: boolean
            populate:
              description: Populate definitions (array, object, or string).
              oneOf:
              - type: array
                items: {}
              - type: object
              - type: string
    PaginationEnvelope:
      type: object
      description: Default mongoose-paginate-v2 wrapper.
      properties:
        totalDocs:
          type: integer
        offset:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
        page:
          type: integer
        pagingCounter:
          type: integer
        hasPrevPage:
          type: boolean
        hasNextPage:
          type: boolean
        prevPage:
          type:
          - integer
          - 'null'
        nextPage:
          type:
          - integer
          - 'null'
    Error:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
        status:
          type: integer
          description: HTTP status code echoed in body.
    PaginatedShips:
      allOf:
      - $ref: '#/components/schemas/PaginationEnvelope'
      - type: object
        properties:
          docs:
            type: array
            items:
              $ref: '#/components/schemas/Ship'
  requestBodies:
    QueryBody:
      description: mongoose-paginate-v2 query body.
      required: false
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QueryRequest'
          example:
            query: {}
            options:
              limit: 10
              page: 1
  parameters:
    IdParam:
      name: id
      in: path
      required: true
      description: Resource UUID (MongoDB ObjectId, e.g. `5e9d0d95eda69973a809d1ec`).
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  securitySchemes:
    SpacexKey:
      type: apiKey
      in: header
      name: spacex-key
      description: 'Admin API key for destructive (create/update/delete) operations.

        Not required for any read endpoint.

        '