Fetch the raw text of a metadata fragment from the mz store
curl --request GET \
--url https://api.scanoss.com/v3/metadata-contents/{id}import requests
url = "https://api.scanoss.com/v3/metadata-contents/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/metadata-contents/{id}', 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/metadata-contents/{id}",
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/metadata-contents/{id}"
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/metadata-contents/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/metadata-contents/{id}")
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<string>{
"status": "error",
"error": {
"code": "INVALID_QUERY",
"message": "purl query parameter is required"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "METADATA_NOT_FOUND",
"message": "content not found in mz store"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "INTERNAL_ERROR",
"message": "..."
},
"timestamp": "2026-05-19T11:39:56Z"
}contents
Fetch the raw text of a metadata fragment from the mz store
Serves content referenced by evidence whose source is
metadata_declared (package manifests, build metadata).
Only registered when metadata_kb is set in the server config. When
omitted, this endpoint returns 404 at the router level and the
evidence_url field keeps pointing at the externally-hosted SCANOSS
metadata-contents endpoint.
GET
/
v3
/
metadata-contents
/
{id}
Fetch the raw text of a metadata fragment from the mz store
curl --request GET \
--url https://api.scanoss.com/v3/metadata-contents/{id}import requests
url = "https://api.scanoss.com/v3/metadata-contents/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.scanoss.com/v3/metadata-contents/{id}', 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/metadata-contents/{id}",
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/metadata-contents/{id}"
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/metadata-contents/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanoss.com/v3/metadata-contents/{id}")
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<string>{
"status": "error",
"error": {
"code": "INVALID_QUERY",
"message": "purl query parameter is required"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "METADATA_NOT_FOUND",
"message": "content not found in mz store"
},
"timestamp": "2026-05-19T11:39:56Z"
}{
"status": "error",
"error": {
"code": "INTERNAL_ERROR",
"message": "..."
},
"timestamp": "2026-05-19T11:39:56Z"
}Path Parameters
Content hash — 32-char hex MD5 or 16-char hex CRC64, per the knowledge base's key type.
Pattern:
^([0-9a-fA-F]{16}|[0-9a-fA-F]{32})$Query Parameters
1-based inclusive start line. Defaults to 1 when omitted.
Required range:
x >= 11-based inclusive end line. Defaults to last line when omitted.
Required range:
x >= 1Response
Metadata text as plain text. When start and/or end are present
the response is sliced to that 1-based inclusive line range.
The response is of type string.