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

cardshowdata

v2.3.0

Published

Official TypeScript/JavaScript SDK for the CardShowData TCG pricing API

Downloads

763

Readme

CardShowData JavaScript/TypeScript SDK

Official TypeScript client for the CardShowData TCG pricing API. Zero runtime dependencies.

Install

npm install cardshowdata

Quick Start

import { CardShowData } from "cardshowdata";

const client = new CardShowData({ apiKey: "csd_live_..." });

// Get a card by pretty ID
const card = await client.cards.get("pk_bs_004");
console.log(card.name); // "Charizard"
console.log(card.image); // "https://images.cardshowdata.com/..."

// Search cards
const page = await client.cards.search({ tcg: "pk", q: "name:charizard" });
for (const card of page.data) {
  console.log(`${card.name} — ${card.expansion?.name}`);
}

// Get pricing (all values in cents)
const price = await client.pricing.get("aaaa-bbbb-cccc-dddd");
console.log(price.marketPriceCents); // 12500

// Bulk pricing
const prices = await client.pricing.bulk(["uuid1", "uuid2", "uuid3"]);

// Browse the catalog
const tcgs = await client.catalog.listTcgs();
const sets = await client.catalog.listSets("pk");

Auto-Pagination

Endpoints with pagination have *All() methods that return async iterables:

// Offset-paginated (cards)
for await (const card of client.cards.searchAll({ tcg: "pk", q: "name:pikachu" })) {
  console.log(card.name);
}

// Cursor-paginated (catalog products, pricing changes)
for await (const product of client.catalog.listProductsAll("pk")) {
  console.log(product.prettyId);
}

for await (const change of client.pricing.changesAll({ since: "2026-04-01T00:00:00Z" })) {
  console.log(`${change.prettyId}: ${change.pctChange}%`);
}

Resources

| Resource | Methods | |----------|---------| | client.cards | get(), search(), searchAll(), listByExpansion(), getEbaySales() | | client.pricing | get(), bulk(), history(), changes(), changesAll() | | client.catalog | listTcgs(), listSets(), getTaxonomy(), listProducts(), listProductsAll(), exportCsv(), resolve(), search() | | client.grading | get(), history(), changes(), changesAll() | | client.lifecycle | get() | | client.usage | get() | | client.sales | submit(), submitBatch(), submitCsv() | | client.feedback | submit() | | client.onboarding | quickstart() |

Error Handling

import { CardShowData, NotFoundError, RateLimitError } from "cardshowdata";

try {
  await client.cards.get("nonexistent");
} catch (e) {
  if (e instanceof NotFoundError) {
    console.log("Card not found");
  }
  if (e instanceof RateLimitError) {
    console.log(`Rate limited — retry after ${e.retryAfter}s`);
  }
}

Errors: AuthenticationError (401), PermissionError (403), NotFoundError (404), RateLimitError (429), ApiError (5xx).

Configuration

const client = new CardShowData({
  apiKey: "csd_live_...",                        // or set CSD_API_KEY env var
  baseUrl: "https://api.cardshowdata.com",       // default
  timeout: 30_000,                                // milliseconds
  maxRetries: 3,                                  // auto-retry on 429/5xx
});

Rate limit info is available after any request:

console.log(client.rateLimit.remaining); // requests left this minute

Requirements

  • Node.js 18+ (uses native fetch)
  • Also works in Deno, Bun, and modern browsers
  • Dual ESM + CJS build
  • Full TypeScript types included