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

@versedbcom/sdk

v1.2.2

Published

The official TypeScript/JavaScript SDK for the [VerseDB](https://versedb.com) public API — search and browse a database of 1M+ comics (series, issues, creators, characters, publishers, story arcs), look up barcodes, and manage your collection and lists.

Readme

VerseDB TypeScript SDK

The official TypeScript/JavaScript SDK for the VerseDB public API — search and browse a database of 1M+ comics (series, issues, creators, characters, publishers, story arcs), look up barcodes, and manage your collection and lists.

Published on npm as @versedbcom/sdk. The code is generated from the VerseDB OpenAPI spec via Speakeasy and republished automatically whenever the API changes.

Installation

npm install @versedbcom/sdk

Quickstart

Get a personal API token at versedb.com/my/apps/custom.

import { VerseDB } from "@versedbcom/sdk";

const vdb = new VerseDB({ token: process.env.VERSEDB_TOKEN });

const { result } = await vdb.series.listSeries({ q: "batman", limit: 20 });
console.log(result.data);

That's it — no base URL, bearer headers, or JSON parsing. The client targets https://versedb.com/api/v1.

Why use the SDK instead of raw HTTP?

  • Typed models and autocomplete. Series, Issue, Creator, and the rest are generated types — mediums, publication types, and issue formats are enums, not magic strings.
  • Pagination handled. List endpoints accept page/limit and return typed meta paging info (currentPage, lastPage, total) — no untyped next_page_url strings.
  • Rate limits won't surprise you. Every response exposes the X-RateLimit-* headers as typed values, 429s surface as typed errors carrying Retry-After, and automatic backoff is one retryConfig option away (see Retries below). Limits: reads 300/hr free, 1,000/hr PRO; writes 150/hr free, 500/hr PRO.
  • Typed errors. 401, 403 (missing scope), 409, and 422 surface as catchable, typed errors instead of raw responses.
  • Auth set once on the client, not per request.
  • Stays in sync. Regenerated from the spec on every API change; v1 evolves additively, so new fields and endpoints arrive as non-breaking minor bumps.

Recipes

Runnable versions live in examples/.

Barcode lookup → collection sync

Requires the lookup:barcode and write:collection scopes.

const { result } = await vdb.barcodeLookup.lookupByUPC({ upc: "75960608936800111" });

await vdb.userCollections.addIssueToCollection({
  issueId: result.data!.id!,
  body: { condition: "NM", pricePaid: 4.99 },
});

Pre-1995 barcodes are not unique — a 409 response carries a matches array for the user to pick from.

Lists

Requires the write:list scope.

const { result } = await vdb.lists.createList({
  title: "Essential X-Men",
  entityType: "issues",
});

await vdb.lists.addItemToList({
  listId: result.data!.id!,
  body: { entityId: 5432 },
});

Token scopes

| Scope | Grants | |---|---| | read:public | Catalog reads (default) | | lookup:barcode | UPC/ISBN lookup | | write:collection | Manage your collection | | write:list | Manage your lists |

Scopes are chosen when creating a token at /my/apps/custom; a missing scope surfaces as a typed 403 error.

API reference

Showcase

ComicTagger's VerseDB talker uses the v1 API end to end — barcode lookup and catalog reads while tagging comic archives.

Contributing

The SDK source is generated — see CONTRIBUTING.md before opening a PR.

License

MIT

Summary

VerseDB API Documentation: REST API for accessing comic book data, managing collections, and building integrations with VerseDB.

Table of Contents

SDK Installation

The SDK can be installed with either npm, pnpm, bun or yarn package managers.

NPM

npm add @versedbcom/sdk

PNPM

pnpm add @versedbcom/sdk

Bun

bun add @versedbcom/sdk

Yarn

yarn add @versedbcom/sdk

[!NOTE] This package is published as an ES Module (ESM) only. For applications using CommonJS, use await import("@versedbcom/sdk") to import and use this package.

Requirements

For supported JavaScript runtimes, please consult RUNTIMES.md.

SDK Example Usage

Example

import { VerseDB } from "@versedbcom/sdk";

const verseDB = new VerseDB({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await verseDB.activity.getActivityFeed({
    perPage: 20,
  });

  console.log(result);
}

run();

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme | | ------- | ---- | ----------- | | token | http | HTTP Bearer |

To authenticate with the API the token parameter must be set when initializing the SDK client instance. For example:

import { VerseDB } from "@versedbcom/sdk";

const verseDB = new VerseDB({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await verseDB.activity.getActivityFeed({
    perPage: 20,
  });

  console.log(result);
}

run();

Available Resources and Operations

Activity

BarcodeLookup

Characters

ComicShops

Creators

Events

Follows

Gamification

Imprints

Issues

KeyIssueReasons

Lists

Market

Newsletter

Podcasts

PublicProfiles

Publishers

Series

StoryArcs

Teams

Titles

Universes

User

UserCollections

Standalone functions

All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.

To read more about standalone functions, check FUNCTIONS.md.

Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:

import { VerseDB } from "@versedbcom/sdk";

const verseDB = new VerseDB({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await verseDB.activity.getActivityFeed({
    perPage: 20,
  }, {
    retries: {
      strategy: "backoff",
      backoff: {
        initialInterval: 1,
        maxInterval: 50,
        exponent: 1.1,
        maxElapsedTime: 100,
      },
      retryConnectionErrors: false,
    },
  });

  console.log(result);
}

run();

If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:

import { VerseDB } from "@versedbcom/sdk";

const verseDB = new VerseDB({
  retryConfig: {
    strategy: "backoff",
    backoff: {
      initialInterval: 1,
      maxInterval: 50,
      exponent: 1.1,
      maxElapsedTime: 100,
    },
    retryConnectionErrors: false,
  },
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await verseDB.activity.getActivityFeed({
    perPage: 20,
  });

  console.log(result);
}

run();

Error Handling

VerseDbError is the base class for all HTTP error responses. It has the following properties:

| Property | Type | Description | | ------------------- | ---------- | --------------------------------------------------------------------------------------- | | error.message | string | Error message | | error.statusCode | number | HTTP response status code eg 404 | | error.headers | Headers | HTTP response headers | | error.body | string | HTTP body. Can be empty string if no body is returned. | | error.rawResponse | Response | Raw HTTP response | | error.data$ | | Optional. Some errors may contain structured data. See Error Classes. |

Example

import { VerseDB } from "@versedbcom/sdk";
import * as errors from "@versedbcom/sdk/models/errors";

const verseDB = new VerseDB({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  try {
    const result = await verseDB.activity.getActivityFeed({
      perPage: 20,
    });

    console.log(result);
  } catch (error) {
    // The base class for HTTP error responses
    if (error instanceof errors.VerseDbError) {
      console.log(error.message);
      console.log(error.statusCode);
      console.log(error.body);
      console.log(error.headers);

      // Depending on the method different errors may be thrown
      if (error instanceof errors.GetActivityFeedUnauthorizedError) {
        console.log(error.data$.message); // string
      }
    }
  }
}

run();

Error Classes

Primary error:

Network errors:

Inherit from VerseDbError: