Skip to content

🚀 Open Source REST API for rocket, core, capsule, pad, and launch data

License

Notifications You must be signed in to change notification settings

svipatov/SpaceX-API

 
 

Repository files navigation

Imgur

Imgur

SpaceX Data REST API

Travis Docker Build Statu GitHub release Interface

Open Source REST API for rocket, core, capsule, pad, and launch data



Documentation

See the Wiki for full API Documentation

Usage / Endpoints

Example Response

GET https://api.spacexdata.com/v2/launches/latest
{
  "flight_number": 55,
  "launch_year": "2018",
  "launch_date_unix": 1517941800,
  "launch_date_utc": "2018-02-06T18:30:00Z",
  "launch_date_local": "2018-02-06T13:30:00-05:00",
  "rocket": {
    "rocket_id": "falconheavy",
    "rocket_name": "Falcon Heavy",
    "rocket_type": "FT",
    "first_stage": {
      "cores": [
        {
          "core_serial": "B1033",
          "flight": 1,
          "reused": false,
          "land_success": false,
          "landing_type": "ASDS",
          "landing_vehicle": "OCISLY"
        },
        {
          "core_serial": "B1025",
          "flight": 2,
          "reused": true,
          "land_success": true,
          "landing_type": "RTLS",
          "landing_vehicle": "LZ-1"
        },
        {
          "core_serial": "B1023",
          "flight": 2,
          "reused": true,
          "land_success": true,
          "landing_type": "RTLS",
          "landing_vehicle": "LZ-1"
        }
      ]
    },
    "second_stage": {
      "payloads": [
        {
          "payload_id": "Tesla Roadster",
          "reused": false,
          "customers": [
            "SpaceX"
          ],
          "payload_type": "Satellite",
          "payload_mass_kg": null,
          "payload_mass_lbs": null,
          "orbit": "Heliocentric orbit"
        }
      ]
    }
  },
  "telemetry": {
    "flight_club": "https://www.flightclub.io/result?code=FHD1"
  },
  "reuse": {
    "core": false,
    "side_core1": true,
    "side_core2": true,
    "fairings": false,
    "capsule": false
  },
  "launch_site": {
    "site_id": "ksc_lc_39a",
    "site_name": "KSC LC 39A",
    "site_name_long": "Kennedy Space Center Historic Launch Complex 39A"
  },
  "launch_success": true,
  "links": {
    "mission_patch": "https://i.imgur.com/24OyAPQ.png",
    "reddit_campaign": "https://www.reddit.com/r/spacex/comments/7hjp03/falcon_heavy_demo_launch_campaign_thread/",
    "reddit_launch": "https://www.reddit.com/r/spacex/comments/7vg63x/rspacex_falcon_heavy_test_flight_official_launch/",
    "reddit_recovery": null,
    "reddit_media": "https://www.reddit.com/r/spacex/comments/7vimtm/rspacex_falcon_heavy_test_flight_media_thread/",
    "presskit": "http://www.spacex.com/sites/spacex/files/falconheavypresskit_v1.pdf",
    "article_link": "https://spaceflightnow.com/2018/02/07/spacex-debuts-worlds-most-powerful-rocket-sends-tesla-toward-the-asteroid-belt/",
    "video_link": "https://www.youtube.com/watch?v=wbSwFU6tY1c"
  },
  "details": "The launch was a success, and the side boosters landed simultaneously at adjacent ground pads. Drone ship landing of the central core is unconfirmed. Final burn to heliocentric mars-earth orbit is expected after the second stage and payload pass through the Van Allen belts, followed by payload separation."
}

Contributions

See the Contribution guide for detailed steps

Local Development

Local development info can be found here

Technical Details

  • API is using Node.js with the Express.js framework
  • Uses Jest and Supertest for unit/integration testing
  • Uses Travis CI for continuous integration/delivery
  • All data stored in a MongoDB Atlas 3 node replica set cluster
  • Latest database mongodump available here
  • API deployed on a Heroku pipeline with pull request, staging and production servers

FAQ's

  • If you have any questions or corrections, please open an issue and we'll get it merged ASAP
  • All data and photos are property of Space Exploration Technologies Corporation (SpaceX)
  • I am not affiliated with SpaceX in any way, shape, form, or fashion. Just a fun side project for me
  • For any other questions or concerns, just shoot me an email

About

🚀 Open Source REST API for rocket, core, capsule, pad, and launch data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%