Skip to main content
GET
/
v2
/
licenses
/
component
Get license information for a single software component.
curl --request GET \
  --url http://api.scanoss.com/v2/licenses/component
{
  "component": {
    "purl": "pkg:github/scanoss/engine@1.0.0",
    "requirement": "",
    "version": "1.0.0",
    "statement": "GPL-2.0",
    "licenses": [
      {
        "id": "GPL-2.0",
        "full_name": "GNU General Public License v2.0 only",
        "is_spdx_approved": true,
        "url": "https://spdx.org/licenses/GPL-2.0-only.html"
      }
    ],
    "url": "https://github.com/scanoss/engine"
  },
  "status": {
    "status": "SUCCESS",
    "message": "Licenses Successfully retrieved"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

purl
string
required

Package URL identifying the component to analyze.

requirement
string

Version constraint for component resolution when PURL lacks explicit version.

Response

A successful response.

Success example. For error cases, the component block reports the failure via info_message and info_code. Example: {"component":{"purl":"pkg:github/scanoss/unknown-component","requirement":"","version":"","statement":"","licenses":[],"url":"","info_message":"Component version not found","info_code":"VERSION_NOT_FOUND"},"status":{"status":"SUCCESS","message":"Success"}}

component
object

License information for a specific component identified by PURL and version.

status
object

Detailed response details.