Guides / Extract

PDF → tables

POST /v1/pdf/extract-tables  ·  1¢ / page

Detects tables in a text-based PDF using text-coordinate heuristics and returns each table as rows of cells — JSON by default, or CSV for spreadsheet import. Works well on typical report and invoice tables; borderless, artistic layouts are not guaranteed to separate cleanly.

Parameters

NameTypeDescription
filefilePDF to scan for tables. Required.
firstintegerFirst page (1-based). Optional.
lastintegerLast page. Optional.
outputstringjson (default) or csv.
minColsintegerMinimum columns for a row to count as part of a table. Default 2.

Example request

curl -X POST https://api.bigapi.dev/v1/pdf/extract-tables \
  -H "Authorization: Bearer $KEY" \
  -F "file=@invoice.pdf" \
  -F "output=csv" \
  -o tables.csv

Example response

{
  "pages": [
    { "page": 1, "tables": [[["Pos","Item","Price"],["1","Consulting","300"]]] }
  ],
  "tables_found": 1,
  "_meta": { "op": "pdf.extract-tables", "durationMs": 33.4 }
}

Related guides