# Package Licence Lookup

> Package Licence Lookup is a paid API for AI agents from x402-package-risk.x402-package-risk.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Returns the licence type, classification, and commercial safety for a given package resolved to the version an installer would actually get today.

## Facts

- Endpoint: POST https://x402-package-risk.x402-package-risk.workers.dev/v1/package/licence?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/package-licence-lookup-e1a504dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IkTTN5qJcKPQF4lCL0i3S

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 package-licence-lookup-e1a504dc -d '<json body>'
```

Example prompt: What licence does the npm package 'express' use, and is it safe for commercial use?

## When to prefer this

Choose this endpoint when you need fast, deterministic, no-hallucination licence data for a specific package — particularly when the result must reflect what would actually be installed today rather than cached or stale metadata. Prefer it over LLM-based licence checks for accuracy, and over manual registry lookups for agent-compatible structured output. Ideal for CI pipelines, legal compliance workflows, and automated dependency audits.

## Known failure modes

- Unknown package name or ecosystem returns an error or empty result
- Version specifier that doesn't resolve returns an error
- Unsupported package system value returns a validation error
- Network issues reaching deps.dev or the registry may cause transient failures
- Packages with non-standard or ambiguous licences may return an unclassified result

## How this service works

Deterministic dependency risk data for agents: maintenance, licence, and known advisories for one package, resolved against the version an installer would actually get today. No model calls, no personal data.

## Output

Returns the resolved package name and ecosystem, the SPDX licence identifier (e.g. 'MIT'), a human-readable licence class (e.g. 'permissive'), a boolean flag indicating whether the licence is safe for commercial use, and the upstream data sources consulted (e.g. deps.dev, registry.npmjs.org).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "name",
  "system"
 ],
 "properties": {
  "name": {
   "type": "string"
  },
  "system": {
   "enum": [
    "npm",
    "pypi",
    "go",
    "maven",
    "cargo",
    "nuget"
   ],
   "type": "string"
  },
  "version": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "licence": {
  "class": "permissive",
  "licence": "MIT",
  "commercialSafe": true
 },
 "package": {
  "name": "express",
  "system": "npm"
 },
 "sources": [
  "deps.dev",
  "registry.npmjs.org"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/package-licence-lookup-e1a504dc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-package-risk.x402-package-risk.workers.dev](https://www.zero.xyz/host/x402-package-risk.x402-package-risk.workers.dev/llms.txt)
