Get Crawl Report
curl --request GET \
--url https://api.spidra.io/api/crawl/{jobId}/report \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/crawl/{jobId}/report"
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}/report', 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}/report",
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}/report"
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}/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/crawl/{jobId}/report")
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": "success",
"report": {
"understoodAs": "Individual book detail pages under the mystery category.",
"navigationPages": 1,
"skippedTotal": 51,
"skipped": [
{
"reason": "not_relevant",
"count": 51,
"description": "Didn't match the crawl instruction"
}
],
"skippedUrls": [
{
"url": "https://books.toscrape.com/index.html",
"reason": "not_relevant",
"foundOn": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
}
],
"skippedUrlsTotal": 51
}
}{
"status": "error",
"message": "Access token invalid or expired"
}{
"status": "error",
"message": "Crawl job not found"
}Crawl Endpoints
Get Crawl Report
See how a crawl understood its instruction, how many pages it read to find the ones it returned, and every link it did not follow, with the reason.
GET
/
crawl
/
{jobId}
/
report
Get Crawl Report
curl --request GET \
--url https://api.spidra.io/api/crawl/{jobId}/report \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/crawl/{jobId}/report"
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}/report', 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}/report",
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}/report"
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}/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/crawl/{jobId}/report")
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": "success",
"report": {
"understoodAs": "Individual book detail pages under the mystery category.",
"navigationPages": 1,
"skippedTotal": 51,
"skipped": [
{
"reason": "not_relevant",
"count": 51,
"description": "Didn't match the crawl instruction"
}
],
"skippedUrls": [
{
"url": "https://books.toscrape.com/index.html",
"reason": "not_relevant",
"foundOn": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
}
],
"skippedUrlsTotal": 51
}
}{
"status": "error",
"message": "Access token invalid or expired"
}{
"status": "error",
"message": "Crawl job not found"
}Every finished crawl has a report. Use it when a page you expected is missing from the results: it lists every link the crawl didn’t follow, why, and the page the link was on.
Example Request
curl "https://api.spidra.io/api/crawl/abc-123/report?reason=not_relevant&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
const { report } = await spidra.crawlReport("abc-123", { reason: "not_relevant", limit: 50 });
res = client.crawl_report("abc-123", reason="not_relevant", limit=50)
Response
A real report for a crawl of three book pages from a category page:{
"status": "success",
"report": {
"understoodAs": "Individual book detail pages under the mystery category.",
"navigationPages": 1,
"skippedTotal": 51,
"skipped": [
{ "reason": "not_relevant", "count": 51, "description": "Didn't match the crawl instruction" }
],
"skippedUrls": [
{
"url": "https://books.toscrape.com/index.html",
"reason": "not_relevant",
"foundOn": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
}
],
"skippedUrlsTotal": 51
}
}
| Field | Description |
|---|---|
understoodAs | The kind of page Spidra looked for, in its own words. If this isn’t what you meant, reword the crawl instruction. |
navigationPages | Pages read only to find the ones returned, such as category or listing pages. Not returned and not charged. |
skippedTotal | Links not followed, across all reasons. |
skipped | Each reason with its count and a plain-language description. |
skippedUrls | The skipped links, filtered by reason and paged by limit and offset. Up to 2,000 are recorded per crawl. |
report is null while the crawl is still running, and for crawls that ran before reports existed.
Reasons
| Reason | Meaning |
|---|---|
not_relevant | The link didn’t lead to the kind of page the instruction asked for. |
outside_domain | Another site, or a subdomain while allowSubdomains is off. |
include_pattern | Didn’t match includePaths. |
exclude_pattern | Matched excludePaths. |
file_type | A file rather than a page, such as an image, video, archive or script. |
other_version_or_language | The same page for another software version or locale, when the crawl started from a specific one. |
duplicate_page | Same content as a page already read, under another URL. |
redirected_off_site | Redirected outside the crawl’s scope. |
robots_txt | Disallowed by the site’s robots.txt, with respectRobots: true. |
action_link | A link that performs an action, such as add to cart or log out. These are never followed. |
Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The crawl job ID.
Query Parameters
Only list skipped URLs with this reason.
Available options:
not_relevant, outside_domain, include_pattern, exclude_pattern, file_type, other_version_or_language, duplicate_page, redirected_off_site, robots_txt, action_link How many skipped URLs to return.
Required range:
1 <= x <= 2000How many skipped URLs to skip, for paging.
Required range:
x >= 0Was this page helpful?

