curl --request POST \
--url https://api.brightdata.com/datasets/snapshots/{id}/deliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deliver": {
"type": "azure",
"filename": {
"template": "<string>"
},
"container": "<string>",
"credentials": {
"account": "<string>",
"key": "aSDinaTvuI8gbWludGxpZnk=",
"sas_token": "<string>"
},
"directory": "<string>"
},
"compress": false,
"batch_size": 100000
}
'import requests
url = "https://api.brightdata.com/datasets/snapshots/{id}/deliver"
payload = {
"deliver": {
"type": "azure",
"filename": { "template": "<string>" },
"container": "<string>",
"credentials": {
"account": "<string>",
"key": "aSDinaTvuI8gbWludGxpZnk=",
"sas_token": "<string>"
},
"directory": "<string>"
},
"compress": False,
"batch_size": 100000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deliver: {
type: 'azure',
filename: {template: '<string>'},
container: '<string>',
credentials: {account: '<string>', key: 'aSDinaTvuI8gbWludGxpZnk=', sas_token: '<string>'},
directory: '<string>'
},
compress: false,
batch_size: 100000
})
};
fetch('https://api.brightdata.com/datasets/snapshots/{id}/deliver', 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.brightdata.com/datasets/snapshots/{id}/deliver",
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([
'deliver' => [
'type' => 'azure',
'filename' => [
'template' => '<string>'
],
'container' => '<string>',
'credentials' => [
'account' => '<string>',
'key' => 'aSDinaTvuI8gbWludGxpZnk=',
'sas_token' => '<string>'
],
'directory' => '<string>'
],
'compress' => false,
'batch_size' => 100000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.brightdata.com/datasets/snapshots/{id}/deliver"
payload := strings.NewReader("{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.brightdata.com/datasets/snapshots/{id}/deliver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/datasets/snapshots/{id}/deliver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}"
response = http.request(request)
puts response.read_body{
"id": "del_abc123xyz"
}{
"error": "Batch size exceeds 5GB limit"
}{
"error": "Snapshot not found"
}Deliver snapshot
Use the Bright Data Marketplace Dataset API to deliver a Snapshot. POST /datasets/snapshots//deliver returns 200 OK with metadata as JSON.
curl --request POST \
--url https://api.brightdata.com/datasets/snapshots/{id}/deliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deliver": {
"type": "azure",
"filename": {
"template": "<string>"
},
"container": "<string>",
"credentials": {
"account": "<string>",
"key": "aSDinaTvuI8gbWludGxpZnk=",
"sas_token": "<string>"
},
"directory": "<string>"
},
"compress": false,
"batch_size": 100000
}
'import requests
url = "https://api.brightdata.com/datasets/snapshots/{id}/deliver"
payload = {
"deliver": {
"type": "azure",
"filename": { "template": "<string>" },
"container": "<string>",
"credentials": {
"account": "<string>",
"key": "aSDinaTvuI8gbWludGxpZnk=",
"sas_token": "<string>"
},
"directory": "<string>"
},
"compress": False,
"batch_size": 100000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deliver: {
type: 'azure',
filename: {template: '<string>'},
container: '<string>',
credentials: {account: '<string>', key: 'aSDinaTvuI8gbWludGxpZnk=', sas_token: '<string>'},
directory: '<string>'
},
compress: false,
batch_size: 100000
})
};
fetch('https://api.brightdata.com/datasets/snapshots/{id}/deliver', 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.brightdata.com/datasets/snapshots/{id}/deliver",
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([
'deliver' => [
'type' => 'azure',
'filename' => [
'template' => '<string>'
],
'container' => '<string>',
'credentials' => [
'account' => '<string>',
'key' => 'aSDinaTvuI8gbWludGxpZnk=',
'sas_token' => '<string>'
],
'directory' => '<string>'
],
'compress' => false,
'batch_size' => 100000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.brightdata.com/datasets/snapshots/{id}/deliver"
payload := strings.NewReader("{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.brightdata.com/datasets/snapshots/{id}/deliver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/datasets/snapshots/{id}/deliver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deliver\": {\n \"type\": \"azure\",\n \"filename\": {\n \"template\": \"<string>\"\n },\n \"container\": \"<string>\",\n \"credentials\": {\n \"account\": \"<string>\",\n \"key\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"sas_token\": \"<string>\"\n },\n \"directory\": \"<string>\"\n },\n \"compress\": false,\n \"batch_size\": 100000\n}"
response = http.request(request)
puts response.read_body{
"id": "del_abc123xyz"
}{
"error": "Batch size exceeds 5GB limit"
}{
"error": "Snapshot not found"
}Before you begin
Before you begin
snap_m2bxug4e2o352v1jv1) is a unique identifier created each time a data collection is triggered or a dataset is filtered.Where do Snapshot IDs come from?
| Source | Endpoint | What it returns |
|---|---|---|
| Filter Dataset | POST /datasets/filter | snapshot_id in the response body |
| Trigger Collection | POST /datasets/v3/trigger | snapshot_id in the response body |
| Dataset Subscription | Automatic delivery schedule | Snapshot IDs are generated per scheduled run |
| Snapshot List | GET /datasets/v3/snapshots | List of all snapshots with their IDs |
snapshot_id you need.curl "https://api.brightdata.com/datasets/snapshots/snap_m2bxug4e2o352v1jv1" \
-H "Authorization: Bearer YOUR_API_KEY"
ready status before delivery.See Get Snapshot Metadata for full documentation.
Tracking delivery status
Tracking delivery status
id returned in the response is a delivery job ID. Use it to monitor whether your delivery has completed, failed, or been canceled.GET https://api.brightdata.com/datasets/v3/delivery/{delivery_id}
curl "https://api.brightdata.com/datasets/v3/delivery/del_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "del_abc123xyz",
"status": "done",
"delivery_files": [
{
"filename": "my-data.json",
"delivery_ts": 1709000000
}
]
}
| Field | Type | Description |
|---|---|---|
id | string | The delivery job ID |
status | string | Delivery status: done, canceled, or failed |
delivery_files | array | List of delivered files with filename and delivery timestamp |
batch_size set, delivery_files will contain multiple entries, one per batch file.See Monitor Delivery for full documentation.
End-to-end workflow
End-to-end workflow
Trigger a collection or filter a dataset
snapshot_id.curl -X POST "https://api.brightdata.com/datasets/v3/trigger?dataset_id=gd_l1viktl72bvl7bjuj0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"url": "https://example.com/product/123"}]'
{"snapshot_id": "snap_m2bxug4e2o352v1jv1"}
Wait for the snapshot to be ready
curl "https://api.brightdata.com/datasets/snapshots/snap_m2bxug4e2o352v1jv1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"status": "ready",
"dataset_size": 50000,
"file_size": 250000000
}
Deliver the snapshot
curl -X POST "https://api.brightdata.com/datasets/snapshots/snap_m2bxug4e2o352v1jv1/deliver" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deliver": {
"type": "webhook",
"filename": {"template": "my-data", "extension": "json"},
"endpoint": "https://example.com/webhook"
}
}'
{
"id": "del_abc123xyz"
}
Track the delivery
curl "https://api.brightdata.com/datasets/v3/delivery/del_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "del_abc123xyz",
"status": "done",
"delivery_files": [...]
}
Authorizations
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Authorization: Bearer YOUR_API_KEY
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
Path Parameters
The Snapshot ID to deliver. This is the unique identifier returned when you trigger a collection, filter a dataset, or run a subscription.
Learn more about Snapshot ID.
"snap_m2bxug4e2o352v1jv1"
Body
Deliver configuration
- Microsoft Azure
- Build
- Email
- Google Cloud
- Google Cloud PubSub
- Amazon S3
- SFTP
- Snowflake
- Webhook
- Aliyun Object Storage Service
Show child attributes
Show child attributes
Deliver file compressed in gzip format
Number of records per file. Use this to split large snapshots into multiple smaller files. Files are split by record count. Recommended for snapshots with more than 1 million records. Note: Maximum batch size is 5GB.
100000
Response
OK
The delivery job ID. Use this ID to track the delivery status (see Tracking delivery status).
Was this page helpful?