PerfectParser Docs

Get Document

Reference for GET /v1/extractions/:extraction_id/documents/:document_id.

GET /v1/extractions/:extraction_id/documents/:document_id

Retrieves status, metadata, and extracted data for a single document within an extraction job. Both IDs are required — the API validates that the document belongs to the specified extraction.

Use cases

  • Retry fetching a result after a webhook delivery failure
  • Fetch one document from a large batch without downloading all results
  • Verify a single file's extraction status and confidence

Path Parameters

ParameterTypeRequiredDescription
extraction_idstringThe extraction job ID.
document_idstringThe document ID (from submit response, status, or webhook payload).
curl https://api.perfectparser.com/v1/extractions/ext_123/documents/doc_abc \
  -H "X-API-Key: pp_live_your_secret_key"

Response 200 OK

{
  "document": {
    "document_id": "doc_abc",
    "extraction_id": "ext_123",
    "parser_id": "prs_999",
    "parser_name": "Invoice Parser",
    "filename": "invoice.pdf",
    "file_type": "application/pdf",
    "file_size": 204800,
    "status": "completed",
    "page_count": 3,
    "credits_used": 3,
    "confidence": 0.98,
    "processing_time_ms": 3200,
    "extracted_data": {
      "invoice_number": "INV-2026-001",
      "total_amount": 1250.00
    },
    "error_message": null,
    "created_at": "2026-06-20T10:00:00.000Z",
    "updated_at": "2026-06-20T10:00:42.000Z"
  }
}

Common Error Responses

HTTP StatusError CodeDescription
401UNAUTHORIZEDInvalid or missing API key.
404RESOURCE_NOT_FOUNDExtraction or document not found, or document does not belong to the extraction.

On this page