PDF to CSV API - extract tables from PDFs and scans into clean CSV
pdf_to_csvSend a PDF or scanned image as base64 and extract structured tables into clean CSV and JSON rows. Merges multi-page tables and skips repeated page headers automatically, supports comma/semicolon/tab/pipe delimiters, UTF-8 or Excel UTF-8 BOM encoding, optional Page column, and automatic Tesseract OCR fallback for scanned pages. Deterministic local engine (pdfplumber + tesseract), 0 AI, up to 15 pages per call. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/call via x402 at https://radarbg.com/x402/pdf-to-csv.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pdf_to_csv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | tables (tables & columns, default), all (tables + text lines), or split (one CSV per table/page as ZIP) | tables |
| encoding | No | utf8 (default for scripts/SQL) or utf8-bom (Excel-ready) | utf8 |
| fileName | No | Optional file name, e.g. invoice-ledger.pdf | |
| delimiter | No | CSV column delimiter: comma (,), semicolon (;) for EU Excel, tab (TSV), or pipe (|) | comma |
| mergePages | No | Merge continuing tables across pages and skip repeated header rows | |
| stripEmpty | No | Remove blank rows and trim extra whitespace | |
| fileContent | No | The PDF or image file as base64, max 20 MB (empty = built-in 2-page sample PDF) | |
| ocrLanguage | No | OCR language for scanned pages | eng |
| includePageColumn | No | Add a Page column showing which PDF page each row came from |