catalyst-labs/document-to-markdown
catalyst-labs--document-to-markdownThis tool calls the Actor "catalyst-labs/document-to-markdown" and retrieves its output results. Actor description: Tested Oct 25, 2026: 99.9% text fidelity on our test PDFs, 99.3% reading order on 2-column PDFs (MarkItDown 84%), PDF tables as real grids (cell placement 0.70, same as Docling). PDF, DOCX, XLSX, HTML to markdown with token counts. $0.001/page, failures free.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "catalyst-labs--document-to-markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | No | Public links to PDF, DOCX, XLSX, XLS, CSV, HTML, TXT or MD files (max 100 per call). Type is detected from the file bytes, not the extension. Each document returns exactly one row with `outcome`; failures (404, blocked, scanned PDF, encrypted) are rows, never charged. Example values: ["https://arxiv.org/pdf/1706.03762"] | |
| files | No | Optional inline files for agents that hold the bytes: `[{"name": "report.pdf", "base64": "..."}]`. Keep under ~9 MB total (input size limit). | |
| pages | No | PDF only: pages to convert, e.g. `1-10`, `5`, `20-`. Default all (up to maxPages). | |
| maxChars | No | Budget per document: markdown is cut at a paragraph boundary to this many characters; 0 = no limit. Default 50000 (about 13,000 tokens; each row reports exact `tokens`). You pay only for the pages actually returned. Example values: 50000 | |
| maxPages | No | Safety cap on PDF pages per document. Default 200. Example values: 200 | |
| waitSecs | No | Max seconds (0–45, default 30) to cap the wait for the Actor run to reach terminal state. For long-running Actors the response returns at the cap with the current run status; follow `nextStep` to poll via get-actor-run. Set to 0 to fire-and-forget. | |
| chunkSize | No | For RAG: split each document into chunks of about this many characters on heading/paragraph boundaries. Each chunk has exact `tokens`, `charStart`/`charEnd` offsets, `headingPath` (all parent headings) and PDF `page`. 0 = off (default). | |
| keepLinks | No | Keep `[text](url)` links from DOCX/HTML. Off saves tokens. | |
| pdfTables | No | `auto` (default) finds tables on PDF pages that look tabular, using the same engine as catalyst-labs/pdf-tables-to-json, and writes them as GFM tables in place. Text-only PDFs are not slowed down. `off` is the old, fastest behaviour. Example values: "auto" | auto |
| pageMarkers | No | Insert `<!-- page N -->` before each PDF page so citations can point at a page. Example values: true | |
| referrer_id | No | Referral code from another user's receipt (ref_...). They earn 10% of this run's price as credit. | |
| timeoutSecs | No | Per-document download timeout. Default 60. Example values: 60 | |
| chunkOverlap | No | Characters repeated between consecutive chunks. Default 200. Example values: 200 | |
| buyerPublicKey | No | Base64 Ed25519 public key (SPKI). Lets you sign a useful/not useful verdict on this run's receipt for 5% off your next run. | |
| maxRowsPerSheet | No | Spreadsheets: rows per sheet rendered as a markdown table. Default 500. Example values: 500 | |
| includeFullMarkdown | No | When chunking, also return the whole `markdown` field (doubles output size). Off by default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tip | No | Advisory guidance RAG Web Browser wrote to its key-value store under the reserved "TIP" key | |
| runId | Yes | Actor run ID | |
| stats | No | Run statistics | |
| status | Yes | Run status: READY | RUNNING | TIMING-OUT | TIMED-OUT | ABORTING | ABORTED | SUCCEEDED | FAILED | |
| actorId | Yes | Stable Apify Actor ID from the run record | |
| summary | Yes | Past-tense summary of the run state | |
| exitCode | No | Actor process exit code; populated for terminal states (especially FAILED) | |
| nextStep | Yes | One primary follow-up action with identifiers interpolated | |
| storages | Yes | Dataset and key-value store metadata, keyed by alias. "default" is always the primary entry. | |
| actorName | No | "username/actor-name" | |
| startedAt | No | ISO timestamp when the run started | |
| finishedAt | No | ISO timestamp when the run finished (terminal states only) | |
| statusMessage | No | Pass-through from Apify run.statusMessage | |
| apifyConsoleUrl | No | Personalized Apify Console link to the run; present only for Console sessions |