Skip to main content
GET
/
dca
/
dataset
cURL
curl --request GET \
  --url https://api.brightdata.com/dca/dataset \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.brightdata.com/dca/dataset"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.brightdata.com/dca/dataset', 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/dca/dataset",
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: Bearer <token>"
],
]);

$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.brightdata.com/dca/dataset"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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.brightdata.com/dca/dataset")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.brightdata.com/dca/dataset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "Image": "https://targetwebsite.com/product_id.png",
    "Title": "product_name",
    "Price": "product_price",
    "input": {
      "url": "https://targetwebsite.com/product_id/"
    }
  }
]
{
"status": "building",
"message": "Dataset is not ready yet, try again in XXs"
}
Use GET /dca/dataset?id=<collection_id> to retrieve the results of an asynchronous Bright Data Scraper Studio batch collection. While the collection is still running, the endpoint returns a status object. When the collection is ready, it returns a JSON array of records. For the full trigger, poll and parse walkthrough in cURL, Python and Node.js, see the Quickstart.
Use the collection_id returned by POST /dca/trigger as the id query parameter in this endpoint.
Batch collection results are available for download for 16 days after collection. To avoid expiration, download the data within 16 days or configure a push delivery method to send it to your storage automatically.

Request

curl "https://api.brightdata.com/dca/dataset?id=$COLLECTION_ID" \
  -H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN"
response = requests.get(
    "https://api.brightdata.com/dca/dataset",
    params={"id": collection_id},
    headers={"Authorization": f"Bearer {API_TOKEN}"},
)
const response = await fetch(
  `https://api.brightdata.com/dca/dataset?id=${collectionId}`,
  { headers: { Authorization: `Bearer ${process.env.BRIGHT_DATA_API_TOKEN}` } }
);

Response

While the collection is still building (HTTP 202):
{
  "status": "building",
  "message": "Dataset is not ready yet, try again in XXs"
}
When the collection is ready (HTTP 200):
[
  {
    "url": "https://www.dm.de/p/d/3133774/babylove-teller-silikon-mit-trennschale-regenbogen-orange-creme",
    "title": "babylove Teller Silikon mit Trennschale Regenbogen orange/creme",
    "price": 8.45,
    "availability": "in stock",
    "input": {
      "url": "https://www.dm.de/p/d/3133774/babylove-teller-silikon-mit-trennschale-regenbogen-orange-creme"
    }
  }
]
The exact field set depends on the output schema you defined when you built the collector. One row per successful input by default.

Retrieving results

While the collection is still running, the endpoint returns 202 Accepted with a status object. When the collection is ready, it returns 200 OK with a JSON array of records. For long-running collections, which can take minutes or hours, avoid frequent polling. Use one of these options instead:
  • Check the collection status periodically with longer intervals.
  • Configure a push delivery method, such as webhook, Amazon S3, Google Cloud Storage, Azure Blob Storage, SFTP/FTP or email.
  • Use the dashboard to monitor run progress.
Batch collection results are retained for 16 days. Download the data within the retention window or configure push delivery to store results automatically. The Node.js and Python starters implement status checks with exponential-backoff retry on transient errors.

Errors

StatusCauseFix
401 UnauthorizedToken missing, malformed or revokedRe-copy from Account Settings → API Tokens
404 Not FoundCollection ID does not exist, was deleted or has expired (16 days)Re-trigger the collector if the data is still needed
[] (empty array)Collection completed but produced no rowsCheck the input URLs and the collector’s output schema
5xxTransient Bright Data API errorRetry with exponential backoff, for example 1s, 2s, 4s

Authorizations

Authorization
string
header
required

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. 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

Query Parameters

id
string
required

Collection ID returned by POST /dca/trigger. Use this value as the id query parameter.

Example:

"j_abc123def456"

Response

Dataset (Ready)