Skip to main content
GET
/
batch
/
scrape
List Batch Jobs
curl --request GET \
  --url https://api.spidra.io/api/batch/scrape \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.spidra.io/api/batch/scrape"

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', 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",
  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"

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

url = URI("https://api.spidra.io/api/batch/scrape")

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
{
  "jobs": [
    {
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "totalUrls": 123,
      "completedCount": 123,
      "failedCount": 123,
      "outputFormat": "<string>",
      "scrapingChannel": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "finishedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "totalPages": 123
  }
}
{
  "status": "error",
  "message": "<string>"
}
Returns a paginated list of all batch jobs for your account, ordered by most recent first. Item-level results are not included. Use GET /api/batch/scrape/{batchId} to fetch those for a specific batch.
curl "https://api.spidra.io/api/batch/scrape?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch(
  "https://api.spidra.io/api/batch/scrape?page=1&limit=20",
  { headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const { jobs, pagination } = await res.json();
import requests

resp = requests.get(
    "https://api.spidra.io/api/batch/scrape",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"page": 1, "limit": 20},
)
data = resp.json()
jobs = data["jobs"]
pagination = data["pagination"]

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number (1-based)
limitnumber20Jobs per page. Maximum 50

Response

{
  "jobs": [
    {
      "uuid": "f3a2b1c0-0000-0000-0000-000000000000",
      "status": "completed",
      "totalUrls": 10,
      "completedCount": 9,
      "failedCount": 1,
      "outputFormat": "json",
      "scrapingChannel": "api",
      "createdAt": "2024-01-15T10:00:00Z",
      "finishedAt": "2024-01-15T10:01:30Z"
    },
    {
      "uuid": "e2c1a0b9-0000-0000-0000-000000000000",
      "status": "running",
      "totalUrls": 25,
      "completedCount": 12,
      "failedCount": 0,
      "outputFormat": "json",
      "scrapingChannel": "api",
      "createdAt": "2024-01-15T10:05:00Z",
      "finishedAt": null
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47,
    "totalPages": 3
  }
}

Job Entry Fields

FieldTypeDescription
uuidstringBatch ID — use this with other endpoints
statusstringpending, running, completed, failed, or cancelled
totalUrlsnumberHow many URLs were in this batch
completedCountnumberItems that completed successfully
failedCountnumberItems that failed
outputFormatstring"json" or "markdown"
scrapingChannelstring"api" or "playground"
createdAtstringISO 8601 submission timestamp
finishedAtstring | nullISO 8601 completion timestamp, or null if still in progress

Pagination Fields

FieldTypeDescription
pagenumberCurrent page number
limitnumberItems per page
totalnumberTotal number of batch jobs for your account
totalPagesnumberTotal pages at the current limit

Errors

CodeReason
401Missing API key authentication header
403Invalid or expired API key

Get Batch Status

Fetch full results for a specific batch

Submit a Batch

Start a new batch job

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer
default:1

Page number (1-based)

Required range: x >= 1
limit
integer
default:20

Number of jobs per page. Maximum 50

Required range: 1 <= x <= 50

Response

Paginated list of batch jobs

jobs
object[]
pagination
object