curl --request POST \
--url https://api.brightdata.com/webarchive/dump_metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search_id": "YOUR_SEARCH_ID",
"max_entries": 1000,
"delivery": {
"strategy": "email",
"settings": {
"address": "you@example.com"
}
}
}
'import requests
url = "https://api.brightdata.com/webarchive/dump_metadata"
payload = {
"search_id": "YOUR_SEARCH_ID",
"max_entries": 1000,
"delivery": {
"strategy": "email",
"settings": { "address": "you@example.com" }
}
}
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({
search_id: 'YOUR_SEARCH_ID',
max_entries: 1000,
delivery: {strategy: 'email', settings: {address: 'you@example.com'}}
})
};
fetch('https://api.brightdata.com/webarchive/dump_metadata', 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/webarchive/dump_metadata",
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([
'search_id' => 'YOUR_SEARCH_ID',
'max_entries' => 1000,
'delivery' => [
'strategy' => 'email',
'settings' => [
'address' => 'you@example.com'
]
]
]),
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/webarchive/dump_metadata"
payload := strings.NewReader("{\n \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\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/webarchive/dump_metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/webarchive/dump_metadata")
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 \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"export_id": "ucd_abc123xyz-metadata-1762257600000",
"rows": 1000,
"cost_usd": 0.2,
"status": "pending"
}{
"error": "Request validation failed",
"error_code": "validation",
"details": [
{
"message": "\"search_id\" is required",
"path": [
"search_id"
],
"type": "any.required"
}
]
}{
"error": "<string>",
"error_code": "export_too_large"
}Export metadata
Export one metadata row per matched file as gzip-compressed CSV, without page content.
curl --request POST \
--url https://api.brightdata.com/webarchive/dump_metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search_id": "YOUR_SEARCH_ID",
"max_entries": 1000,
"delivery": {
"strategy": "email",
"settings": {
"address": "you@example.com"
}
}
}
'import requests
url = "https://api.brightdata.com/webarchive/dump_metadata"
payload = {
"search_id": "YOUR_SEARCH_ID",
"max_entries": 1000,
"delivery": {
"strategy": "email",
"settings": { "address": "you@example.com" }
}
}
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({
search_id: 'YOUR_SEARCH_ID',
max_entries: 1000,
delivery: {strategy: 'email', settings: {address: 'you@example.com'}}
})
};
fetch('https://api.brightdata.com/webarchive/dump_metadata', 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/webarchive/dump_metadata",
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([
'search_id' => 'YOUR_SEARCH_ID',
'max_entries' => 1000,
'delivery' => [
'strategy' => 'email',
'settings' => [
'address' => 'you@example.com'
]
]
]),
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/webarchive/dump_metadata"
payload := strings.NewReader("{\n \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\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/webarchive/dump_metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/webarchive/dump_metadata")
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 \"search_id\": \"YOUR_SEARCH_ID\",\n \"max_entries\": 1000,\n \"delivery\": {\n \"strategy\": \"email\",\n \"settings\": {\n \"address\": \"you@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"export_id": "ucd_abc123xyz-metadata-1762257600000",
"rows": 1000,
"cost_usd": 0.2,
"status": "pending"
}{
"error": "Request validation failed",
"error_code": "validation",
"details": [
{
"message": "\"search_id\" is required",
"path": [
"search_id"
],
"type": "any.required"
}
]
}{
"error": "<string>",
"error_code": "export_too_large"
}- Create an AWS role which gives Bright Data access to your system.
- During this setup, you will be asked by Amazon for an “external ID” that is used with the role.
- Your external ID for S3 is your Bright Data Account ID that can be found within Account Settings
- Once a role is created, you will need to allow the Bright Data delivery role to
AssumeRolethat role.- The Bright Data delivery role is:
arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery
- The Bright Data delivery role is:
search_id(required): The search ID from a completed searchmax_entries(optional): Limit the number of files to include in this exportdelivery(required): Delivery configuration (S3, Azure, GCP, webhook or email)
- IAM role: Set assume_role.role_arn. You can also provide assume_role.external_id; if omitted, it defaults to your Bright Data Account ID. Configure your role’s trust policy to allow arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery to assume it.
- Access keys: Set credentials.access_key_id and credentials.secret_access_key.
- Bucket names must not contain /.
- Prefixes must not end with /.
- one download link per part
- links expire after 7 days
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 b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
Body
Search ID from a search with status done, at least one match, and completion within the last 24 hours.
"YOUR_SEARCH_ID"
Delivery configuration for metadata exports.
- Email
- Amazon S3
- Azure Blob
- Google Cloud Storage
- Webhook
Show child attributes
Show child attributes
Maximum number of rows to export. Defaults to all matches when omitted, subject to export limits.
1 <= x <= 200000001000
Export format. Only CSV is supported.
csv Metadata only. Unique column names to omit; at least one column must remain. Rejected by the URLs endpoint.
language, url_path, domain, ip_country, size, file_path, robots_block, captcha_status, category Response
Metadata export created successfully.
Was this page helpful?