Docs / API reference

POST/v1/parse

Parse

Upload one document and return clean, LLM-ready representations of its content.

Execution model

Live request

Runtime depends on endpoint, target, pagination, rendering mode, and active plan limits.

Credit weight

Live catalog

Current weights are managed from the Data API Weights admin table and shown on pricing before use.

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"
Example response
{
  "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"
Example response
{
  "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"
Example response
{
  "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.

FamilyExtensions
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.

Parameters

NameTypeRequirementDescription
filefileRequiredDocument upload, up to 25 MiB and 500 pages.
formatsstring[]OptionalOutputs: markdown, json, html, text, links, images, tables, assets, or metadata.
ocrbooleanOptionalRead text from supported scanned PDFs and image files.

Response fields

FieldTypeDescription
job_idstringCompleted parse job identifier.
data.formatsstring[]Normalized outputs included in this response.
data.markdownstringDocument converted to Markdown when requested.
data.jsonobjectLossless normalized document model when requested.
data.tablesobject[]Extracted tables when requested.
data.linksobject[]Document links with labels and sources when requested.
data.imagesobject[]Image references and extracted image data when requested.
data.qualityobjectPage, character, table, image, and extraction quality counts.
data.warningsstring[]Non-fatal conversion warnings.

Request and response

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"
Example response
{
  "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": []
  }
}