# NPM Package Safety Report

> NPM Package Safety Report is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns a comprehensive safety and quality report for an NPM package, combining vulnerability data, maintainer health, dependency counts, and GitHub repo signals into a risk summary.

## Facts

- Endpoint: GET https://api.x402node.dev/npm/safety
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-f4fce5e7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NIoQ-0EJwSeFSqSkL_ilD

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 api-x402node-dev-f4fce5e7
```

Example prompt: Can you pull a full safety report for the npm package 'lodash' version 4.17.21 — I need to know the risk level, any CVEs, whether it's still actively maintained, and if the GitHub repo is archived?

## When to prefer this

Use this endpoint when an AI code-review agent or supply-chain auditor needs a single consolidated safety verdict on an npm package, combining vulnerability databases, maintainer signals, and repo health in one call — rather than querying npm, OSV, and GitHub separately.

## Known failure modes

- Package not found on npm registry — returns 404 or error indicating unknown package
- Invalid package name format — returns validation error
- Specified version does not exist — returns version not found error
- Upstream OSV or GitHub API unavailable — may return partial data or timeout
- Rate limiting or payment failure — returns 402 or 429 error

## How this service works

Comprehensive NPM package safety report combining npm registry metadata, OSV vulnerability database, npms.io quality scores, and GitHub repo health. Returns risk_summary (low/medium/high/critical), CVE breakdown by severity, maintainer info, dependency counts, last-commit recency, archival status. Use ?package=react or ?package=react and version=18.2.0. Built for AI code-review agents and supply-chain auditors. Accepts payment on Base or Solana — either network works.

## Output

Returns a structured report with: risk_summary (low/medium/high/critical), CVE breakdown by severity level, maintainer information, dependency counts, last-commit recency, GitHub repo archival status, and npms.io quality scores.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "version": {
       "type": "string",
       "description": "Version (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-f4fce5e7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
