Get a Parse Job
curl --request GET \
--url https://api.spidra.io/api/parse/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/parse/{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/parse/{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/parse/{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/parse/{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/parse/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/parse/{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{
"jobId": "<string>",
"status": "queued",
"fileName": "<string>",
"sourceUrl": "<string>",
"fileId": "<string>",
"format": "<string>",
"totalPages": 123,
"pagesParsed": 123,
"creditsUsed": 123,
"error": "<string>",
"progress": {
"message": "<string>",
"done": 123,
"total": 123
},
"markdown": "<string>",
"pages": [
{
"pageNumber": 123,
"markdown": "<string>",
"method": "text",
"error": "<string>"
}
],
"json": "<unknown>",
"warnings": [
"<string>"
],
"metadata": {
"fileName": "<string>",
"sourceUrl": "<string>",
"format": "<string>",
"totalPages": 123,
"pagesParsed": 123,
"ocrPages": 123
},
"durationMs": 123
}{
"status": "error",
"message": "<string>"
}Parse Endpoints
Get a Parse Job
Check a parse job and get its result: Markdown, per-page output and extracted JSON.
GET
/
parse
/
{jobId}
Get a Parse Job
curl --request GET \
--url https://api.spidra.io/api/parse/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spidra.io/api/parse/{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/parse/{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/parse/{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/parse/{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/parse/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/parse/{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{
"jobId": "<string>",
"status": "queued",
"fileName": "<string>",
"sourceUrl": "<string>",
"fileId": "<string>",
"format": "<string>",
"totalPages": 123,
"pagesParsed": 123,
"creditsUsed": 123,
"error": "<string>",
"progress": {
"message": "<string>",
"done": 123,
"total": 123
},
"markdown": "<string>",
"pages": [
{
"pageNumber": 123,
"markdown": "<string>",
"method": "text",
"error": "<string>"
}
],
"json": "<unknown>",
"warnings": [
"<string>"
],
"metadata": {
"fileName": "<string>",
"sourceUrl": "<string>",
"format": "<string>",
"totalPages": 123,
"pagesParsed": 123,
"ocrPages": 123
},
"durationMs": 123
}{
"status": "error",
"message": "<string>"
}Returns the job’s status. While it runs,
A failed job has
progress says which page it is on ({ "message": "Reading page 3 of 12", "done": 3, "total": 12 }). Once status is completed, the response has the full result, the same shape POST /parse returns. Add ?pages=true to include per-page Markdown.
curl "https://api.spidra.io/api/parse/9de383e6-fd5a-4c82-b3dd-f4dc73647aa8?pages=true" \
-H "Authorization: Bearer $SPIDRA_API_KEY"
status: "failed" and an error such as "This PDF is password protected. Remove the password and try again.". It isn’t charged.Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Include per-page Markdown.
Response
The job, with its result once completed.
Available options:
queued, running, completed, failed Parse the same file again with other options for 24 hours.
Why the document failed. Failed documents aren't charged.
Show child attributes
Show child attributes
With includePages (or ?pages=true).
Show child attributes
Show child attributes
Extracted fields, when prompt or schema was given.
Show child attributes
Show child attributes
Was this page helpful?

