TableJSON
TableJSON

API

Reference

TableJSON extracts tables from text-layer PDFs and returns JSON. Base URL: https://tablejson.com. Machine-readable spec: /openapi.json.

Authentication

The playground is same-origin and does not need a key. Direct API, RapidAPI, and Zapier calls do.

  • Direct API: X-API-Key or Authorization: Bearer
  • RapidAPI: X-RapidAPI-Key only
  • Zapier: the same key in the connection

Request a key from the contact page. There is no customer login.

GET /v1/health

Confirms the API is up. No file and no key.

curl https://tablejson.com/v1/health
{ "status": "ok" }

GET or POST /v1/example

A tiny 2-row sample. The file URL is ignored. Example notes.

curl -X POST https://tablejson.com/v1/example \
  -H "Content-Type: application/json" \
  -d '{"file":"https://tablejson.com/sample-mini.pdf"}'

Errors

  • 400 — missing file, not a PDF, empty file, or bad URL
  • 401 — missing or invalid API key
  • 413 — file too large
  • 429 — rate limited

POST /v1/extract-tables

Live extract of every table in a text-layer PDF. Scanned PDFs are not supported. file is a multipart upload or JSON {"file":"https://…"}. Limit 500 MB upload, 50 MB for a URL. Samples: sample-mini.pdf, sample.pdf.

curl -X POST https://tablejson.com/v1/extract-tables \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@invoice.pdf"
{
  "status": "success",
  "filename": "example.pdf",
  "total_pages": 1,
  "tables_found": 1,
  "metadata": { "execution_time_ms": 12, "extraction_mode": "text" },
  "tables": [{
    "table_id": 1,
    "page_number": 1,
    "page_end": 1,
    "headers": ["date", "item", "amount"],
    "total_rows": 2,
    "rows": [{
      "row_index": 1,
      "data": { "date": "2026-01-05", "item": "Hosting", "amount": "1250.00" },
      "raw_cells": ["2026-01-05", "Hosting", "1250.00"]
    }]
  }]
}

POST /v1/invoice-xlsx

A text-layer invoice becomes a checksummed Excel workbook. Add ?format=json for the preview. Sheet Invoice has vendor, number, date, currency, lines, and PASS or FAIL. A scan still downloads, with FAIL: no text layer. Try sample-invoice.pdf.

curl -X POST https://tablejson.com/v1/invoice-xlsx \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@invoice.pdf" \
  -o invoice.xlsx

Zapier

Two actions: Extract Tables From PDF and Invoice PDF to Excel. Connect an API key and pass a text-layer PDF from an earlier step. Longer notes are in the guides.