curl --request POST \
--url https://api.scanoss.com/v3/license/evidence \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"requirement": "v5.4.5"
}
]
}
'import requests
url = "https://api.scanoss.com/v3/license/evidence"
payload = { "components": [
{
"purl": "pkg:github/scanoss/engine",
"requirement": "v5.4.5"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({components: [{purl: 'pkg:github/scanoss/engine', requirement: 'v5.4.5'}]})
};
fetch('https://api.scanoss.com/v3/license/evidence', 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/license/evidence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'components' => [
[
'purl' => 'pkg:github/scanoss/engine',
'requirement' => 'v5.4.5'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scanoss.com/v3/license/evidence"
payload := strings.NewReader("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scanoss.com/v3/license/evidence")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/license/evidence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"version": "5.4.5",
"requirement": "v5.4.5",
"files": [
{
"file": "LICENSE",
"file_id": "e6a600fd5e1d9cbde2d983680233ad02",
"detections": [
{
"license_id": "GPL-2.0-only",
"detector": "licenseclassifier",
"confidence": 1,
"source": "notice_declared",
"evidence": {
"start": 1,
"end": 25,
"evidence_url": "https://api.scanoss.com/v3/notice-contents/e6a600fd5e1d9cbde2d983680233ad02?start=1&end=25"
}
}
]
},
{
"file": "src/main.c",
"file_id": "874550fd5e1d9cbde2d9836802332357",
"detections": [
{
"license_id": "GPL-2.0-only",
"detector": "licenseclassifier",
"confidence": 1,
"source": "header_declared",
"evidence": {
"start": 1,
"end": 2,
"evidence_url": "https://api.scanoss.com/v3/file-contents/874550fd5e1d9cbde2d9836802332357?start=1&end=2"
}
}
]
}
]
}
],
"status": {
"status": "SUCCESS",
"message": "Resolved 1 of 1 purls"
}
}{
"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"
}{
"status": "error",
"error": {
"code": "TIMEOUT",
"message": "request timed out"
},
"timestamp": "2026-05-19T11:39:56Z"
}Per-file license evidence for one or many components
For each component, returns the license evidence detected in its
files, grouped per file. Each detection carries the detector, a line
range, a URL to the backing fragment and the evidence source.
Per-item failures use info_code / info_message.
Evidence whose backing content the deployment does not host is omitted:
source-code evidence (source = header_declared / spdx_tag) is
dropped when sources_kb is not configured, and metadata evidence
(metadata_declared) when metadata_kb is not. Notice evidence
(notice_declared) is always present. A component left with no files
after this filtering returns info_code: NO_INFO.
curl --request POST \
--url https://api.scanoss.com/v3/license/evidence \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"requirement": "v5.4.5"
}
]
}
'import requests
url = "https://api.scanoss.com/v3/license/evidence"
payload = { "components": [
{
"purl": "pkg:github/scanoss/engine",
"requirement": "v5.4.5"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({components: [{purl: 'pkg:github/scanoss/engine', requirement: 'v5.4.5'}]})
};
fetch('https://api.scanoss.com/v3/license/evidence', 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/license/evidence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'components' => [
[
'purl' => 'pkg:github/scanoss/engine',
'requirement' => 'v5.4.5'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scanoss.com/v3/license/evidence"
payload := strings.NewReader("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scanoss.com/v3/license/evidence")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/license/evidence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine\",\n \"requirement\": \"v5.4.5\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"version": "5.4.5",
"requirement": "v5.4.5",
"files": [
{
"file": "LICENSE",
"file_id": "e6a600fd5e1d9cbde2d983680233ad02",
"detections": [
{
"license_id": "GPL-2.0-only",
"detector": "licenseclassifier",
"confidence": 1,
"source": "notice_declared",
"evidence": {
"start": 1,
"end": 25,
"evidence_url": "https://api.scanoss.com/v3/notice-contents/e6a600fd5e1d9cbde2d983680233ad02?start=1&end=25"
}
}
]
},
{
"file": "src/main.c",
"file_id": "874550fd5e1d9cbde2d9836802332357",
"detections": [
{
"license_id": "GPL-2.0-only",
"detector": "licenseclassifier",
"confidence": 1,
"source": "header_declared",
"evidence": {
"start": 1,
"end": 2,
"evidence_url": "https://api.scanoss.com/v3/file-contents/874550fd5e1d9cbde2d9836802332357?start=1&end=2"
}
}
]
}
]
}
],
"status": {
"status": "SUCCESS",
"message": "Resolved 1 of 1 purls"
}
}{
"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"
}{
"status": "error",
"error": {
"code": "TIMEOUT",
"message": "request timed out"
},
"timestamp": "2026-05-19T11:39:56Z"
}Body
1Show child attributes
Show child attributes
Optional request-level search configuration applied to every component
in the batch (for GET endpoints the same knobs are query params). All
fields are optional; the defaults disable every fallback (strict version
matching, no related results). Honored by endpoints that support search
criteria — currently /v3/license/evidence.
Show child attributes
Show child attributes