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

mindcase

v0.3.0

Published

Mindcase SDK — programmatic access to 34+ data collection agents

Readme

Mindcase Node.js SDK

Programmatic access to 34+ data collection agents. Zero runtime dependencies — uses native fetch.

Install

npm install mindcase

Requires Node.js 18+ (for native fetch and AbortSignal.timeout).

Quick Start

import { Mindcase } from "mindcase";

// Uses MINDCASE_API_KEY env var, or pass apiKey directly
const client = new Mindcase();

// Discover agents
const agents = await client.agents.list("instagram");
console.log(agents);

// Get agent details + parameter schema
const agent = await client.agents.get("instagram/profiles");
console.log(agent.requiredParams);

// Run an agent (blocks until results)
const results = await client.run("instagram/profiles", {
  params: { usernames: ["nike"] },
});

for (const row of results) {
  console.log(row["Username"], row["Followers"]);
}

// Extract a single column
const followers = results.toList("Followers");

// Run async (returns immediately with a Job)
const job = await client.runAsync("instagram/profiles", {
  params: { usernames: ["nike"] },
});
console.log(job.id, job.status);

// Check job status later
const updated = await client.jobs.get(job.id);
if (updated.isDone) {
  const data = await client.jobs.results(job.id);
  console.log(data.rowCount, "rows");
}

// Check credits
const credits = await client.credits();
console.log(`${credits} credits remaining`);

Error Handling

import { Mindcase, AuthenticationError, InsufficientCreditsError } from "mindcase";

try {
  const results = await client.run("instagram/profiles", {
    params: { usernames: ["nike"] },
  });
} catch (err) {
  if (err instanceof AuthenticationError) {
    console.error("Invalid API key");
  } else if (err instanceof InsufficientCreditsError) {
    console.error("Not enough credits");
  }
}

Status Callback

Monitor job progress with onStatus:

const results = await client.run("instagram/profiles", {
  params: { usernames: ["nike", "adidas"] },
  onStatus: (job) => console.log(`Status: ${job.status}, rows: ${job.rowCount}`),
});

Configuration

const client = new Mindcase({
  apiKey: "mk_live_...",                           // or MINDCASE_API_KEY env var
  baseUrl: "https://api.mindcase.co/api/v1",      // default
  timeout: 30_000,                                  // HTTP timeout (ms)
  pollInterval: 3_000,                              // polling interval (ms)
  runTimeout: 300_000,                              // max wait for run() (ms)
});

API Reference

| Method | Description | |---|---| | client.agents.list(group?) | List agents, optionally by group | | client.agents.get(path) | Get agent details + parameters | | client.run(path, { params }) | Run agent, wait for results | | client.runAsync(path, { params }) | Start agent, return Job immediately | | client.jobs.list({ status?, limit? }) | List your jobs | | client.jobs.get(jobId) | Get job status | | client.jobs.results(jobId) | Get job results | | client.jobs.cancel(jobId) | Cancel a running job | | client.credits() | Get remaining credit balance |