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

veribl

v0.1.1

Published

Official Veribl SDK: digital product passports (EN 18222), products, battery units and webhooks

Readme

Veribl for Node.js and TypeScript

The official SDK for the Veribl API: products, digital product passports (EN 18222), battery units, articles, files and webhooks.

npm install veribl

Node 20 or later, Deno, Bun or any runtime with fetch and Web Crypto. No dependencies.

Quickstart

Make an API key in the Veribl dashboard under Settings › API keys. Keys that start with vdpp_test_ reach your test workspace, so you can build without touching live passports.

import Veribl from 'veribl';

const veribl = new Veribl(process.env.VERIBL_API_KEY);

// Create a product
const product = await veribl.products.create({ name: 'E-bike battery pack 36V', gtin: '09506000134352' });

// Read its passport through the Passport API (EN 18222)
const passport = await veribl.dpps.retrieveByProductId('https://go.veribl.com/01/09506000134352');
console.log(passport.dppHeader);

Every request and response is typed from the API's OpenAPI description, so your editor shows each field and its meaning.

Lists

Await a list for one page, or loop over it to walk every item. The SDK fetches the next pages for you.

const page = await veribl.products.list({ status: 'live', limit: 50 });
page.data;        // up to 50 products
page.nextCursor;  // pass as `cursor` for the next page, null on the last

for await (const product of veribl.products.list({ status: 'live' })) {
  console.log(product.name);
}

Errors

Failed calls throw a VeriblError subclass with the HTTP status, a code and the Request-Id. Look up the Request-Id in the dashboard under Developers › Logs to see the full request and response.

import { VeriblInvalidRequestError } from 'veribl';

try {
  await veribl.products.retrieve('prod_missing');
} catch (e) {
  if (e instanceof VeriblInvalidRequestError && e.code === 'not_found') {
    console.log(`Not found (request ${e.requestId})`);
  } else throw e;
}

| Class | When | | --- | --- | | VeriblAuthenticationError | 401: the key is missing, wrong, revoked or expired | | VeriblPermissionError | 403: the key or plan doesn't allow this | | VeriblInvalidRequestError | 400, 404, 409: something about the request | | VeriblRateLimitError | 429: too many requests (after retrying) | | VeriblAPIError | 5xx: a problem on Veribl's side (after retrying) | | VeriblConnectionError | No answer: network or timeout (after retrying) |

Retries and idempotency

Network errors, 429 and 5xx answers are retried twice by default, with backoff and respecting Retry-After. Every write is sent with an Idempotency-Key, the same on each retry, so a retried write is applied only once. You can pass your own key, for example an order number:

await veribl.products.create({ name: 'Bike' }, { idempotencyKey: 'import-2026-10-21-row-17' });

const veribl = new Veribl(key, { maxRetries: 5, timeout: 20_000 });

Webhooks

Check the Veribl-Signature header before trusting a delivery. Pass the body exactly as received, before parsing it.

import express from 'express';
import Veribl from 'veribl';

const app = express();
app.post('/webhooks/veribl', express.raw({ type: 'application/json' }), async (req, res) => {
  let event;
  try {
    event = await Veribl.webhooks.constructEvent(req.body, req.headers['veribl-signature'] as string, process.env.VERIBL_WEBHOOK_SECRET!);
  } catch {
    return res.sendStatus(400);
  }
  if (event.event === 'passport.published') {
    // event.data.productId …
  }
  res.sendStatus(200);
});

Deliveries are retried for about 3 days, and event.id is the same on every retry, so use it to skip events you have already handled. Signatures older than 5 minutes are rejected; change that with the fourth argument.

API versions

Your key uses the API version that was current when you made it. To try a newer version before switching the key, pin it in the client or on one call:

const veribl = new Veribl(key, { apiVersion: '2026-10-21' });

Any other call

veribl.request(method, path, { query, body }) calls endpoints this SDK version doesn't name yet.

License

MIT