Get Dataset Item by Scale Item ID
curl --request GET \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"original_image_url": "https://your-bucket/example.png",
"dataset_item_id": "di_zwyt15cag2301b902cw0",
"reference_id": "image_ref_300000",
"metadata": {
"License Plate": "ZPH-J27",
"Recording Date": "2019-09-15",
"Recording Time": "14:24:21",
"weather": "sunny",
"camera": "back"
}
},
"annotations": {
"box": [
{
"label": "car",
"type": "box",
"geometry": {
"x": 648.1969604492188,
"y": 264.34417724609375,
"width": 70.560546875,
"height": 50.55670166015625
},
"reference_id": "image_ref_300000"
},
{
"label": "car",
"type": "box",
"geometry": {
"x": 720.8001098632812,
"y": 246.6089324951172,
"width": 139.6986083984375,
"height": 114.38755798339844
},
"reference_id": "image_ref_300000"
}
]
},
"task_ids": [
"task_6047e1abe19361001ff9ca62",
"task_6047e1abe19361001ff193cd",
"task_6047e1abe19361001f19dj2b"
]
}{}Get Dataset Item
Get Dataset Item by Scale Item ID
GET
/
dataset
/
{dataset_id}
/
{item_id}
Get Dataset Item by Scale Item ID
curl --request GET \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"original_image_url": "https://your-bucket/example.png",
"dataset_item_id": "di_zwyt15cag2301b902cw0",
"reference_id": "image_ref_300000",
"metadata": {
"License Plate": "ZPH-J27",
"Recording Date": "2019-09-15",
"Recording Time": "14:24:21",
"weather": "sunny",
"camera": "back"
}
},
"annotations": {
"box": [
{
"label": "car",
"type": "box",
"geometry": {
"x": 648.1969604492188,
"y": 264.34417724609375,
"width": 70.560546875,
"height": 50.55670166015625
},
"reference_id": "image_ref_300000"
},
{
"label": "car",
"type": "box",
"geometry": {
"x": 720.8001098632812,
"y": 246.6089324951172,
"width": 139.6986083984375,
"height": 114.38755798339844
},
"reference_id": "image_ref_300000"
}
]
},
"task_ids": [
"task_6047e1abe19361001ff9ca62",
"task_6047e1abe19361001ff193cd",
"task_6047e1abe19361001f19dj2b"
]
}{}Click for Python SDK
Dataset.loc(dataset_item_id: str) -> dict
DatasetItem by the Scale-generated item ID (prefixed by di_; accessible via the List Dataset Items endpoint or the dashboard URL).
Directly Download DatasetItem Image
To retrieve just the image, you can append the query string ?format=image after the URL. This allows you to download the image directly from its original URL (minus metadata).Authorizations
Path Parameters
Response
200