# SPDX License Expression Classifier

> SPDX License Expression Classifier is a paid API for AI agents from package-registries.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Classifies an SPDX license expression (e.g. MIT OR Apache-2.0) as permissive, copyleft, or restricted, returning a structured verdict with plain-English explanation and individual identifier breakdown.

## Facts

- Endpoint: GET https://package-registries.x402tookit.com/license-check?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spdx-license-expression-classifier-3699d661
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_etXQ-ZOETWu6A0ScJBHCb

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 spdx-license-expression-classifier-3699d661
```

Example prompt: What category does the license expression 'MIT OR Apache-2.0' fall under — is it permissive, copyleft, or restricted? Give me a plain-English explanation of the verdict.

## When to prefer this

Use this endpoint when you need a structured, machine-readable classification of an SPDX license expression rather than just looking up a single license name. It handles compound expressions with AND/OR operators, exception clauses, and deprecated aliases — making it ideal for automated compliance pipelines, dependency audits, or CI gates that need to programmatically determine if a license is safe for commercial use.

## Known failure modes

- Invalid or unrecognized SPDX expression returns an error or degraded=true response
- Unknown license identifiers are listed in notChecked array rather than classified
- Malformed SPDX syntax (e.g. missing operator) may result in a parse error
- Complex nested expressions may produce degraded=true if not fully resolvable
- Payment failure returns 402 before the request is processed

## How this service works

Classify an SPDX license expression such as MIT OR Apache-2.0: permissive, copyleft or restricted, with the effective result.

## Output

Returns a structured object containing: verdict (permissive/copyleft/restricted), effectiveCategory, a plain-English explanation, list of reasons, individual license identifier details (id, category, canonical name, exception, deprecated alias flag), hasChoice (whether the expression offers an OR choice), hasException flag, notChecked identifiers, source, asOf timestamp, and a disclaimer.

## 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": [
      "license"
     ],
     "properties": {
      "license": {
       "type": "string",
       "description": "SPDX expression, e.g. MIT OR Apache-2.0"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "hasChoice": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "expression": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "identifiers": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "id": {
          "type": [
           "null",
           "string"
          ]
         },
         "note": {
          "type": [
           "null",
           "string"
          ]
         },
         "category": {
          "type": [
           "null",
           "string"
          ]
         },
         "canonical": {
          "type": [
           "null",
           "string"
          ]
         },
         "exception": {},
         "deprecatedAlias": {
          "type": [
           "boolean",
           "null"
          ]
         }
        }
       }

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spdx-license-expression-classifier-3699d661/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from package-registries.x402tookit.com](https://www.zero.xyz/host/package-registries.x402tookit.com/llms.txt)
