curl --request GET \
--url https://api.spidra.io/api/crawl/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/crawl/{jobId}"
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/crawl/{jobId}', 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/crawl/{jobId}",
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/crawl/{jobId}"
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/crawl/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/crawl/{jobId}")
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{
"status": "completed",
"progress": {
"status": "completed",
"message": "Crawl completed",
"progress": 1
},
"result": [
{
"url": "https://books.toscrape.com/catalogue/sharp-objects_997/index.html",
"status": "success",
"title": "Sharp Objects | Books to Scrape - Sandbox",
"data": {
"title": "Sharp Objects",
"price": 47.82,
"in_stock": true
},
"html": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/47837f66-2ea8-4b60-a2e6-7656c0fe1946.html?...",
"markdown": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/c8973f4e-da20-4927-a2ef-bd763a274bad.md?...",
"depth": 1,
"parentUrl": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
},
{
"url": "https://books.toscrape.com/catalogue/in-a-dark-dark-wood_963/index.html",
"status": "success",
"title": "In a Dark, Dark Wood | Books to Scrape - Sandbox",
"data": {
"title": "In a Dark, Dark Wood",
"price": 19.63,
"in_stock": true
},
"html": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/9b889b6c-5296-4cdb-84ca-2440acfd2c2b.html?...",
"markdown": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/daa293f8-28c5-4039-ae8f-40643015f855.md?...",
"depth": 1,
"parentUrl": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
},
"..."
],
"error": null,
"totalPages": 3
}Get a crawl
Returns a crawl’s status and progress and, once it has finished, its first 100 pages. Poll every few seconds until status is completed, failed or cancelled. Polling has no rate limit.
When a crawl returned more than 100 pages, resultTruncated is true. Read every page with Get crawl pages. The html and markdown links expire after 1 hour.
A failed crawl answers 200 with status: "failed" and the reason in error, and costs nothing. A finished crawl stays here for about an hour, and a failed one for 24 hours. After that this returns 404, but its pages, details, report and download stay available from the other crawl endpoints. Extractions started with Extract from a crawl are polled here too.
curl --request GET \
--url https://api.spidra.io/api/crawl/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/crawl/{jobId}"
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/crawl/{jobId}', 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/crawl/{jobId}",
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/crawl/{jobId}"
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/crawl/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/crawl/{jobId}")
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{
"status": "completed",
"progress": {
"status": "completed",
"message": "Crawl completed",
"progress": 1
},
"result": [
{
"url": "https://books.toscrape.com/catalogue/sharp-objects_997/index.html",
"status": "success",
"title": "Sharp Objects | Books to Scrape - Sandbox",
"data": {
"title": "Sharp Objects",
"price": 47.82,
"in_stock": true
},
"html": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/47837f66-2ea8-4b60-a2e6-7656c0fe1946.html?...",
"markdown": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/c8973f4e-da20-4927-a2ef-bd763a274bad.md?...",
"depth": 1,
"parentUrl": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
},
{
"url": "https://books.toscrape.com/catalogue/in-a-dark-dark-wood_963/index.html",
"status": "success",
"title": "In a Dark, Dark Wood | Books to Scrape - Sandbox",
"data": {
"title": "In a Dark, Dark Wood",
"price": 19.63,
"in_stock": true
},
"html": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/9b889b6c-5296-4cdb-84ca-2440acfd2c2b.html?...",
"markdown": "https://.../crawl/e303fb87-846e-4a30-8aa5-bfca457a5357/daa293f8-28c5-4039-ae8f-40643015f855.md?...",
"depth": 1,
"parentUrl": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
},
"..."
],
"error": null,
"totalPages": 3
}Authorizations
Path Parameters
Response
The crawl's status, and its pages once it has finished.
waiting: queued, not started yet.delayed: waiting to be retried after a temporary problem.active: running.progress.messagesays what it's doing.completed: finished. The pages are inresult.failed: no page could be returned.errorsays why, and you aren't charged.cancelled: you cancelled it before any page was returned.
waiting, delayed, active, completed, failed, cancelled Was this page helpful?

