Get Parse Job

GEThttps://api.filesearch.dev/v3/parse/jobs/:job_id

Returns the status of a parse job and, once it completes, its chunks in order. Chunks are included in the response when the result is 1 MB or smaller. result_url always links to the full result, so large results and bulk loads into another database can read from it directly. There are two ways to wait for a job. Poll: call this endpoint every few seconds without wait, and each request returns the current status at once. Long poll: pass wait (up to 50 seconds), and each request returns as soon as the job ends or the wait runs out. Either way, repeat until status is completed, failed or cancelled. The parse.completed, parse.failed and parse.cancelled webhook events report the end without polling.

Path parameters

job_idstringRequired

Headers

authorizationstringOptional

Query parameters

waitintegerOptional0-50Defaults to 0

Seconds to hold the request while the job is still running, from 0 to 50. The response returns as soon as the job completes, fails or is cancelled, or when the wait runs out, whichever comes first. 0 returns the current status at once.

Response

The job.

job_idstring
typeenum
Allowed values:documentspreadsheet
statusenum
Allowed values:queuedprocessingcompletedfailedcancelled
created_atstringformat: "date-time"
fileobjectOptional
optionsobjectOptional

The options the job ran with. Credentials are never returned.

chunker_versionstring or nullOptional

Version of the chunker that produced the result. It changes when Captain’s chunking changes.

usageobjectOptional

What this job was billed, at the same rates as indexing. Documents bill per page. Spreadsheets bill no pages: their credits come from the sheet text and any described images.

chunk_countinteger or nullOptional
chunkslist of objects or nullOptional

The chunks, in order, when the result is 1 MB or smaller. Larger results are returned only through result_url.

result_urlstring or nullOptional

Short-lived download link for the full result as JSON ({"chunks": [...]}). A new link is minted on every request.

result_expires_atstring or nullOptionalformat: "date-time"

When the result stops being available. Results are kept for at least 7 days after the job completes.

errorobject or nullOptional

Why the job failed. Present when status is failed. A failed job is not billed.

completed_atstring or nullOptionalformat: "date-time"

Errors

GET/v3/parse/jobs/:job_id
import time

import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"
JOB_ID = "prs_c9f0f895fb98ab9159f51fd0297e236d"

headers = {
    "Authorization": f"Bearer {API_KEY}",
}

while True:
    response = requests.get(
        f"{BASE_URL}/v3/parse/jobs/{JOB_ID}",
        headers=headers,
        timeout=30.0
    )
    response.raise_for_status()
    job = response.json()
    if job["status"] in ("completed", "failed", "cancelled"):
        break
    time.sleep(5)

chunks = job["chunks"]
if chunks is None and job["status"] == "completed":
    chunks = requests.get(job["result_url"], timeout=120.0).json()["chunks"]
print(job["status"], len(chunks or []))
200
{
  "job_id": "prs_c9f0f895fb98ab9159f51fd0297e236d",
  "type": "spreadsheet",
  "status": "completed",
  "created_at": "2026-10-01T15:04:05Z",
  "file": {
    "name": "ledger.xlsx",
    "type": "xlsx",
    "pages": null
  },
  "options": {
    "include_images": false,
    "include_verified_facts": true,
    "include_tags_summary": false,
    "input": "captain://upl_5d41402abc4b2a76b9719d911017c592"
  },
  "chunker_version": "production:412",
  "usage": {
    "pages_basic": 0,
    "pages_advanced": 0,
    "credits": 0
  },
  "chunk_count": 2,
  "chunks": [
    {
      "chunk_id": "prs_c9f0f895fb98ab9159f51fd0297e236d:0:0",
      "chunk_index": 0,
      "parent_chunk_index": 0,
      "text": "# Sheet: Intake, sheet information\n| Field | Value |\n| --- | --- |\n| Prepared by | Operations |\n| Season | 2025 |",
      "tokens": 31,
      "location": {
        "sheet_name": "Intake",
        "row_start": 1,
        "row_end": 3,
        "col_start": 1,
        "col_end": 2
      },
      "chunk_type": null,
      "sheet": {
        "section": "sheet information",
        "columns": [
          "Field",
          "Value"
        ],
        "row_role": "sheet_header",
        "structured_fields": {
          "Field": "Prepared by",
          "Value": "Operations"
        }
      }
    },
    {
      "chunk_id": "prs_c9f0f895fb98ab9159f51fd0297e236d:1:0",
      "chunk_index": 0,
      "parent_chunk_index": 1,
      "text": "# Sheet: Intake, section 1 (L-1000)\n| Load | Farm | Wheat / Tonnes | Wheat / Price/t |\n| --- | --- | --- | --- |\n| L-1000 | Mill Farm | 16 | 250 |\n| L-1001 | Ridge Farm | 22 | 245 |",
      "tokens": 58,
      "location": {
        "sheet_name": "Intake",
        "row_start": 7,
        "row_end": 8,
        "col_start": 1,
        "col_end": 4
      },
      "chunk_type": null,
      "sheet": {
        "section": "section 1 (L-1000)",
        "columns": [
          "Load",
          "Farm",
          "Wheat / Tonnes",
          "Wheat / Price/t"
        ],
        "row_role": null,
        "structured_fields": {
          "Load": "L-1000",
          "Farm": "Mill Farm",
          "Wheat / Tonnes": "16",
          "Wheat / Price/t": "250"
        }
      },
      "verified_facts": {
        "row_count": 2,
        "columns": {
          "Wheat / Tonnes": {
            "min": 16,
            "max": 22
          },
          "Wheat / Price/t": {
            "min": 245,
            "max": 250
          }
        }
      }
    }
  ],
  "result_url": "https://results.captain.dev/parse/prs_c9f0f895fb98ab9159f51fd0297e236d/result.json?signature=abc123",
  "result_expires_at": "2026-10-08T15:04:40Z",
  "error": null,
  "completed_at": "2026-10-01T15:04:40Z"
}
Was this page helpful?