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 🙏

© 2025 – Pkg Stats / Ryan Hefner

instatus.js

v0.0.2

Published

A simple wrapper for the Instatus API

Readme

Instatus.js

A simple and easy to use wrapper for the Instatus API.

Creating your client

const { InstatusClient } = require("instatus.js");
const client = new InstatusClient({
  apiKey: "<your-api-key>", // head to https://dashboard.instatus.com/developer to get your API key
  apiVersion: "v1", // optional, defaults to v1
  pageId: "<your-page-id>", // optional, defaults to null. but use .getPages() to get your page ID
});

Get pages

(async () => {
  const getPages = await client.getPages();

  console.log(getPages);
  // returns an array of pages
})();

Get components

(async () => {
  const getComponents = await client.getComponents(); // this uses the pageId from the client

  console.log(getComponents);
  // returns an array of components
})();

Get a specific component

(async () => {
  const getComponent = await client.getComponent("<component-id>"); // this uses the pageId from the client, and use .getComponents() to get your component ID

  console.log(getComponent);
  // returns a component
})();

Get incidents

(async () => {
  const getIncidents = await client.getIncidents(); // this uses the pageId from the client

  console.log(getIncidents);
  // returns an array of incidents
})();

Get a specific incident

(async () => {
  const getIncident = await client.getIncident("<incident-id>"); // this uses the pageId from the client, and use .getIncidents() to get your incident ID

  console.log(getIncident);
  // returns an incident
})();

Create an incident

(async () => {
  const createIncident = await client.createIncident({
    name: "Incident name",
    status: "investigating", // can be investigating, identified, monitoring, resolved
    message: "Incident message",
    components: ["<component-id>"], // optional, defaults to null
  }); // this uses the pageId from the client

  console.log(createIncident);
  // returns the created incident
})();

Get user profile

(async () => {
  const getUserProfile = await client.getUserProfile();

  console.log(getUserProfile);
  // returns the user profile
})();

Get subscribers

(async () => {
  const getSubscribers = await client.getSubscribers(); // this uses the pageId from the client

  console.log(getSubscribers);
  // returns an array of subscribers
})();

Add a subscriber

(async () => {
  const addSubscriber = await client.addSubscriber({
    email: "[email protected]", // the email of the subscriber
    all: true,
    autoConfirm: false, // set to true to skip confirmation emails (paid feature), visit https://instatus.com/pricing for more info
  }); // this uses the pageId from the client

  console.log(addSubscriber);
})();

Delete a subscriber

(async () => {
  const removeSubscriber = await client.deleteSubscriber("<subscriber-id>"); // this uses the pageId from the client, and use .getSubscribers() to get your subscriber ID

  console.log(removeSubscriber);
})();

Get teammates

(async () => {
  const getTeammates = await client.getTeammates(); // this uses the pageId from the client

  console.log(getTeammates);
  // returns an array of teammates
})();

Add a teammate

(async () => {
  const addTeammate = await client.addTeammate({
    email: "[email protected]", // the email of the teammate
  }); // this uses the pageId from the client

  console.log(addTeammate);
})();

Remove a teammate

(async () => {
  const removeTeammate = await client.deleteTeammate("<teammate-id>"); // this uses the pageId from the client, and use .getTeammates() to get your teammate ID

  console.log(removeTeammate);
})();