We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Space Exploration Technologies Corp (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.
https://api.spacexdata.com
Each route is individually versioned, see route list below for all avaliable versions. The API can also be pinned to the lastest version with https://api.spacexdata.com/latest
, but only do this if you're cool with potential breaking changes.
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.
All /query
routes support pagination, custom queries, and other output controls.
See the pagination + query guide for more details and examples.
- 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 as2020-07-01T00:00:00.000Z
. In this case, the fielddate_precision
would be set asmonth
, meaning the date is only valid to themonth
level, or2020-07
-
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 arequarter
,half
,year
,month
,day
,hour
. -
tbd
- Set as true if date isTo be determined
-
net
- Set as true if the date isNo earlier than
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:
- 🔒 Clear cache :
DELETE /admin/cache
Capsules - Detailed info for serialized dragon capsules
Company Info - Detailed info about SpaceX as a company
Cores - Detailed info for serialized first stage cores
Crew - Detailed info on dragon crew members
Dragons - Detailed info about dragon capsule versions
Landpads - Detailed info about landing pads and ships
Launches - Detailed info about launches
Launchpads - Detailed info about launchpads
Payloads - Detailed info about launch payloads
Roadster info - Detailed info about Elon's Tesla roadster's current position
Rockets - Detailed info about rocket versions
Ships - Detailed info about ships in the SpaceX fleet
Starlink - 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