PerfectParser Docs

Extractions Overview

Submit documents for AI extraction, track processing status, and retrieve structured results.

An Extraction is an asynchronous job that processes one or more documents against a parser. Submit files, poll until processing finishes, then download structured JSON results.

Documents are nested under extractions — there is no top-level /v1/documents resource. You always need both extraction_id and document_id to fetch a single document.


Which endpoint do I call?

GoalEndpoint
Submit filesPOST /v1/extractions
Is the job done?GET /v1/extractions/:extraction_id
All results at onceGET /v1/extractions/:extraction_id/results
One result (webhook retry, large batch)GET /v1/extractions/:extraction_id/documents/:document_id
Export batchGET /v1/extractions/:extraction_id/export
Export one fileGET /v1/extractions/:extraction_id/documents/:document_id/export

Typical workflow

  1. Submit an extractionPOST /v1/extractions with parser_id and file(s). Returns 202 with extraction.extraction_id and per-document IDs.
  2. Check status — poll GET /v1/extractions/:extraction_id until status is completed, failed, or partial.
  3. Get results — fetch structured data for all documents in the batch.
  4. Export results — (optional) download results as JSON, CSV, or Excel.

For real-time delivery instead of polling, configure Webhooks. Webhook payloads include both extraction_id and document_id for nested follow-up requests.


Endpoints

EndpointDescription
Submit ExtractionPOST /v1/extractions
List ExtractionsGET /v1/extractions
Get StatusGET /v1/extractions/:extraction_id
Get ResultsGET /v1/extractions/:extraction_id/results
Export ResultsGET /v1/extractions/:extraction_id/export
Get DocumentGET /v1/extractions/:extraction_id/documents/:document_id
Export DocumentGET /v1/extractions/:extraction_id/documents/:document_id/export

Billing

Credits are charged per page (1 page = 1 credit). The submit endpoint counts pages server-side and rejects the request with 402 INSUFFICIENT_CREDITS if your balance is too low. POST /v1/extractions has a tighter rate limit of 20 requests/minute.


On this page