# npm Package Health Inspector

> npm Package Health Inspector is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-16).

Returns latest version, publish date, license, deprecation status, dependency count, and maintainer count for any npm package.

## Facts

- Endpoint: POST https://x402.forgemesh.io/npm-package-health
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-health-inspector-3523a6ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Kw2R9aNxSI5VuxMWl1ZUw

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-inspector-3523a6ce -d '<json body>'
```

Example prompt: Can you check the health of the 'lodash' npm package — I want to know if it's deprecated, what the latest version is, how many dependencies it has, and who maintains it?

## When to prefer this

Use this endpoint when an AI coding agent needs to quickly assess npm package health before recommending or installing a dependency — especially useful for checking deprecation status, license compatibility, dependency bloat, or maintainer activity without scraping the npm website directly.

## Known failure modes

- Package name not found on npm registry — returns 404 or error indicating unknown package
- Misspelled or scoped package name causes lookup failure
- npm registry temporarily unavailable — cached data may be stale or endpoint returns 503
- Payment of 0.003 USDC not completed via x402 protocol — request rejected

## How this service works

npm package inspection API: latest version, publish date, license, deprecation status, dependency count, and maintainer count for any npm package. Dependency hygiene for coding agents, cached hourly.

## Output

Returns a JSON object containing the package's latest version number, publish date, SPDX license identifier, deprecation status (boolean or message), total dependency count, and number of maintainers. Results are cached hourly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "string",
   "description": "package name, e.g. express"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "express",
   "license": "MIT",
   "version": "4.21.2",
   "dependencies": {
    "accepts": "~1.3.8"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-health-inspector-3523a6ce/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
