Convert
PDF to Excel
Detect tables in a PDF and export them to a clean .xlsx workbook — one sheet per detected table, with values type-coerced back into real numbers, currency and dates.
Free to try — no key required 40 credits / callAI vision: 200 creditsSynchronous
Overview
Upload a PDF; get back a public R2 URL for an .xlsx workbook containing the tables found in it. PDF input only. On the free-try path — callable with no key.
POST
https://api.bytefuse.in/api/v1/pdf/to-xlsxRequest
Content type multipart/form-data:
filefilerequiredThe PDF to extract from. The filename must end in
.pdf, otherwise the request returns 415.enginestringoptionalauto (deterministic detection) or vision (premium AI). Any other value returns 422.Default: autoDetection engines
engine=auto runs a detection-first pipeline, trying each strategy in turn:
- Lattice — ruled tables with visible cell borders.
- Whitespace stream — borderless/financial tables, recovered by column projection.
- OCR word-boxes — scanned or image-only pages, via Tesseract.
Non-table prose is excluded by bounding box, and cell values are type-coerced with Excel number formats that preserve the source display — e.g. (720,000), $4.50.
When to use engine=vision
For scanned, complex or dense borderless financial tables,engine=vision reads each page with a vision LLM into structured JSON, then builds a typed workbook. It falls back to the deterministic engine if it finds nothing. Costs 200 credits instead of 40.Response
200 OK, application/json:
200 OK
{
"success": true,
"url": "https://<r2-host>/pdf_to_xlsx/financials.xlsx",
"tables_found": 3,
"sheets": 3,
"pages": 5,
"credits_charged": 3
}successbooloptionalWhether extraction completed.
urlstringoptionalPublic R2/CDN URL of the
.xlsx workbook.tables_foundintoptionalNumber of tables detected across the document.
sheetsintoptionalSheets in the workbook (one per table). If no table is found, a per-page-text fallback runs and this reflects those sheets.
pagesintoptionalPages in the source PDF.
credits_chargedintoptionalCredits billed — mirrors the
X-Credits-Charged header.Credits
engine=auto (default)
pdf.to_xlsx40engine=vision
pdf.to_xlsx.ai200Examples
curl -X POST https://api.bytefuse.in/api/v1/pdf/to-xlsx \
-H "X-API-Key: dt_live_your_key" \
-F "file=@financials.pdf" \
-F "engine=auto"Errors
415Missing filename, or the file isn’t a
.pdf.422
engine isn’t auto or vision, or the PDF is password-protected.402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500Extraction failed unexpectedly.
Full error semantics on the Errors page.
