npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

spacex-api-wrapper

v3.0.7

Published

A Javascript API Wrapper for r-spacex/SpaceX-API

Downloads

18

Readme

SpaceX API Wrapper (Node.js)

GitHub release GitHub issues GitHub stars GitHub license

Simple and Easy API Wrapper for r-spacex/SpaceX-API!

Installation

To install via npm use: npm i spacex-api-wrapper

To install via yarn use: yarn add spacex-api-wrapper

Basic Usage

To use the wrapper, require the module and initialise the module:

let SpacexApiWrapper = require("spacex-api-wrapper");

SpacexApiWrapper.info().then(function(data) {
    console.log(data);
});
{
  "name": "SpaceX",
  "founder": "Elon Musk",
  "founded": 2002,
  "employees": 7000,
  "vehicles": 3,
  "launch_sites": 3,
  "test_sites": 1,
  "ceo": "Elon Musk",
  "cto": "Elon Musk",
  "coo": "Gwynne Shotwell",
  "cto_propulsion": "Tom Mueller",
  "valuation": 27500000000,
  "headquarters": {
    "address": "Rocket Road",
    "city": "Hawthorne",
    "state": "California"
  },
  "links": {
    "website": "https://www.spacex.com/",
    "flickr": "https://www.flickr.com/photos/spacex/",
    "twitter": "https://twitter.com/SpaceX",
    "elon_twitter": "https://twitter.com/elonmusk"
  },
  "summary": "SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded in 2002 to revolutionize space technology, with the ultimate goal of enabling people to live on other planets."
}

Documentation

This wrapper provides the static methods listed below. Each links to the relevant section of the API's documentation.

Arguments:

  • id - Specifies the id of the entity to retrieve.
  • query - An object listing any additional options or output controls specified in the API's documentation.
  • settings - Object used to setup axios:
    • method - Method to use when making requests. Default is get and is the only method used in the API.
    • baseURL - The URL of the API.
    • ssl - Use SSL?
    • version - Defaults to V3, which this wrapper is designed for. Using other versions may cause the wrapper to stop working or to not cover all endpoints.
    • timeout - How long before timing out a request.

All arguments other than the id argument (only required a small number of methods) are optional.

Documentation for the API can be found here.

Capsules

Cores

Dragons

History

Info

Landing Pads

Launches

Launch Pads

Missions

Payloads

Rockets

Roadster

Ships

FAQs

  • What is returned in replace of a 404?
    • When the API returns a 404, it occurs usually when an id in an endpoint was not valid. This has been handled in this repository by returning undefined.
  • The tests seem a little odd?
    • The tests used for this wrapper are copies of r-spacex/SpaceX-API tests. It seems that these are out of date for their own API. Once they are updated and improved I will update the tests here.