Parsurai Documentation
The developer reference for Parsurai invoice extraction, AP document splitting, cropping, and classification, ZUGFeRD parsing, duplicate detection, vendor analytics, and accounting integrations.
Parsurai helps accounting tools, ERP systems, and business software extract structured invoice data from text, PDF uploads, image uploads, and reachable document URLs. It also splits multi-page batch scans into individual documents, crops multiple documents out of a single scanned page, classifies AP documents by type, and processes purchase orders, delivery notes, and other AP documents through a dedicated extraction API and review workflow.
New here? Start with the Quickstart guide and parse your first invoice with the current extraction API.
Discover Parsurai
Quickstart
Send text, file, and URL extraction requests, then read the current response schema and usage counters.
Authentication
Use `X-API-Key`, rotate `sk_live_` keys, and keep API calls on your server.
Invoice Extraction
Reference for `POST /v1/extract`, `POST /v1/extract/file`, and `POST /v1/extract/url` with field explanations.
ZUGFeRD Parsing
Read supported embedded XML attachments from ZUGFeRD, Factur-X, and XRechnung hybrid PDFs on Pro and Business.
SDKs & Libraries
Use `invoiceextract` for Python and `@invoiceextract/sdk` for TypeScript clients.
MCP Server
Expose `extract_invoice`, `check_duplicate`, and `get_vendor_analytics` to MCP-compatible assistants.
Platform Overview
Parsurai exposes a small set of public API surfaces. Keep plan-gated workflows hidden until the current plan supports them.
| Layer | What it does | Endpoints |
|---|---|---|
| Document parsing | Extract invoice parties, dates, line items, tax breakdowns, totals, document type, and confidence | /v1/extract, /v1/extract/file, /v1/extract/url |
| AP document processing | Splits multi-page batches, crops multi-document scans, classifies document type, and extracts purchase orders, delivery notes, and other AP documents | /v1/documents/split, /v1/documents/crop, /v1/documents/classify, /v1/documents/extract, /v1/workflows/ap/process |
| Embedded XML parsing | Reads supported ZUGFeRD / Factur-X / XRechnung XML attachments from hybrid PDFs | /v1/extract/zugferd |
| Intelligence | Scores duplicates, returns anomaly flags, and lists aggregated vendor metrics | /v1/intelligence/*, /v1/analytics/vendors |
| Accounting export | Downloads a DATEV-compatible CSV for a date range | /v1/exports/datev |
| Stripe receiver | Accepts Stripe billing events for Parsurai account state | /webhooks/stripe |
| Outbound webhooks | Signed HMAC event delivery to your own HTTPS endpoint (Pro and Business plans) | /v1/webhooks |
API Standards
All Parsurai APIs follow consistent conventions:
- Base URL:
https://api.parsurai.com - Protocol: HTTPS only.
- Authentication:
X-API-Keyheader on every request. - Request format:
application/jsonfor JSON endpoints;multipart/form-datafor file uploads. - Response format:
application/jsonwith UTF-8 encoding, except DATEV export which returnsapplication/octet-stream. - Errors: Application failures return
{ "error": { "code": "...", "message": "..." } }. - Versioning: Current stable version is
v1.
Supported Document Types
| Format | Text endpoint | File upload | URL input | ZUGFeRD endpoint |
|---|---|---|---|---|
| Plain text / email body | Yes | No | No | No |
| PDF invoice | No | Yes | Yes | No |
| JPEG / PNG invoice | No | Yes | Yes | No |
| PDF/A-3 ZUGFeRD / Factur-X | No | Yes | Yes | Yes, when embedded XML matches supported names |
Feature Coverage
AP Document Extraction
Parse purchase orders, delivery notes, remittance advice, and standalone e-invoices through the AP document envelope.
AP Classification
Categorize incoming documents by type and confidence before parsing with `POST /v1/documents/classify`.
Document Auto-Crop
Detect and isolate multiple physical documents scanned or photographed together on one page.
Document Auto-Split
Segment multi-page batch PDFs into logical documents by boundary, synchronously or as a polled job.
AP Document Workflow
Run AP documents through a fixed eight-stage pipeline with human-in-the-loop review and audit trails.
Duplicate Detection
Score possible duplicates with `{ score, reason, matching_invoice_ids }` and treat scores `>= 0.85` as likely matches.
Anomaly Detection
Return `flags` for vendor, payment, currency, amount, terms, tax-rate, and tax-ID changes.
Vendor Analytics
List `items` with vendor profile ID, display name, invoice count, total spend, average amount, and last seen time.
Outbound Webhooks
Subscribe to signed, HMAC-verified event delivery for extraction, review, and workflow events.
Stripe Webhook Receiver
Documents the internal `POST /webhooks/stripe` receiver and the three Stripe billing events handled by the router.
DATEV Export
Download a `windows-1252` encoded CSV with `POST /v1/exports/datev?from=YYYY-MM-DD&to=YYYY-MM-DD`.
Rate Limits & Errors
Check plan quotas, request limits, retry behavior, usage counters, and current error codes.