Developers

DocTable API — document OCR to JSON, Excel and Word

Send a scanned document, photo or PDF to one endpoint and get structured JSON back, or an Excel, Word or CSV file. Persian, Arabic and Latin documents, no templates.

Get your API key

Loading…

Authentication

Send your key as a bearer token on every request:

Authorization: Bearer dt_...

Keep the key secret and server-side. Creating a new key revokes the previous one; you can revoke it at any time above.

POST /v1/scan

Multipart form upload to https://doctable.online/v1/scan.

FieldRequiredDescription
fileyesThe document: image (PNG, JPG, WebP), PDF, CSV or spreadsheet
formatnojson, excel, word, csv, markdown, text or auto (default)
hintnoFree-text hint about the document, e.g. "bank statement, Persian"
curl -X POST https://doctable.online/v1/scan \
  -H "Authorization: Bearer dt_YOUR_KEY" \
  -F "[email protected]" \
  -F "format=excel"

Example response:

{
  "job": {
    "id": "0b1f6c1e-...",
    "status": "done",
    "document_type": "invoice",
    "format": "excel",
    "format_reason": "tabular line items",
    "text": "...",
    "structured": { "...": "..." },
    "export_url": "/v1/exports/0b1f6c1e-....xlsx",
    "export_mime": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "error": "",
    "created_at": "2026-10-05T10:00:00Z",
    "completed_at": "2026-10-05T10:00:12Z"
  },
  "balance": { "free_remaining": 7, "paid_credits": 190, "total_available": 197 },
  "privacy": { "upload_retained": false, "export_ttl_sec": 300, "post_download_sec": 60 }
}

Downloading the file

For excel and word the result is a file. Download export_url with the same bearer token before it expires (a few minutes):

curl -H "Authorization: Bearer dt_YOUR_KEY" \
  -o invoice.xlsx https://doctable.online/v1/exports/0b1f6c1e-....xlsx

Balance

GET https://doctable.online/v1/me with the bearer token returns your remaining free and paid credits.

Use DocTable from ChatGPT, Claude or Cursor (MCP)

DocTable is available as a remote MCP server. Server URL: https://doctable.online/mcp, with the header Authorization: Bearer dt_...

For clients that cannot set custom headers, put the key in the URL: https://doctable.online/mcp/<your dt_ key>. Treat this URL like a password.

Claude Code:

claude mcp add --transport http doctable https://doctable.online/mcp --header "Authorization: Bearer dt_YOUR_KEY"

Tools:

Errors

StatusMeaning
400Bad request: missing file, invalid form, file too large
401Missing, invalid or revoked key
402No credits remaining — buy a pack in the web app
429rate_limited: slow down. busy_retry_later: the service is at capacity; retry after the Retry-After header (seconds)
502The document could not be read; failed scans are not charged

Limits and billing

Always review OCR output before accounting or tax use.