This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dws-data-extraction/parsing.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Parse endpoint

The parse endpoint extracts structured content from a document and returns either typed spatial elements with bounding boxes or a whole-document Markdown representation:

POST https://api.nutrient.io/extraction/parse

Request formats

You can send documents to the parse endpoint in three ways.

Multipart form upload

Upload a file directly with optional processing instructions.

Terminal window
curl -X POST https://api.nutrient.io/extraction/parse \
-H "Authorization: Bearer your_api_key_goes_here" \
-F "file=@document.pdf" \
-F 'instructions={"mode":"understand","output":{"format":"spatial"}}'

When instructions is omitted, the API defaults to understand mode with spatial element output.

JSON body with URL

Process a document hosted at a public URL without uploading a file.

Terminal window
curl -X POST https://api.nutrient.io/extraction/parse \
-H "Authorization: Bearer your_api_key_goes_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://storage.example.com/invoice.pdf",
"mode": "understand",
"output": { "format": "spatial" }
}'

Raw binary upload

Send a file directly as the request body with the appropriate Content-Type header.

Terminal window
curl -X POST https://api.nutrient.io/extraction/parse \
-H "Authorization: Bearer your_api_key_goes_here" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf

Processing modes

The mode parameter controls the extraction pipeline.

ModeDescriptionSpeedCost
textFast Markdown extraction via Document Engine. No OCR or AI augmentation.Fastest1 credit per page
structureOCR-based structured extraction with spatial element outputFast1.5 credits per page
understandFull extraction pipeline with AI augmentation for richer resultsSlower9 credits per page
agenticVLM-augmented extraction for complex documentsSlowest18 credits per page

Default: understand. Refer to the processing modes guide for a detailed comparison.

Output formats

The output.format parameter controls what the API returns.

FormatDescriptionReturns
spatialTyped document elements with bounding boxes and confidence scores. Not available with text mode.output.elements[]
markdownWhole-document Markdown representationoutput.markdown

Default format depends on the mode: text defaults to markdown; structure, understand, and agentic default to spatial.

When output.format is spatial, you can also set output.includeWords: true to include word-level OCR data nested inside paragraph and table cell elements.

Response structure

Every successful response includes:

{
"status": 200,
"requestId": "req_e5f6g7h8",
"output": { ... },
"metrics": {
"processingTimeMs": 4200,
"pagesProcessed": 1
},
"usage": {
"data_extraction_credits": {
"cost": 9,
"remainingCredits": 850
}
},
"configuration": {
"mode": "understand",
"outputFormat": "spatial"
}
}
  • requestId — Unique identifier for debugging and support requests.
  • output — Contains either elements (spatial format) or markdown (Markdown format).
  • metrics — Processing time and pages processed.
  • usage — Credit consumption for this request.
  • configuration — The mode and output format that were used.

Next steps