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

vbd-api

v0.1.2

Published

Official JavaScript and TypeScript client for the Veteran Benefit Desk API: structured, source linked VA benefits data with permanent VBD IDs and provenance.

Readme

vbd-api

Official JavaScript and TypeScript client for the Veteran Benefit Desk API: structured, source linked VA benefits data with permanent VBD IDs, provenance in every response, and honest review tiers.

You are only charged credits for successful responses. Errors and not found lookups are always free.

Zero dependencies. Works in Node.js 18+ (native fetch), TypeScript types included, ESM and CommonJS.

Install

npm install vbd-api

Quickstart

import { VBD } from "vbd-api";
// or: const { VBD } = require("vbd-api");

const client = new VBD("vbd_sbx_..."); // free key at https://veteranbenefitdesk.com/developers/signup

// Diagnostic codes
const ptsd = await client.getDiagnosticCode("9411");
console.log(ptsd.data.title);            // PTSD
console.log(ptsd.vbd.id);                // VBD:DC:9411
console.log(ptsd.provenance.sources);    // 38 CFR Part 4 ...
console.log(ptsd.citation_text);         // ready to paste attribution line

// Conditions
await client.searchConditions({ q: "knee", limit: 10 });
await client.getCondition("tinnitus");

// VA forms
await client.searchForms({ q: "disability" });
await client.getForm("21-526EZ");

// State benefits (2 credits)
await client.getStateBenefits("TX", { category: "property_tax" });

// Fuzzy resolution: misspellings ok (2 credits)
await client.resolve("tinitus");

// Source check: verify a general statement against the corpus (paid plans, 10 credits per billed call)
const check = await client.sourceCheck("PTSD is rated under diagnostic code 9411", {
  type: "diagnostic_code", // optional corpus filter
  maxSources: 3,           // optional citation cap (1-10)
});
console.log(check.verdict, check.confidence); // supported 1
console.log(check.sources);                   // citations with source_name, vbd_id, source_url, last_reviewed
// Individualized advice requests ("should I file...") return an unbilled abstain verdict.

// Your usage (free)
await client.usage();

// Metering info from the last call
console.log(client.lastReceiptId, client.creditsRemaining);

Errors

All API errors throw VBDError with .status and .detail:

import { VBD, VBDError } from "vbd-api";

try {
  await client.getDiagnosticCode("99999");
} catch (e) {
  if (e instanceof VBDError) {
    console.log(e.status, e.detail); // 404 Unknown diagnostic code... (not billed)
  }
}

TypeScript

Types ship with the package:

import { VBD, VBDError, type VBDEnvelope } from "vbd-api";

const client = new VBD(process.env.VBD_API_KEY!, { timeoutMs: 15000 });
const res: VBDEnvelope = await client.getForm("21-526EZ");

Notes

  • Veteran Benefit Desk is independent and not affiliated with the U.S. Department of Veterans Affairs or any government agency.
  • Data is general educational information from public sources. It is not legal, medical, individualized claims, or representative advice.
  • License: commercial use with attribution ("Data via Veteran Benefit Desk"). Training rights are not granted by default.