Extract Tables, Key-Values & Custom JSON from PDF
extract_pdfExtract structured tables and key-values from PDFs or scanned images using auto, table, or JSON schema modes, with page ranges and multi-page table stitching.
Instructions
Zero-retention general-purpose PDF and scanned document extraction (POST /v1/pdf-extract, 2 credits per succeeded page, failed pages automatically refunded). Supports PDF, JPG, PNG, and WebP up to 10 MB / 20 pages with multi-page table stitching and optional custom JSON schema.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "extract_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Local file path, base64 string, or data URL of the PDF or document image (PDF/JPG/PNG/WebP, max 10 MB). | |
| mode | No | Extraction mode: "auto" (tables + key-values, default), "tables" (spreadsheet tables), or "json" (key-value/schema extraction). | |
| pages | No | Optional 1-based page range, e.g. "1-5" or "1,3,5-8". | |
| schema | No | Optional custom JSON schema object to guide structured extraction. | |
| stitch_tables | No | Whether to stitch tables that continue across consecutive pages. |