Skip to content

Latest commit

 

History

History
227 lines (150 loc) · 9.14 KB

README.md

File metadata and controls

227 lines (150 loc) · 9.14 KB

r/SpaceX API V4 Docs

Run in Postman

Disclaimer

We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Space Exploration Technologies Inc (SpaceX), or any of its subsidiaries or its affiliates. The names SpaceX as well as related names, marks, emblems and images are registered trademarks of their respective owners.

Base URL

https://api.spacexdata.com/v4

Authentication

Authentication via api key is required for all destructive routes. This includes all create, update, and delete routes.

Authenticate by passing the header spacex-key with your api key. Protected routes return 401 without a valid key.

Pagination + Custom Queries

All /query routes support pagination, custom queries, and other output controls.

See the pagination + query guide for more details and examples.

Launch date FAQ's

  • Why does the date appear wrong? - This is usually due to the way we store and display partial dates in the api. For example, a launch scheduled for 2020 July would be represented as 2020-07-01T00:00:00.000Z. In this case, the field date_precision would be set as month, meaning the date is only valid to the month level, or 2020-07

Launch date field explanations

  • date_utc - UTC launch date/time in ISO 8601 format

  • date_unix - UTC launch date/time as a UNIX timestamp in seconds

  • date_local - Local launch time with time zone offset in ISO 8601 format

  • date_precision - Gives the date precision for partial dates. Valid values are quarter, half, year, month, day, hour.

  • tbd - Set as true if date is To be determined

  • net - Set as true if the date is No earlier than

Caching

The api makes use of response caching via Redis for all GET requests, and POST requests on /query endpoints.

Standard cache times are as follows:

launches - 20 seconds

capsules, cores, launchpads, landpads, crew, ships, payloads - 5 minutes

dragons, rockets - 24 hours

Cache can be cleared with the following endpoint:

Routes

🔒 = Requires Auth

Capsules - Schema

Detailed info for serialized dragon capsules

Company Info - Schema

Detailed info about SpaceX as a company

Cores - Schema

Detailed info for serialized first stage cores

Crew - Schema

Detailed info on dragon crew members

Dragons - Schema

Detailed info about dragon capsule versions

Landpads - Schema

Detailed info about landing pads and ships

Launches - Schema

Detailed info about launches

Launchpads - Schema

Detailed info about launchpads

Payloads - Schema

Detailed info about launch payloads

Fairings - Schema

Detailed info on SpaceX fairings

Roadster info - Schema

Detailed info about Elon's Tesla roadster's current position

Rockets - Schema

Detailed info about rocket versions

Ships - Schema

Detailed info about ships in the SpaceX fleet

Starlink - Schema

Detailed info about Starlink satellites and orbits

Includes raw orbit data from Space Track, updated hourly.

Space Track data adheres to the standard for Orbit Data Messages

History - Schema

Detailed info on SpaceX historical events