Parse Document

POSThttps://api.filesearch.dev/v3/parse/documents

Parse runs a file through the same parsing and chunking Captain uses for indexing and returns the chunks without storing them in a collection. The output is meant to be taken into another database or pipeline and managed there.

Accepts PDF, DOCX and DOC files. Send the file as input: a direct download link, or the captain:// id from Upload File for a local file. Parsing runs as a job: this request returns 202 with a job_id, and the chunks come back from Get Parse Job once the job completes. Pages are billed at the indexing rates for the chosen processing_type. A failed or cancelled job is not billed.

Headers

authorizationstringOptional
Idempotency-KeystringOptional

Retrying a request with the same key returns the original job instead of starting a second one.

Request

This endpoint expects an object.

inputstringRequired

The file to parse, as one of:

  • A direct download link: a public HTTPS URL, or a presigned URL from S3, Google Cloud Storage, Azure Blob Storage or any other store.
  • A captain:// id returned by Upload File, for a file sent from local disk.

For a link, Captain copies the file into its own storage right after accepting the job, so the link only needs to work for a few seconds. A link that cannot be read, a file over 100 MB, or a file type the endpoint does not accept ends the job as failed with download_failed, file_too_large or unsupported_file_type, and nothing is billed.

include_tags_summarybooleanOptionalDefaults to false

When true, each chunk also carries the tags and summary Captain generates during indexing. These are model output, so two runs on the same file can return different values.

processing_typeenumOptionalDefaults to basic

advanced extracts tables, figures and charts and bills advanced pages. basic extracts text and layout and bills basic pages. auto inspects the file and uses advanced when it has photos, drawings, tables or scanned pages (logos and signatures do not count), otherwise basic, and bills the tier it used. Same meaning and rates as indexing. Use advanced for files processed ahead of time, where quality matters most, and basic for files a user adds to a chat, where speed matters most.

Allowed values:advancedbasicauto

Response

Job accepted.

job_idstring

Identifier of the parse job.

typeenum
Allowed values:documentspreadsheet
statusenum
Allowed values:queued
status_urlstring

Path of the Get Parse Job endpoint for this job.

created_atstringformat: "date-time"

Errors

POST/v3/parse/documents
import requests

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

response = requests.post(
    f"{BASE_URL}/v3/parse/documents",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "input": "https://storage.example.com/reports/annual-review.pdf?X-Amz-Signature=abc123",
        "processing_type": "advanced"
    },
    timeout=60,
)

print(response.json())
202
{
  "job_id": "prs_8f14e45fceea167a5a36dedd4bea2543",
  "type": "document",
  "status": "queued",
  "status_url": "/v3/parse/jobs/prs_8f14e45fceea167a5a36dedd4bea2543",
  "created_at": "2026-10-01T15:04:05Z"
}
Was this page helpful?