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

insta-checker-sdk

v1.0.5

Published

A robust, production-ready Instagram username availability checker written in TypeScript.

Downloads

464

Readme

Insta Checker SDK

A Node.js and TypeScript library to check if an Instagram username is available. It handles connection pooling, caching, and retries so you don't have to write that boilerplate yourself.

This is useful for Discord bots, web apps, or scripts that need to check a lot of names quickly.

Installation

Install the package via npm:

npm install insta-checker-sdk

Quick Start

Here is the simplest way to check one username.

const InstaChecker = require('insta-checker-sdk');

const checker = new InstaChecker();

async function run() {
    const result = await checker.checkUsername('ninja');
    
    if (result.available) {
        console.log('The username is free.');
    } else {
        console.log('The username is taken.');
    }
}

run();

Features

  • Connection Pooling: Reuses HTTP connections to check names faster.
  • Caching: Saves results in memory for a set time to avoid checking the same name twice.
  • Retries: Automatically tries again if a request times out or fails.
  • Batch Checking: Checks multiple names in parallel with a configurable limit.
  • TypeScript Support: Included types for full IDE autocomplete.

Basic Usage

Checking a single username

The checkUsername method returns an object with two properties: available (boolean) and cached (boolean).

const InstaChecker = require('insta-checker-sdk');
const checker = new InstaChecker({ timeout: 3000 });

const result = await checker.checkUsername('apple');

console.log(result);
// Output: { available: false, cached: false }

Checking multiple usernames

Use checkBatch to process a list of names. This runs checks in parallel based on your concurrency setting.

const usernames = ['john', 'jane', 'doe', 'admin'];

const results = await checker.checkBatch(usernames);

console.log(results);
// Output: { john: false, jane: true, doe: true, admin: false }

You can add a callback to track progress while the batch is running.

await checker.checkBatch(usernames, {
    onProgress: (info) => {
        console.log(`Checked ${info.current} of ${info.total}`);
    }
});

Configuration

You can pass an options object to the constructor.

| Option | Type | Default | Description | | --- | --- | --- | --- | | timeout | number | 5000 | Time to wait for a response in milliseconds. | | concurrency | number | 5 | How many requests to send at the same time. | | retries | number | 2 | How many times to retry a failed request. | | cacheTTL | number | 300000 | How long to cache results in milliseconds (default 5 mins). | | enableCache | boolean | true | Turn caching on or off. |

Example:

const checker = new InstaChecker({
    concurrency: 10, // Check 10 names at once
    timeout: 2000,  // Fail fast after 2 seconds
    cacheTTL: 60000 // Keep cache for 1 minute
});

Clearing Cache

If you want to force a refresh of all names, clear the cache manually.

checker.clearCache();

License

MIT