Get a batch
curl --request GET \
--url https://api.spidra.io/api/batch/scrape/{batchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/batch/scrape/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spidra.io/api/batch/scrape/{batchId}', 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.spidra.io/api/batch/scrape/{batchId}",
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.spidra.io/api/batch/scrape/{batchId}"
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.spidra.io/api/batch/scrape/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/batch/scrape/{batchId}")
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{
"batchId": "38ae74ab-3a7f-421f-9d02-50c6b48d8c49",
"status": "completed",
"totalUrls": 3,
"completedCount": 2,
"failedCount": 1,
"items": [
{
"uuid": "f43aef75-1f51-455b-b4c0-bbd01c703f46",
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"jobId": "12389b87-11da-4aad-ab47-218d07b08ccf",
"status": "completed",
"result": {
"title": "A Light in the Attic",
"price": 51.77
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:44.000Z",
"screenshotUrl": null
},
{
"uuid": "445691ac-b528-4368-85d8-3451f0fa8c75",
"url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
"jobId": "41b0f1c0-119b-4875-9b39-a235fe95a140",
"status": "completed",
"result": {
"title": "Tipping the Velvet",
"price": 53.74
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:46.000Z",
"screenshotUrl": null
},
{
"uuid": "ac714786-f04e-44dc-8f83-2806e6d799ec",
"url": "https://this-domain-does-not-exist-spidra-test.invalid",
"jobId": "6dfa2214-0fdc-4d71-9c74-0776201741c4",
"status": "failed",
"result": null,
"error": "Failed to scrape https://this-domain-does-not-exist-spidra-test.invalid: the page could not be reached (ERR_TUNNEL_CONNECTION_FAILED)",
"creditsUsed": 0,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:43.000Z",
"screenshotUrl": null
}
],
"createdAt": "2026-10-25T03:09:37.000Z",
"finishedAt": "2026-10-25T03:09:45.000Z"
}Batch scrape
Get a batch
Returns a batch’s progress and every item’s status, result and cost. Poll every few seconds until status is completed or cancelled. Polling is free and has no rate limit.
A completed batch can still have failed items. Check failedCount, read each failed item’s error, and run them again with Retry a batch.
Batches are kept, so this keeps working after the batch has finished.
GET
/
batch
/
scrape
/
{batchId}
Get a batch
curl --request GET \
--url https://api.spidra.io/api/batch/scrape/{batchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/batch/scrape/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spidra.io/api/batch/scrape/{batchId}', 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.spidra.io/api/batch/scrape/{batchId}",
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.spidra.io/api/batch/scrape/{batchId}"
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.spidra.io/api/batch/scrape/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/batch/scrape/{batchId}")
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{
"batchId": "38ae74ab-3a7f-421f-9d02-50c6b48d8c49",
"status": "completed",
"totalUrls": 3,
"completedCount": 2,
"failedCount": 1,
"items": [
{
"uuid": "f43aef75-1f51-455b-b4c0-bbd01c703f46",
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"jobId": "12389b87-11da-4aad-ab47-218d07b08ccf",
"status": "completed",
"result": {
"title": "A Light in the Attic",
"price": 51.77
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:44.000Z",
"screenshotUrl": null
},
{
"uuid": "445691ac-b528-4368-85d8-3451f0fa8c75",
"url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
"jobId": "41b0f1c0-119b-4875-9b39-a235fe95a140",
"status": "completed",
"result": {
"title": "Tipping the Velvet",
"price": 53.74
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:46.000Z",
"screenshotUrl": null
},
{
"uuid": "ac714786-f04e-44dc-8f83-2806e6d799ec",
"url": "https://this-domain-does-not-exist-spidra-test.invalid",
"jobId": "6dfa2214-0fdc-4d71-9c74-0776201741c4",
"status": "failed",
"result": null,
"error": "Failed to scrape https://this-domain-does-not-exist-spidra-test.invalid: the page could not be reached (ERR_TUNNEL_CONNECTION_FAILED)",
"creditsUsed": 0,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:43.000Z",
"screenshotUrl": null
}
],
"createdAt": "2026-10-25T03:09:37.000Z",
"finishedAt": "2026-10-25T03:09:45.000Z"
}Authorizations
BearerAuthApiKeyAuth
Response
The batch with every item.
A batch with every item.
pending: queued, no URL has started yet.running: at least one URL is being scraped.completed: every URL has finished. Some may have failed, so checkfailedCountand each item'sstatus.cancelled: you cancelled the batch. Items that had finished keep their results.
Available options:
pending, running, completed, cancelled Was this page helpful?

