Parse

Turn any document into clean markdown and structured JSON, in one call.
View as Markdown

POST /v1/parse takes one document and returns readable markdown plus a structured JSON representation with layout and page information. No schema, no configuration — use it when you want the document’s content, not specific fields out of it.

How it works

  1. You send a file — a URL, or the id of a file you already have.
  2. CloudRaker fetches the bytes and reads the document: born-digital PDFs directly, scans through OCR, office files through conversion, and audio through transcription.
  3. The call holds until parsing finishes — up to ?wait= seconds (60 by default, 120 max). Finished in time gives 200 with download URLs; otherwise 202 with a run id to poll.
  4. The run and its files expire on their own (ttl, 24 hours by default).

Extraction parses too, so you don’t need to call this first — POST /v1/extract does it as part of the run.

Quickstart

The sample below uses a blank IRS Form W-9 as a public, stable test document, so the call works with no local files.

$curl -X POST https://api.cloudraker.com/v1/parse \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "file": { "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "name": "w9.pdf" }
> }'

The TypeScript and Python samples are plain HTTP so they run with nothing installed. This endpoint is also a top-level method on both SDKs as of 0.3.0 — client.parse(…); that page has a full worked example.

Example response

1{
2 "object": "parse_run",
3 "id": "par_01KYD1M2XT5Q8VB3NRWY7CDEFG",
4 "status": "processed",
5 "expiresAt": "2026-07-26T15:57:41.907Z",
6 "statusUrl": "/v1/runs/par_01KYD1M2XT5Q8VB3NRWY7CDEFG",
7 "files": [
8 { "id": "4c9de1b7-8a30-42f5-b0e6-1d7f5c2a9b44", "name": "w9.pdf", "status": "processed" }
9 ],
10 "file": { "id": "4c9de1b7-8a30-42f5-b0e6-1d7f5c2a9b44", "name": "w9.pdf", "status": "processed" },
11 "output": {
12 "markdownUrl": "https://cdn.cloudraker.com/acme/4c9de1b7-8a30-42f5-b0e6-1d7f5c2a9b44/processed.md?token=…&fn=w9.pdf",
13 "jsonUrl": "https://cdn.cloudraker.com/acme/4c9de1b7-8a30-42f5-b0e6-1d7f5c2a9b44/processed.json?token=…&fn=w9.pdf"
14 }
15}

Key fields

FieldWhat it is
objectAlways parse_run.
idThe run id (par_…). Use it with GET /v1/runs/:id.
statusqueued, processing, processed, failed, cancelled, expired, or needs_input.
expiresAtWhen the run and its files are purged. Controlled by ttl.
files[]The input file with its own status and, on failure, error. file is an alias for files[0].
output.markdownUrlTime-limited download URL for the markdown rendering.
output.jsonUrlTime-limited download URL for the structured JSON — text blocks with page and position.

output appears only once status is processed. The download URLs are short-lived; fetch the content rather than storing the URL.

Reuse the returned file id (files[0].id) in later calls — pass {"file": {"id": "<file id>"}} to extract and the document is not fetched or parsed again.

Configuration

FieldTypeWhat it does
file{url, name?, processing?} or {id}Required. The document to parse.
metadataobjectYour own key/values, echoed back on the run body (not on webhook deliveries). Max 10 KB serialized.
webhook{url} or {id}Where to deliver the terminal event instead of polling. See Webhooks.
ttlinteger seconds, 1–604800How long the run and its file live. Default 24 hours, max 7 days.

processing on the file ref picks how the document is read:

ValueUse for
autoDefault — picks per document.
simpleBorn-digital PDFs with a real text layer. Fastest.
ocrScans and photographed pages.
transcribeAudio, one speaker or speaker labels not needed.
transcribe_diarizeAudio where you need speaker separation.

Sync vs async

Identical to extract: synchronous by default, ?wait= between 0 and 120 seconds, and a 202 handle instead of a timeout error when the cap is reached.

1{
2 "object": "parse_run",
3 "id": "par_01KYD1M2XT5Q8VB3NRWY7CDEFG",
4 "status": "processing",
5 "statusUrl": "/v1/runs/par_01KYD1M2XT5Q8VB3NRWY7CDEFG"
6}

Long audio and large scanned documents will normally come back as 202 — pass ?wait=0 and poll or use a webhook for those.

Save as an action

Parsing has no configuration to save, so there’s nothing to turn into an action — it doesn’t appear in GET /v1/actions/catalog either. The saved-configuration path applies to extract, redact, fill, and sign.

Next steps