Rerun a Scraper Studio job
curl --request POST \
--url https://api.brightdata.com/dca/jobs/{job_id}/rerun \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failed_only": 1
}
'import requests
url = "https://api.brightdata.com/dca/jobs/{job_id}/rerun"
payload = { "failed_only": 1 }
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({failed_only: 1})
};
fetch('https://api.brightdata.com/dca/jobs/{job_id}/rerun', 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/jobs/{job_id}/rerun",
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([
'failed_only' => 1
]),
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/dca/jobs/{job_id}/rerun"
payload := strings.NewReader("{\n \"failed_only\": 1\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/dca/jobs/{job_id}/rerun")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"failed_only\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/dca/jobs/{job_id}/rerun")
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 \"failed_only\": 1\n}"
response = http.request(request)
puts response.read_body{
"collection_id": "j_mdb7x2kq93nfytra1",
"start_eta": "2026-07-20T12:10:12.301Z"
}Manage jobs
Rerun a Scraper Studio job
POST /dca/jobs//rerun starts a new run from an existing Bright Data Scraper Studio job. Rerun everything, or send failed_only to retry failures.
POST
/
dca
/
jobs
/
{job_id}
/
rerun
Rerun a Scraper Studio job
curl --request POST \
--url https://api.brightdata.com/dca/jobs/{job_id}/rerun \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failed_only": 1
}
'import requests
url = "https://api.brightdata.com/dca/jobs/{job_id}/rerun"
payload = { "failed_only": 1 }
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({failed_only: 1})
};
fetch('https://api.brightdata.com/dca/jobs/{job_id}/rerun', 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/jobs/{job_id}/rerun",
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([
'failed_only' => 1
]),
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/dca/jobs/{job_id}/rerun"
payload := strings.NewReader("{\n \"failed_only\": 1\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/dca/jobs/{job_id}/rerun")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"failed_only\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/dca/jobs/{job_id}/rerun")
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 \"failed_only\": 1\n}"
response = http.request(request)
puts response.read_body{
"collection_id": "j_mdb7x2kq93nfytra1",
"start_eta": "2026-07-20T12:10:12.301Z"
}Start a new run from an existing Bright Data Scraper Studio job. Send no request body to rerun the full job from the beginning, or send
Add
Use the returned
Use the returned
failed_only: 1 to rerun only the steps that failed.
A successful request starts a new job and returns its collection_id. The original job is left untouched.
Only jobs whose data has not expired can be rerun. Check the job’s
expired timestamp in List Scraper Studio jobs or Get job metadata before calling this endpoint. If the data has expired, the rerun fails and you must trigger a new job with the original inputs.Scraper Studio retains batch collection results for 16 days and real-time results for 7 days. See Scraper Studio specifications.Rerun behavior
| Request body | Behavior | Use when |
|---|---|---|
| No body | Reruns the full job from the beginning | You want to collect all inputs again |
{ "failed_only": 1 } | Reruns only the failed steps from the selected job | The job completed with failures and you want to retry just those parts |
Request
Send the request without a body to rerun everything:curl -X POST "https://api.brightdata.com/dca/jobs/$JOB_ID/rerun" \
-H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN"
response = requests.post(
f"https://api.brightdata.com/dca/jobs/{job_id}/rerun",
headers={"Authorization": f"Bearer {API_TOKEN}"},
)
rerun = response.json()
print(rerun["collection_id"])
const response = await fetch(
`https://api.brightdata.com/dca/jobs/${jobId}/rerun`,
{
method: 'POST',
headers: { Authorization: `Bearer ${process.env.BRIGHT_DATA_API_TOKEN}` },
}
);
const rerun = await response.json();
console.log(rerun.collection_id);
failed_only: 1 to retry only the failed steps:
curl -X POST "https://api.brightdata.com/dca/jobs/$JOB_ID/rerun" \
-H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"failed_only": 1}'
response = requests.post(
f"https://api.brightdata.com/dca/jobs/{job_id}/rerun",
headers={
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json",
},
json={"failed_only": 1},
)
rerun = response.json()
const response = await fetch(
`https://api.brightdata.com/dca/jobs/${jobId}/rerun`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BRIGHT_DATA_API_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ failed_only: 1 }),
}
);
const rerun = await response.json();
Response
{
"collection_id": "j_mdb7x2kq93nfytra1",
"start_eta": "2026-07-20T12:10:12.301Z"
}
collection_id as the job_id for Get job metadata and Receive batch data. It identifies the new rerun job, not the original one.
How to find a job ID
Use the jobs list endpoint to find the ID of the job you want to rerun:curl "https://api.brightdata.com/dca/collector/jobs?from_date=2026-06-01&to_date=2026-07-13" \
-H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN"
id value as the job_id path parameter. See List Scraper Studio jobs for the full parameter list.
When to use this endpoint
- Retry the failed inputs from a batch after fixing a selector or parser, without recollecting the inputs that already succeeded
- Recollect a full job on a schedule to refresh data that changes over time
- Rerun after a target site incident that caused a burst of
blockedordetect_blockerrors
failed_only, use Get errors for a job.
Related
- Get errors for a job: identify which inputs failed before rerunning
- Get job metadata: check the
expiredtimestamp and failure count of the original job - List Scraper Studio jobs: find the
job_idto pass to this endpoint - Cancel a Scraper Studio job: stop a rerun that was started by mistake
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
Path Parameters
ID of the job to rerun
Body
application/json
Omit the body to rerun the full job. Send failed_only: 1 to rerun only the failed steps.
Set to 1 to rerun only the failed steps. Omit to rerun the full job.
Example:
1
Was this page helpful?