Skip to main content
Deprecated: The standalone Table Recognition endpoint (/api/v1/table_rec) is deprecated. Table extraction is now integrated into the Convert API.Use the Convert API with output_format: "json" to get structured table data with bounding boxes.
Use the Convert API for table extraction:
from datalab_sdk import DatalabClient, ConvertOptions

client = DatalabClient()

options = ConvertOptions(
    output_format="json",
    mode="balanced"
)

result = client.convert("document.pdf", options=options)

# Tables are in the JSON output with block_type: "Table"
for block in result.json.get("children", []):
    if block.get("block_type") == "Table":
        print(f"Table found: {block['id']}")
        print(f"Bounding box: {block['bbox']}")
        # Access table cells in block['children']

REST API

curl -X POST https://www.datalab.to/api/v1/marker \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "[email protected]" \
  -F "output_format=json" \
  -F "mode=balanced"
The JSON response includes Table and TableCell blocks with bounding boxes.

Why Use Marker Instead?

  • Single endpoint - No need for a separate table-specific call
  • Better integration - Tables are extracted in context with the full document
  • More features - Access processing modes, structured extraction, and more
  • Consistent API - Same patterns as all other document processing

Try Datalab

Get started with our API in less than a minute. We include free credits.