curl --request GET \
--url https://api.scanoss.com/v3/raw/scanimport requests
url = "https://api.scanoss.com/v3/raw/scan"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/raw/scan', 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/raw/scan",
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/raw/scan"
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/raw/scan")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/raw/scan")
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{
"file_hash": "93d99b95d57fca563c23a2bc4954aeed",
"matches": [
{
"purl": "pkg:github/scanoss/engine",
"url_hashes": [
"6739cca9db5ebfdadd89002f39be655d"
],
"rank": 1
}
]
}{
"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": "ENGINE_UNAVAILABLE",
"message": "scan engine not available"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "TIMEOUT",
"message": "request timed out"
},
"timestamp": "2026-05-19T11:39:56Z"
}Components for a file MD5
Look up a file by hash and return its matching components (-P). Also served at the legacy /v3/scan/raw alias (used by the batchScanner pipeline) — deprecated, provisional for compatibility and to be removed in a future version; new clients should use /v3/raw/scan.
curl --request GET \
--url https://api.scanoss.com/v3/raw/scanimport requests
url = "https://api.scanoss.com/v3/raw/scan"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/raw/scan', 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/raw/scan",
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/raw/scan"
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/raw/scan")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/raw/scan")
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{
"file_hash": "93d99b95d57fca563c23a2bc4954aeed",
"matches": [
{
"purl": "pkg:github/scanoss/engine",
"url_hashes": [
"6739cca9db5ebfdadd89002f39be655d"
],
"rank": 1
}
]
}{
"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": "ENGINE_UNAVAILABLE",
"message": "scan engine not available"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "TIMEOUT",
"message": "request timed out"
},
"timestamp": "2026-05-19T11:39:56Z"
}Query Parameters
File hash — 32-char hex MD5 or 16-char hex CRC64, per the engine's key type. The legacy md5 parameter is still accepted during rollout (hash takes priority); prefer hash.
^([0-9a-fA-F]{16}|[0-9a-fA-F]{32})$Engine flags bitmask (-F). Gate: allow_flags_override.
x >= 0Max component rank (-r). Gate: ranking_allowed.
x >= 0Minimum snippet ID hits (--min-snippet-hits). Gate: match_config_allowed.
x >= 0Minimum matched lines (--min-snippet-lines). Gate: match_config_allowed.
x >= 0Ignore file extension in snippet matching (--ignore-file-ext). Gate: match_config_allowed.