apyhub
DATA EXTRACTION

Extract Table from PDF Document API

What it does

PDF Table Extractor reads a PDF file and returns the tables it finds as row arrays. Send a PDF in the request body and get back the extracted tables, grouped by page and table index, along with a total table count.

Use it when you need to turn tabular PDFs into structured data for spreadsheets, databases, or downstream parsing. The response includes a tables array where each table contains its page, table_index, and rows, so you can map extracted content back to the source document.

It accepts one binary file in the body, with a maximum size of 20 MB. The output is compact and predictable, which makes it useful for invoice processing, report ingestion, document analytics, and any workflow that starts with tables trapped inside a PDF.

POST
Extract tables from a PDF as arrays of row arrays
http://localhost:8080/dosvak/extract-pdf-tables
QUICKSTARTGUIDE

Quickstart

Upload a PDF to extract any tables found in it.

curl -X POST "http://localhost:8080/dosvak/extract-pdf-tables" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf"

What you'll get back

Returns a JSON object with tables and table_count fields. tables is an array of table objects, each with page, rows, and table_index; table_count is the total number of tables found.

{
  "tables": [
    {
      "page": 1,
      "rows": [
        ["Header 1", "Header 2"],
        ["Value 1", "Value 2"]
      ],
      "table_index": 0
    }
  ],
  "table_count": 1
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
PDF file (max 20 MB)

About this endpoint

What it does

Extracts tables from an uploaded PDF file and returns them as JSON arrays of row arrays. The response also includes the number of tables found.

Request Body

ParameterTypeMandatoryDescription
fileStringYesPDF file upload. Max 20 MB.

Response

Returns a JSON object with a tables array and a table_count integer. Each item in tables is an object describing one extracted table with page, rows, and table_index fields.

ParameterTypeMandatoryDescription
tablesObject ArrayNoArray of extracted table objects. Each object includes page, rows, and table_index.
tables[].pageIntegerNoPage number where the table was found.
tables[].rowsArrayNoTable content as an array of row arrays.
tables[].table_indexIntegerNoIndex of the table in the extracted results.
table_countIntegerNoTotal number of tables extracted.

Notes

The uploaded PDF file must be 20 MB or smaller.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.