{"uid":"cap_Vx2VhBxQ07W7cqsZvmqSN","slug":"package-license-classifier-8f31d12e","name":"Package License Classifier","description":"License of a package version classed as permissive, weak, strong or network copyleft, with commercial-use notes.","url":"https://package-health.x402tookit.com/package-license?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["system","name"],"properties":{"name":{"type":"string","description":"Package name"},"system":{"type":"string","description":"npm, pypi, go, maven, cargo or nuget"},"version":{"type":"string","description":"Version; default is the registry's default version"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"name":{"type":["null","string"]},"source":{"type":["null","string"]},"system":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"version":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"sourceUrl":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"licenseIds":{"type":["array","null"],"items":{"type":"string"}},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"licenseClass":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tAhNFtrYD1SkLOMWbcdAa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the SPDX license identifier(s) for a package version and classifies it as permissive, weak copyleft, strong copyleft, or network copyleft, with commercial-use guidance.","exampleAgentPrompt":"What license does the npm package 'lodash' version 4.17.21 use, and is it safe for commercial closed-source projects?","exampleUseCases":[{"title":"OSS compliance audit for new dependency","prompt":"I want to add 'requests' version 2.31.0 from PyPI to our codebase — can you check what license it uses and whether it's permissive enough for a commercial product?"},{"title":"Screening Go module for copyleft risk","prompt":"We're evaluating the Go module 'github.com/gorilla/mux' — look up its license class and tell me if it's strong copyleft or something we can use in a proprietary service."},{"title":"Automated license gate in CI pipeline","prompt":"Before we publish this release, check the license for Maven artifact 'org.apache.commons:commons-lang3' version 3.12.0 and flag it if it has any copyleft or network copyleft restrictions."}],"resultDescription":"Returns the package name, version, ecosystem, detected SPDX license identifier(s), a license class label (permissive, weak copyleft, strong copyleft, or network copyleft), a plain-English verdict and summary, commercial-use notes, supporting reasons, a link to the license source, and flags for any unchecked components or degraded data quality.","failureModes":["Unknown package name or version returns null fields with a degraded flag","Unsupported ecosystem value causes a validation error","Package with no declared license returns empty licenseIds and an inconclusive verdict","Registry unavailability may result in degraded or stale data","Ambiguous or dual-licensed packages may return multiple licenseIds requiring manual review"],"whenToPreferThis":"Use this endpoint when you need a structured, classified license assessment for a specific package version — especially when you need to distinguish between permissive (MIT, Apache) vs. copyleft tiers (LGPL, GPL, AGPL) and get actionable commercial-use guidance. Prefer this over raw registry metadata when you need the classification label and summary reasoning rather than just a raw license string.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:27.020Z","isFirstParty":false,"canonicalSlug":"package-license-classifier-8f31d12e"}