documents

Extract tables from a PDF

Extracts tables from a text-based PDF.

Input: multipart file (PDF up to 20 MiB, 60 pages per call) and optional options as a JSON string following /v1/schemas/documents-tables-options: pages (e.g. "1-3,7"), strategy (lines, text, auto), merge_continuations, include_cells, output (json or csv), table_id to choose the CSV table.

Behaviour: pdfplumber line and text strategies, detection of header rows, titles and footnotes, tables continued across pages are merged only with evidence (identical header row or column edges). Each table carries page, bounding box in PDF points (origin top left) and a quality level with reasons. Cells stay text. Pages without text are reported, scans as OCR_REQUIRED; nothing is guessed.

Output: ApiResponse with TablesResult, or with output=csv the best table as text/csv (semicolon) with headers X-Table-Id, X-Table-Page, X-Table-Confidence. The CSV can be passed straight to /v1/supplier/compare, which also accepts PDFs directly (options.pdf_old, options.pdf_new).

Errors: 400 not a PDF or encrypted, 413 too large or too many pages, 422 invalid options or table not found, 429 rate limit, 504 timeout.

Languages: responses are in English. Error, warning and rule codes are stable and language-neutral; agents may translate messages for the user. Text in any language or script is extracted as embedded in the PDF.

Access: open, rate-limited per IP and per MCP session; an X-API-Key header raises the limit. Uploaded files are processed in memory and never stored. Also available as MCP tool documents_tables at /mcp (Streamable HTTP).

post/v1/documents/tables

Request

  • Base URL: https://api.relaex-engineers.de
  • URL: https://api.relaex-engineers.de/v1/documents/tables
  • Auth: none declared

Response

ApiResponse with TablesResult (JSON) or the best table as CSV

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.