curl --request GET \
--url https://api.scanoss.com/v3/licensesimport requests
url = "https://api.scanoss.com/v3/licenses"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/licenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scanoss.com/v3/licenses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scanoss.com/v3/licenses"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scanoss.com/v3/licenses")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/licenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"component": {
"purl": "<string>",
"requirement": "<string>",
"version": "<string>",
"statement": "GPL-2.0-only AND MIT",
"licenses": [
{
"id": "GPL-2.0-only",
"full_name": "GNU General Public License v2.0 only",
"is_spdx_approved": true,
"url": "https://spdx.org/licenses/GPL-2.0-only.html"
}
],
"url": "<string>",
"info_message": "<string>",
"info_code": "<string>"
},
"status": {
"status": "SUCCESS",
"message": "<string>"
}
}{
"status": "error",
"error": {
"code": "INVALID_QUERY",
"message": "purl query parameter is required"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "INTERNAL_ERROR",
"message": "..."
},
"timestamp": "2026-05-19T11:39:56Z"
}Declared licenses for one component (papi License service)
Resolves the declared licenses of a single component from the
purl_licenses knowledge base, walking the configured source priority
and falling back from the exact version to the nearest mined version and
then the unversioned entry. info_code reports REQUIREMENT_NOT_MET /
VERSION_NOT_FOUND / NO_INFO. Mirrors papi GetComponentLicenses.
curl --request GET \
--url https://api.scanoss.com/v3/licensesimport requests
url = "https://api.scanoss.com/v3/licenses"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/licenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scanoss.com/v3/licenses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scanoss.com/v3/licenses"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scanoss.com/v3/licenses")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/licenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"component": {
"purl": "<string>",
"requirement": "<string>",
"version": "<string>",
"statement": "GPL-2.0-only AND MIT",
"licenses": [
{
"id": "GPL-2.0-only",
"full_name": "GNU General Public License v2.0 only",
"is_spdx_approved": true,
"url": "https://spdx.org/licenses/GPL-2.0-only.html"
}
],
"url": "<string>",
"info_message": "<string>",
"info_code": "<string>"
},
"status": {
"status": "SUCCESS",
"message": "<string>"
}
}{
"status": "error",
"error": {
"code": "INVALID_QUERY",
"message": "purl query parameter is required"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "INTERNAL_ERROR",
"message": "..."
},
"timestamp": "2026-05-19T11:39:56Z"
}Query Parameters
Package URL (e.g. pkg:github/scanoss/engine)
Optional version requirement (e.g. v5.4.5)
Caps the per-purl result array. 0/absent = no limit.
x >= 0Enable the source-purl fallback lookup.
Include a url in results (placeholder — data source TBD).
Version fallback strategy (not applied to range endpoints).
strict, show_latest, show_closest_lt, show_closest_gt, show_any Output encoding for content string values (none default, url_encoded, base64_encoded); control fields and object keys are never encoded.
none, url_encoded, base64_encoded Response
Licenses resolved for the component.