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

@madaket/provider-api-client-js

v0.0.3

Published

Madaket API Client for clean, high quality Provider Data

Readme

Madaket Health Provider API Javascript Client

JavaScript client for Madaket Health Provider API

RESTful JSON Endpoints by Madaket Health for clean, high-quality Provider Data

Installation

Inside your npm project:

npm install @madaket/provider-api-client-js --save

Quickstart

var MadaketHealthApi = require('@madaket/provider-api-client-js');

var API_KEY = "your-api-key";
var API_SECRET = "your-api-secret"; // do not hard code this, load from ignored config or ENV variable
MadaketHealthApi.ApiClient.instance.authorize(API_KEY, API_SECRET);

var providerApi = new MadaketHealthApi.ProviderApi();

var searchQuery = {
    npi: "",
    firstName: "Peter",
    middleName: "",
    lastName: "Shannon",
    licenseStates: [
        "MA"
    ],
    licenseNumber: "",
    phone: "",
    providerType: "MD",
    taxonomies: [
        ""
    ],
    maxResults: 10
};

var callback = function (error, data, response) {
    if (error) {
        console.error('API call ended in error. Returned data: ' + JSON.stringify(error.response.body));
    } else {
        console.log('API called successfully. Returned data: ' + JSON.stringify(data));
    }
};

providerApi.search({body: searchQuery}, callback);

Documentation for API Endpoints

See README.md docs inside this module in /node_modules/@madaket/provider-api-client-js/docs after downloading.

Alternatively, check out the swagger UI or the swagger spec

Documentation for Authentication

The above library pushes Authentication under the hood. However, if you'd like to pass over the library for your own client, the following details the method for authenticating with the server.

To Authenticate each request, include your issued API Key and a hash of your API Secret as query parameters:

?api_key=<your-api-key>&auth_token=<your-hashed-secret>

To hash the secret:

  1. Get the current date and format it as yyyy-mm-dd-HH-MM (in GMT)
  2. Remove the last character from the end (effectively resulting in yyyy-mm-dd-HH-M) to create the
  3. Concatenate <api_key><api_secret>
  4. Take the SHA-256 hash of the concatenated string
  5. Base64-SafeUrl encode the resulting bytes

The token will be valid for up to 10 minutes after it is created.

Javascript implementation of the previous steps:

function generate_auth_token(api_key, api_secret) {
        var now = Date.now();
        var timestamp = dateformat(now, "GMT:yyyy-mm-dd-HH-MM");
        timestamp = timestamp.substring(0, timestamp.length - 1);
        var cleartext = api_key + api_secret + timestamp;

        // Take SHA-256 hash, Base64 encode, URL Safe
        return CryptoJS.SHA256(cleartext)
            .toString(CryptoJS.enc.Base64)
            .replace(/\\+/g, '-')
            .replace(/\\//g, '_')
            .replace(/=+$/, '');
    }