Parsli documentation

Build with the API

Build with the API

Send documents from your own system and get structured JSON back. Two routes — inline for small files, upload-and-poll for everything else.


Everything the interface does is available over HTTP. Same Parsli's parsing engine, same field definitions, same results.

Base URL and authentication

bash
https://parsli.co/api/v1

Every request carries an API key as a bearer token. A key is scoped to one Parser — which parser is inferred from the key, so no request needs a parser id.

bash
Authorization: Bearer ext_YOUR_API_KEY

Create keys in the parser's Settings. See authentication.

Choose the right route

This is the decision that matters, and getting it wrong is the most common integration bug.

InlineUpload and poll
HowBase64 the file into the requestGet an upload URL, PUT the bytes, submit the path
ResponseThe result, in the same responseA document_id to poll
Requests13
Use forSmall files that extract quicklyLarge files, multi-page scans, anything slow

Inline is simpler, and it is a trap for anything big. The whole file has to fit in a JSON request body, and the extraction has to finish inside one HTTP request. A forty-page scan will not.

Upload-and-poll has no such ceiling. The bytes go straight to storage without passing through the API, and a worker does the extraction, so nothing is bounded by request wall-clock. Files over 300MB must use this route.

If you are building something that accepts documents from users, use upload-and-poll. You cannot predict what they will send you.

The shortest possible integration

bash
curl -X POST https://parsli.co/api/v1/extract \
  -H "Authorization: Bearer ext_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": {
      "name": "invoice.pdf",
      "type": "application/pdf",
      "data": "'"$(base64 -i invoice.pdf)"'"
    }
  }'
json
{
  "success": true,
  "parser_id": "6f3a…",
  "document_id": "b71c…",
  "results": {
    "invoice_number": "INV-2026-0417",
    "total_amount": 1284.5,
    "line_items": [
      { "description": "Steel brackets", "quantity": 40, "unit_price": 12.5 }
    ]
  }
}

results keys are your field names. Whatever you called a field is the key you get back.

Getting results without polling

Polling is not the only option. A parser can push results to you instead — configure an outbound Webhook and Parsli calls your endpoint the moment a document finishes, whatever route it came in by.

That is usually the better shape for a queue: submit and forget, handle results as they arrive. See receiving results.

Read this next

Tip: The whole vocabulary — every object, field, and payload key — is available as structured data at /docs/dictionary.json. If you are pointing a coding agent at this API, give it that first.

Something here wrong or missing? Tell us — we treat it as a bug.