Parse
Extract structural layout and text from complex documents into clean Markdown.
A Parsing turns a Document into a structured Parsed Document of pages and blocks (headings, paragraphs, tables, images), which you can read as Markdown, text, HTML or JSON.
- Headers are preserved as logical hierarchy nodes (
#,##,###). - Tables are formatted into native Markdown tables.
- Reading order is reconstructed to ensure text flow matches human intent.
Every Operation parses its Document the same way, with the parsing field of its configuration.
🏗️ Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
tier | string | fast | The Parsing Tier: fast or accurate, see below. |
pages | string or array | all pages | Pages to parse, as a list of indexes or a string like "0,2-4" (0-based). |
perimeter | string | external | Where your data may go. See Perimeters. |
Parsing Tiers
| Tier | Description |
|---|---|
fast | Default. Extracts the text the file already contains. Best for digital files (DOCX, XLSX, HTML, text). |
accurate | Reads PDFs, images and presentations page by page with an OCR model: layout, scans and complex tables. Formats that are already text (Word, spreadsheets, HTML, CSV, JSON, text) are read as with fast. |
accurate runs on the OCR model of the Perimeter; on PDFs, images and presentations it reads at most 100 pages and costs one Credit per page; fast costs one Credit per Document.
🛠️ Parse a Document
For every field and parameter, see the Parsings reference.
Submit a Parsing
curl -X POST "https://api.axelered.com/v1/parsings?wait=30" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/document.pdf" \
-F 'config={"tier": "accurate", "pages": "0-4"}'The response is the Parsing: 200 when it finished within wait, 202 while it is still running. See Lifecycle.
Read the Parsed Document
Once the Parsing is done, read its Parsed Document as markdown (default), text, html or json:
curl "https://api.axelered.com/v1/parsings/{parsing_id}/output?format=markdown" \
-H "Authorization: Bearer YOUR_API_KEY"| Parameter | Default | Description |
|---|---|---|
format | markdown | markdown, text, html or json. |
include_images | true | false replaces images with a placeholder. |
include_bbox | true | false drops the bounding boxes of the blocks (json only). |
format=json returns the full structure, with the bounding box of each block. Before the Parsing finishes, the Output returns 425 output_not_ready; a failed Parsing has no Output (404).
List, Read & Delete
- List Parsings: newest first, optionally for one Document with
?documentId=. - Read Parsing: status and credits, with optional
wait. - Delete Parsing: hide a Parsing. Its Document is kept.