Callback status
curl --request GET \
--url https://scrapebadger.com/v1/requests/{request_id}/callback \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/requests/{request_id}/callback"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/requests/{request_id}/callback', 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://scrapebadger.com/v1/requests/{request_id}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://scrapebadger.com/v1/requests/{request_id}/callback"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/requests/{request_id}/callback")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/requests/{request_id}/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"state": "pending",
"attempts": 123,
"callback_host": "<string>",
"last_status": 123,
"last_error": "<string>",
"next_attempt_at": 123,
"delivered_at": 123
}{
"error": "<string>",
"detail": "<string>"
}Account
Callback status
Webhook delivery state of a call submitted with X-Callback-URL / callback_url: kept for 24 h. Free. 404 callback_not_found for a request without a callback, of another account, or older than 24 h.
GET
/
v1
/
requests
/
{request_id}
/
callback
Callback status
curl --request GET \
--url https://scrapebadger.com/v1/requests/{request_id}/callback \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/requests/{request_id}/callback"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/requests/{request_id}/callback', 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://scrapebadger.com/v1/requests/{request_id}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://scrapebadger.com/v1/requests/{request_id}/callback"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/requests/{request_id}/callback")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/requests/{request_id}/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"state": "pending",
"attempts": 123,
"callback_host": "<string>",
"last_status": 123,
"last_error": "<string>",
"next_attempt_at": 123,
"delivered_at": 123
}{
"error": "<string>",
"detail": "<string>"
}Shows whether the webhook for a request submitted with a callback URL was delivered: its state, attempts, the last status your server answered and the next retry. Free. Only the callback host is kept, never its path or query. See Async requests and webhooks.
Authorizations
Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys?utm_source=docs&utm_medium=referral
Response
Successful Response
Webhook delivery state of a call submitted with a callback URL.
pending: the call is still running. delivering: an attempt is under way or the next retry is due at next_attempt_at. delivered: the endpoint answered 2xx. failed: every attempt failed, a final status (not 408/429/5xx) came back, or a gateway restart interrupted the delivery (last_error "interrupted (gateway restart)").
Available options:
pending, delivering, delivered, failed 
