How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Look Up JavaScript Packages And Get Registry Alerts With npm

December 6th, 2026 · Kin Lane
Look Up JavaScript Packages And Get Registry Alerts With npm

If your product is built with JavaScript, a large share of it was written by strangers and downloaded from npm. That raises everyday business questions: what versions are we on, did a package we depend on just change, and who on the team holds a publishing key they should not? npm answers those through an API, a doorway your build system, a security tool or an AI assistant can call without anyone opening a terminal. I keep the details on the npm profile on APIs.io.

What npm does

npm is the package registry for the Node.js ecosystem, and npm describes it as the world’s largest software registry. A package is a reusable bundle of code; a registry is the library everyone borrows from. npm’s developer platform provides APIs for searching and retrieving package metadata, managing access tokens, subscribing to registry event webhooks and publishing packages with provenance, a verifiable record of which source code and build produced a package. More on the npm website.

What you can get done

Package Registries & Distribution

Looking up what a package is and what state a version is in. A compliance or inventory tool uses this to know exactly what your software is made of.

  • GET /{package} gets a package document, which npm calls a packument, with every version and its metadata.
  • GET /{package}/{version} gets one specific version.
  • GET /-/package/{package-name}/version/{version}/status gets the lifecycle status of an exact version.

Webhook & Event Subscription Management

npm calls these hooks. You subscribe to changes in the registry, and npm sends a message to your system whenever something changes. That is how you hear about a surprise release of a library you depend on before it reaches production.

  • GET /-/npm/v1/hooks lists your webhooks.
  • POST /-/npm/v1/hooks/hook creates a webhook.
  • GET /-/npm/v1/hooks/hook/{id} gets one webhook.
  • PUT /-/npm/v1/hooks/hook/{id} updates it.
  • DELETE /-/npm/v1/hooks/hook/{id} deletes it.

Developer Identity & Credential Management

Publishing keys are the crown jewels: whoever holds one can push code that your customers will install. These operations let you audit and clean up tokens, and swap long-lived tokens for short-lived ones issued to your build system through OIDC, a standard way for one system to vouch for another.

  • GET /-/npm/v1/tokens lists access tokens.
  • POST /-/npm/v1/tokens creates an access token.
  • DELETE /-/npm/v1/tokens/token/{token_id} deletes an access token.
  • POST /-/npm/v1/oidc/token/exchange/package/{package_name} exchanges an OIDC token from your CI system for a short-lived npm token.

Beyond the capabilities

The profile carries more than these three capabilities. The Search API does full-text search across the registry, the Audit API covers security audits of your dependencies, and the Trusted Publishers API configures publishing from CI without long-lived tokens.

Getting started

Access is freemium with a free trial and self-serve signup, and npm runs it as a hosted service you call. The pricing section has what I have gathered on plans.

Read the registry API documentation, npm’s introduction to hooks and the CLI docs. On APIs.io, the Registry API and Hooks API are where I would start.

This week, list your organization’s npm tokens and delete the ones nobody can explain; it is the cheapest security win in the JavaScript world.