Parse Endpoint
Convert documents, spreadsheets, presentations, HTML, Markdown, text, email, ebooks, and images into clean outputs.
Getting Started
Send your API key as a bearer token. Start with the smallest request below.
Parse a Document
Upload one file as multipart form data and select the outputs you need.
curl -X POST "https://api.datablue.dev/v1/parse" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@report.pdf" \ -F "formats=markdown" \ + -F "formats=json" \ + -F "formats=metadata" \ -F "ocr=true"
{
"success": true,
"job_id": "550e8400-e29b-41d4-a716-446655440020",
"data": {
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 184320,
"formats": [
"markdown",
"json",
"metadata"
],
"markdown": "# Quarterly Report\n\nRevenue increased 18%.",
"json": {
"type": "document",
"children": []
},
"metadata": {
"page_count": 12
},
"quality": {
"page_count": 12,
"character_count": 18420
},
"warnings": []
}
}Parse Options
Output Formats
Select any combination of Markdown, JSON, HTML, text, links, images, tables, assets, and metadata.
curl -X POST "https://api.datablue.dev/v1/parse" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@report.pdf" \ -F "formats=markdown" \ + -F "formats=html" \ + -F "formats=links" \ + -F "formats=images" \ + -F "formats=tables" \ -F "ocr=true"
{
"success": true,
"job_id": "550e8400-e29b-41d4-a716-446655440020",
"data": {
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 184320,
"formats": [
"markdown",
"html",
"links",
"images",
"tables"
],
"markdown": "# Quarterly Report\n\nRevenue increased 18%.",
"json": {
"type": "document",
"children": []
},
"metadata": {
"page_count": 12
},
"quality": {
"page_count": 12,
"character_count": 18420
},
"warnings": [],
"html": "<h1>Quarterly Report</h1><p>Revenue increased 18%.</p>",
"links": [
{
"url": "https://example.com/financials",
"text": "Financial statements",
"source": "document"
}
],
"images": [],
"tables": [
{
"rows": [
[
"Quarter",
"Revenue"
],
[
"Q2",
"$4.2M"
]
]
}
]
}
}OCR
Keep OCR enabled for scans and images. Disable it for digital documents when OCR is unnecessary.
curl -X POST "https://api.datablue.dev/v1/parse" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@report.pdf" \ -F "formats=markdown" \ + -F "formats=text" \ -F "ocr=false"
{
"success": true,
"job_id": "550e8400-e29b-41d4-a716-446655440020",
"data": {
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 184320,
"formats": [
"markdown",
"text"
],
"markdown": "# Quarterly Report\n\nRevenue increased 18%.",
"json": {
"type": "document",
"children": []
},
"metadata": {
"page_count": 12
},
"quality": {
"page_count": 12,
"character_count": 18420
},
"warnings": [],
"text": "Quarterly Report\nRevenue increased 18%."
}
}Supported Files
Uploads may be up to 25 MiB and 500 pages.
| Family | Extensions |
|---|---|
| Documents and ebooks | .pdf, .epub, .docx, .docm, .dotx, .dotm, .odt, .ott, .boxnote |
| Spreadsheets | .xlsx, .xlsm, .csv, .ods, .ots |
| Presentations | .pptx, .pptm, .ppsx, .potx, .potm, .ppsm, .odp, .otp |
| Web and markup | .html, .htm, .xhtml, .md, .markdown, .qmd, .rmd, .adoc, .asciidoc, .asc, .tex, .latex |
| Text and communication | .txt, .text, .eml, .vtt |
| Images | .png, .jpg, .jpeg, .tif, .tiff, .bmp, .webp |
Response
The response always includes file details, selected formats, quality counts, and warnings. Optional output fields appear only when requested.
Error Handling
Invalid file types, empty files, unsafe document archives, oversized uploads, and unsupported formats return 400. Authentication and plan limits use their standard API errors.
