v2

API Reference

Complete documentation for the DocDigitizer Document Extraction API v2.

Authentication

All API requests require a Bearer token in the Authorization header. Get your key from customerportal.docdigitizer.com — no credit card required.

Tip Keep your API key secret. Never expose it in client-side code or commit it to version control. Use environment variables.
header
Authorization: Bearer dd-YOUR_API_KEY

Base URL

https://api.docdigitizer.com/v2

Requests must use HTTPS. HTTP requests are rejected. All responses are JSON.

POST /extract

Extract structured data from a document. Send a file via multipart form data and receive a JSON object with all extracted fields. Supports 371+ document types.

POST https://api.docdigitizer.com/v2/extract

Parameters

ParameterTypeDescription
file requiredfileThe document to extract. Accepted formats: PDF, PNG, JPG, JPEG, TIFF, BMP, WEBP. Max size: 50 MB.
schema optionalstringA JSON Schema string defining the fields to extract. When omitted, DocDigitizer auto-detects the document type and extracts all known fields.

Code Examples

curl
$ curl -X POST https://api.docdigitizer.com/v2/extract \
    -H "Authorization: Bearer dd-YOUR_API_KEY" \
    -F "file=@invoice.pdf"

Response — 200 OK

200 OK · application/json
{
  "id": "ext_01HVX8M3K2P5Q7N9R4T6W0Y",
  "type": "invoice",
  "credits_used": 1,
  "processing_time_ms": 2318,
  "data": {
    "vendor": "Acme Corp",
    "vendor_vat": "PT123456789",
    "invoice_number": "INV-2026-0847",
    "date": "2026-02-15",
    "due_date": "2026-03-15",
    "subtotal": 1033.06,
    "tax": 216.94,
    "total": 1250.00,
    "currency": "EUR",
    "line_items": [
      { "description": "API credits", "quantity": 5000, "unit_price": 0.25, "total": 1250.00 }
    ]
  }
}

Error Codes

StatusCodeDescription
400invalid_fileFile format not supported, corrupted, or missing.
401unauthorizedMissing or invalid API key.
413file_too_largeFile exceeds the 50 MB limit.
429rate_limit_exceededYou've exceeded your plan's rate limit. Retry after the Retry-After header value.
500extraction_failedInternal extraction error. Failed extractions are never charged.

Rate Limits

Rate limits apply per API key. When exceeded, the API returns 429 with a Retry-After header.

PlanRequests / minConcurrentMonthly credits
Free10 / min250 (one-time)
Hobby60 / min5500 / month
Standard60 / min205,000 / month
EnterpriseCustomCustomCustom
Tip Failed extractions (HTTP 5xx) are never charged and do not count towards your rate limit.

SDKs

Official SDKs with full TypeScript support, automatic retries, and progress callbacks.

SDKInstallVersion
Pythonpip install docdigitizer2.1.0
Node.jsnpm install docdigitizer1.2.0
CLIpip install docdigitizer2.1.0