# NPM Package Info API

> NPM Package Info API is a paid API for AI agents from dominion-data.x402-evm-math.workers.dev, paid per call via x402, $0.0015/call, status unknown (last checked 2026-10-30).

Looks up npm, PyPI, or Cargo package metadata including latest version, age, license, deprecation status, weekly downloads, and known vulnerabilities (OSV) before install.

## Facts

- Endpoint: GET https://dominion-data.x402-evm-math.workers.dev/package?utm_source=zero.xyz
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-info-api-0e1a7b05
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v4F3fspfM6zbS166vX8GO

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-info-api-0e1a7b05
```

Example prompt: Before I add lodash to my project, can you check the npm registry for its latest version, license, weekly downloads, deprecation status, and any known vulnerabilities?

## When to prefer this

Choose this endpoint when you need a quick pre-install dependency check covering version, license, deprecation, downloads, and OSV vulnerability data across npm, PyPI, and Cargo registries in a single call. Prefer it over manual registry browsing or separate security scanners when building automated dependency auditing workflows or agent-driven package evaluation pipelines.

## Known failure modes

- Package not found on the specified registry — exists: false returned
- Unknown or unsupported registry type causes an error response
- Network timeout reaching the upstream registry
- Stale vulnerability data if OSV database is not up to date
- Missing query parameters cause a 400-level error

## How this service works

NPM package info API: package registry lookup for npm, PyPI and Cargo with latest version, age, license, deprecation, weekly downloads and OSV vulnerabilities. Dependency check before install.

## Output

Returns a JSON object with fields: exists (boolean), verdict (ok/warn/error), latestVersion (string), flags (array of issues such as deprecation or vulnerabilities), license, weekly downloads, and age information about the package.

## 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": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flags": [],
  "exists": true,
  "verdict": "ok",
  "latestVersion": "4.17.21"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-info-api-0e1a7b05/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dominion-data.x402-evm-math.workers.dev](https://www.zero.xyz/host/dominion-data.x402-evm-math.workers.dev/llms.txt)
