Delete a Scraper Studio scraper
curl --request DELETE \
--url https://api.brightdata.com/dca/collector/{scraper_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brightdata.com/dca/collector/{scraper_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brightdata.com/dca/collector/{scraper_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.brightdata.com/dca/collector/{scraper_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/collector/{scraper_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.brightdata.com/dca/collector/{scraper_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/dca/collector/{scraper_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"OK"Manage scrapers & jobs
Delete a Scraper Studio scraper
DELETE /dca/collector/ removes a Scraper Studio scraper from your Bright Data account, taking it out of My Scrapers and preventing future runs.
DELETE
/
dca
/
collector
/
{scraper_id}
Delete a Scraper Studio scraper
curl --request DELETE \
--url https://api.brightdata.com/dca/collector/{scraper_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brightdata.com/dca/collector/{scraper_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brightdata.com/dca/collector/{scraper_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.brightdata.com/dca/collector/{scraper_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/collector/{scraper_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.brightdata.com/dca/collector/{scraper_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/dca/collector/{scraper_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"OK"Use
Use the returned
Omit
DELETE /dca/collector/{scraper_id} to delete a Bright Data Scraper Studio scraper from your account. Deleting a scraper removes it from My Scrapers and prevents new manual, scheduled or API-triggered runs.
This endpoint takes no request body and returns the plain text body OK on success, not JSON. Read the response as text rather than calling a JSON parser on it.
Deleting a scraper cannot be undone. Use this endpoint only when the scraper is no longer needed.
How to find a scraper ID
Use the scrapers list endpoint to find the ID of the scraper you want to delete:curl "https://api.brightdata.com/dca/collectors_list" \
-H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN"
id value as the scraper_id path parameter. In API parameters, this ID may also be referred to as collector_id. See List Scraper Studio scrapers for the full parameter list.
Record a deletion reason
Pass the optionalreason query parameter to record why the scraper was deleted, for tracking or audit purposes:
curl -X DELETE "https://api.brightdata.com/dca/collector/c_mnvdqy7w1fyaku0uep?reason=no_longer_needed" \
-H "Authorization: Bearer $BRIGHT_DATA_API_TOKEN"
reason to delete the scraper without recording one.
When to use this endpoint
- Remove a scraper you no longer run, so it stops appearing in My Scrapers
- Clean up test or duplicate scrapers created while developing in Scraper Studio
- Decommission a scraper after migrating its workload to another scraper
Related
- List Scraper Studio scrapers: find the
scraper_idbefore deleting - List Scraper Studio jobs: review the jobs a scraper has run
- Cancel a Scraper Studio job: stop a single job without deleting the scraper
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 Scraper Studio scraper to delete. In API parameters, this ID may also be referred to as collector_id.
Query Parameters
Reason for deleting the scraper. Used for tracking or audit purposes.
Response
Scraper deleted successfully
The response is of type string.
Was this page helpful?