Parsed

API reference

Base URL: https://api.getparsed.com. All responses are JSON.

Authentication

Pass your API key as a bearer token on every request.

Authorization: Bearer sk_live_...

Get a key on the signup page. Keep it server-side; it carries your usage quota and billing. Requests without a valid key return 401.

Quickstart

Upload a file and name its type. doc_type is one of invoice, receipt, or bank_statement.

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -F "doc_type=invoice" \
  -F "file=@invoice.pdf"

That returns a JSON response with the extracted data plus a fields object showing per-field confidence.


POST /v1/extract

Extract structured data from one document. Accepts a multipart file upload or base64 in a JSON body. PDF, PNG, JPEG, WebP, and GIF are supported. Maximum 20 MB per file.

Parameters

FieldRequiredDescription
doc_typeYesinvoice, receipt, or bank_statement.
fileOne ofThe document, as a multipart file upload.
file_base64One ofThe document base64-encoded (JSON body). Requires media_type.
media_typeWith base64MIME type, e.g. application/pdf, image/jpeg.
schemaNoA JSON Schema to override the default for this doc_type.

Multipart example (invoice)

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -F "doc_type=invoice" \
  -F "file=@invoice.pdf"

Multipart example (receipt)

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -F "doc_type=receipt" \
  -F "file=@receipt.jpg"

Multipart example (bank statement)

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -F "doc_type=bank_statement" \
  -F "file=@statement.pdf"

Base64 JSON example

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "doc_type": "bank_statement",
    "media_type": "application/pdf",
    "file_base64": "'"$(base64 -i statement.pdf)"'"
  }'

Response schema

Every extraction response has the same top-level shape.

{
  "doc_type": "invoice",
  "pages":    1,
  "data":   { ... },   // extracted fields
  "fields": {          // per-field metadata
    "total": {
      "confidence":   0.99,
      "needs_review": false,
      "source":       "text"    // "text" | "vision" | "derived"
    },
    "vendor": {
      "confidence":   0.91,
      "needs_review": false,
      "source":       "vision"
    }
  }
}

Field metadata

KeyTypeDescription
confidencefloat 0-1How confident the pipeline is in this field's value.
needs_reviewbooleantrue when confidence is below the auto-accept threshold, or when code verification catches a discrepancy. Route these to a human.
sourcestringtext: read directly from extracted text. vision: resolved from the image. derived: computed (e.g. a subtotal summed from line items).

You can auto-accept fields where needs_review is false and route the rest to a review queue. This is the intended workflow for production.


Default field schemas

When no schema is provided, each document type returns these fields.

invoice

{
  "vendor":         "string",
  "invoice_number": "string",
  "date":           "string (ISO 8601)",
  "due_date":       "string | null",
  "line_items": [
    {
      "description": "string",
      "quantity":    "number",
      "unit_price":  "number",
      "amount":      "number"
    }
  ],
  "subtotal": "number",
  "tax":      "number",
  "total":    "number",
  "currency": "string (ISO 4217)"
}

receipt

{
  "merchant":       "string",
  "date":           "string (ISO 8601)",
  "items": [
    {
      "description": "string",
      "quantity":    "number",
      "amount":      "number"
    }
  ],
  "total":          "number",
  "tax":            "number | null",
  "payment_method": "string | null"
}

bank_statement

{
  "account":          "string",
  "period":           "string",
  "opening_balance":  "number",
  "closing_balance":  "number",
  "transactions": [
    {
      "date":        "string (ISO 8601)",
      "description": "string",
      "amount":      "number",   // negative = debit
      "balance":     "number | null"
    }
  ]
}

Transaction amount is signed: negative for debits and withdrawals, positive for credits and deposits.


Custom schemas

Pass a JSON Schema as the schema parameter to override the default for that request. The model will only extract the fields you specify.

curl https://api.getparsed.com/v1/extract \
  -H "Authorization: Bearer sk_live_..." \
  -F "doc_type=invoice" \
  -F "file=@invoice.pdf" \
  -F 'schema={"type":"object","properties":{"total":{"type":"number"},"due_date":{"type":"string"}}}'

Reconciliation

Bank statement responses include a reconciliation block. The pipeline computes: opening balance plus the sum of all transaction amounts, then compares the result to the stated closing balance.

"reconciliation": {
  "ok":               true,
  "computed_closing": 1150.00,
  "stated_closing":   1150.00,
  "difference":          0.00
}

ok is false when the difference exceeds one cent, or when a balance or transaction amount could not be read. Use it as a gate before trusting the extraction: a failed reconciliation means at least one value is likely wrong.


GET /v1/usage

Returns the calling key's current-month page count and limit.

curl https://api.getparsed.com/v1/usage \
  -H "Authorization: Bearer sk_live_..."
{
  "plan":      "free",
  "month":     "2026-11",
  "pages":     12,
  "requests":  9,
  "limit":     100,
  "remaining": 88
}

On paid plans, limit and remaining are null.


Errors

All error responses have the same shape:

{
  "error": {
    "type":    "authentication_error",
    "message": "Invalid API key."
  }
}
StatustypeWhen
400invalid_request_errorMissing or invalid parameters.
401authentication_errorMissing or invalid API key.
402free_tier_exceededFree monthly page cap reached. Upgrade to continue.
413request_too_largeFile exceeds 20 MB.
422unprocessable_documentFile is too low quality or corrupt to extract from.
429rate_limit_exceededToo many requests. Slow down and retry.
502extraction_errorExtraction completed but could not produce valid JSON.

Rate limits

Free tier: 10 requests per minute, 100 pages per month. Paid plans have higher limits and no monthly cap. The X-RateLimit-Remaining and X-RateLimit-Reset headers are included on every response.


Pricing

Start free. When you need more, pay by the page.

Free tier
$0

No credit card required.

  • 100 pages per month
  • All document types
  • Per-field confidence scores
  • Rate limit: 10 req/min

Invoices and receipts run on a fast model. Bank statements use a higher-accuracy model and include reconciliation. Paid pricing is in beta and billed through Stripe.

Get a free key