# payload402 npm License Checker

> payload402 npm License Checker is a paid API for AI agents from payload402.edgebytenet.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Resolves the declared license for a given npm package name@version, normalizes it to SPDX format, and returns a permissive-default compatibility flag for quick triage.

## Facts

- Endpoint: GET https://payload402.edgebytenet.workers.dev/license/check
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payload402-npm-license-checker-5d7442d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9mxqpykvCiQRQzb8LE_Ec

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 payload402-npm-license-checker-5d7442d6
```

Example prompt: Before I add lodash@4.17.21 to my project, can you quickly check what license it uses and whether it's permissive-compatible?

## When to prefer this

Use this endpoint when an AI coding agent needs a fast, lightweight license triage for a single npm package mid-task — especially before adding a new dependency to a project. Prefer it over full SBOM tools when you only need a quick permissive-vs-not signal and SPDX normalization for one package at a time, without the overhead of scanning an entire dependency tree.

## Known failure modes

- Package name not found on npm registry — returns error or null license
- Version string does not match any published release — may fall back to latest or return error
- License field missing or non-standard in package.json — normalization may fail, returning raw string
- Ambiguous or custom license expression not mappable to SPDX — compatibility flag may be uncertain
- Rate limiting or registry outage — transient HTTP error

## How this service works

npm package license triage for coding agents: resolve the declared license for one name@version from the public npm registry, normalize to SPDX where possible, and return a permissive-default compatibility flag. Use before adding a dependency mid-task. Triage only — not compliance-grade SBOM or legal advice.

## Output

Returns the declared license for the requested npm package (and version), normalized to an SPDX identifier where possible, plus a boolean or flag indicating whether the license is considered permissive-default compatible. This is triage-level output, not a full compliance-grade SBOM or legal opinion.

## 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",
     "required": [
      "pkg"
     ],
     "properties": {
      "pkg": {
       "type": "string",
       "description": "npm package name"
      },
      "version": {
       "type": "string",
       "description": "Optional semver (default latest)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "spdx": "MIT",
  "policy": "permissive-default",
  "reason": "Permissive license matches permissive-default policy",
  "source": "npm-registry",
  "license": "MIT",
  "package": "lodash",
  "version": "4.17.21",
  "compatible": "yes",
  "disclaimer": "Triage indicator only, not legal or compliance advice"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payload402-npm-license-checker-5d7442d6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payload402.edgebytenet.workers.dev](https://www.zero.xyz/host/payload402.edgebytenet.workers.dev/llms.txt)
