# npm Package Health API

> npm Package Health API is a paid API for AI agents from gateway.stride20k.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Returns npm registry health facts for any npm package: latest version, dist-tags, deprecation status, version count, dependency count, weekly downloads, and last-modified timestamp.

## Facts

- Endpoint: GET https://gateway.stride20k.com/dev/npm/:packageName
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-health-api-0fdf786a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oDc091Y4Kivw3hqUP_Jst

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability npm-package-health-api-0fdf786a
```

Example prompt: Can you check the npm registry health for the 'axios' package — I want to see if it's deprecated, what the latest version is, how many weekly downloads it gets, and how many runtime dependencies it has?

## When to prefer this

Use this endpoint when you need authoritative npm package metadata in a single call, especially for dependency auditing, checking deprecation status, assessing package freshness, or supply-chain security analysis. Prefer this over raw npm registry calls when you want a normalized, structured response with download statistics and dependency counts bundled together. Ideal for agents maintaining or reviewing package.json files.

## Known failure modes

- Package not found on npm registry — returns error response
- Scoped package name not URL-encoded (e.g. @babel/core must be %40babel%2Fcore) — causes 404 or routing error
- Weekly downloads field may be null if unavailable from npm
- Cached response up to 1 hour old may not reflect very recent publishes
- Rate limit or upstream npm registry outage could cause temporary failures

## How this service works

npm package health API: dependency-hygiene facts straight from the npm registry — latest version, all dist-tags, last-modified timestamp, total published versions, deprecation status with message, runtime dependency count, and weekly downloads. For scoped packages, URL-encode the slash in the name. Use for dependency auditing, supply-chain security checks, version freshness, and update agents maintaining package.json. Cached up to 1 hour per package.

## Output

Returns a JSON object with: canonical package name, latest version string, all dist-tags (latest/next/beta/etc.), deprecation flag or message, ISO 8601 last-modified timestamp, total published version count, runtime dependency count, and weekly download count. Also includes cache metadata (whether served from cache, when data was fetched).

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-health-api-0fdf786a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.stride20k.com](https://www.zero.xyz/host/gateway.stride20k.com/llms.txt)
