Skip to main content
This article is about the legacy ADE endpoint (v1/tools/agentic-document-analysis). Use the current endpoints for all new projects.
When you parse a document with the legacy API, the API response includes the parsed Markdown in the data.markdown field. The markdown field contains the complete parsed document content and chunk IDs for reference.

Markdown Field in Context

To better understand the markdown formatting for the legacy API, let’s look at the parsing response for this pallet label: Pallet Label Below is the full parsing response for this document with the markdown field highlighted.
Markdown Fields for Legacy API
{
    "data": {
        "markdown": "SKU\nWH-2847-BLK <!-- text, from page 0 (l=0.071,t=0.098,r=0.464,b=0.263), with ID 426a3506-01d2-4e91-b201-af5f344501a7 -->\n\nQUANTITY\n48 Units <!-- text, from page 0 (l=0.072,t=0.308,r=0.312,b=0.474), with ID 2eeea9d5-17c7-4ea6-9373-b0da9e1f411d -->\n\nSummary : This image displays a barcode consisting of a series of vertical black bars of varying thickness and spacing, set against a white background. No numeric or alphanumeric string is visible below the bars.\n\nbarcode:\n  Barcode Details :\n    • No visible numeric or alphanumeric string.\n    • Barcode type not explicitly indicated; appears to be a 1D linear barcode (possibly Code 128, EAN-13, or similar).\n    • Approximately 50 vertical bars, alternating thick and thin, with consistent height.\n    • Quiet zones (blank margins) present on both left and right sides.\n    • Barcode is horizontally oriented, spanning the width of the image.\n    • No additional text, logo, or annotation present.\n\nDimensions & Placement :\n    • Barcode occupies the central horizontal region of the image.\n    • Bars are evenly spaced and extend vertically from top to bottom within the barcode area.\n\nAnalysis :\n    • The barcode is designed for machine readability, but without a visible numeric/alphanumeric string or further context, the encoded data cannot be determined.\n    • The absence of human-readable text suggests this is a generic or template barcode image, not tied to a specific product or identifier. <!-- figure, from page 0 (l=0.111,t=0.546,r=0.882,b=0.861), with ID 5ac2f680-cb7e-4a6c-8d07-617bd65cb978 -->\n\n2847    0000    4812 <!-- text, from page 0 (l=0.296,t=0.918,r=0.702,b=0.985), with ID 31cafe3e-8f00-4d3f-8e5d-f17451e4ec7a -->",
        "extracted_schema": null,
        "extraction_metadata": null,
        "chunks": [
            {
                "text": "SKU\nWH-2847-BLK",
                "grounding": [
                    {
                        "box": {
                            "l": 0.07070992887020111,
                            "t": 0.09801134467124939,
                            "r": 0.46398574113845825,
                            "b": 0.26285043358802795
                        },
                        "page": 0
                    }
                ],
                "chunk_type": "text",
                "chunk_id": "426a3506-01d2-4e91-b201-af5f344501a7",
                "rotation_angle": 0.0
            },
            {
                "text": "QUANTITY\n48 Units",
                "grounding": [
                    {
                        "box": {
                            "l": 0.0722845047712326,
                            "t": 0.3077216148376465,
                            "r": 0.3118019700050354,
                            "b": 0.47360438108444214
                        },
                        "page": 0
                    }
                ],
                "chunk_type": "text",
                "chunk_id": "2eeea9d5-17c7-4ea6-9373-b0da9e1f411d",
                "rotation_angle": 0.0
            },
            {
                "text": "Summary : This image displays a barcode consisting of a series of vertical black bars of varying thickness and spacing, set against a white background. No numeric or alphanumeric string is visible below the bars.\n\nbarcode:\n  Barcode Details :\n    • No visible numeric or alphanumeric string.\n    • Barcode type not explicitly indicated; appears to be a 1D linear barcode (possibly Code 128, EAN-13, or similar).\n    • Approximately 50 vertical bars, alternating thick and thin, with consistent height.\n    • Quiet zones (blank margins) present on both left and right sides.\n    • Barcode is horizontally oriented, spanning the width of the image.\n    • No additional text, logo, or annotation present.\n\nDimensions & Placement :\n    • Barcode occupies the central horizontal region of the image.\n    • Bars are evenly spaced and extend vertically from top to bottom within the barcode area.\n\nAnalysis :\n    • The barcode is designed for machine readability, but without a visible numeric/alphanumeric string or further context, the encoded data cannot be determined.\n    • The absence of human-readable text suggests this is a generic or template barcode image, not tied to a specific product or identifier.",
                "grounding": [
                    {
                        "box": {
                            "l": 0.11109775304794312,
                            "t": 0.5458672046661377,
                            "r": 0.8822200894355774,
                            "b": 0.861375093460083
                        },
                        "page": 0
                    }
                ],
                "chunk_type": "figure",
                "chunk_id": "5ac2f680-cb7e-4a6c-8d07-617bd65cb978",
                "rotation_angle": 0.0
            },
            {
                "text": "2847    0000    4812",
                "grounding": [
                    {
                        "box": {
                            "l": 0.29578033089637756,
                            "t": 0.91764235496521,
                            "r": 0.7021114826202393,
                            "b": 0.9852532148361206
                        },
                        "page": 0
                    }
                ],
                "chunk_type": "text",
                "chunk_id": "31cafe3e-8f00-4d3f-8e5d-f17451e4ec7a",
                "rotation_angle": 0.0
            }
        ]
    },
    "errors": [],
    "extraction_error": null,
    "metadata": {
        "parse_id": "vtw5hpu9v4t7rqefz7ncdxefs",
        "page_count": 1,
        "processed_at": "2025-10-15T20:20:07.202060+00:00",
        "pages_processed": 1,
        "processing_time_ms": 4385,
        "filename": "pallet-label.png",
        "user_id": "a0k90chtdkyd",
        "pages_rotation_angles": {
            "0": 0.0
        }
    }
}

Markdown Structure

The markdown field contains a sequence of chunks. Each chunk consists of the content followed by an HTML comment containing metadata. For example, the following markdown field contains two chunks:
  • A text chunk (ID: 426a3506-01d2-4e91-b201-af5f344501a7) with SKU information
  • A text chunk (ID: 2eeea9d5-17c7-4ea6-9373-b0da9e1f411d) with quantity information
SKU
WH-2847-BLK <!-- text, from page 0 (l=0.071,t=0.098,r=0.464,b=0.263), with ID 426a3506-01d2-4e91-b201-af5f344501a7 -->

QUANTITY
48 Units <!-- text, from page 0 (l=0.072,t=0.308,r=0.312,b=0.474), with ID 2eeea9d5-17c7-4ea6-9373-b0da9e1f411d -->

HTML Comment Structure

Each HTML comment contains three pieces of information that map to the corresponding chunk object:
InformationMaps toDescriptionExample
Chunk typechunk_typeThe type of contenttext, figure, table
GroundinggroundingPage number (starting at 0) and bounding box coordinates (l=left, t=top, r=right, b=bottom)from page 0 (l=0.071,t=0.098,r=0.464,b=0.263)
Chunk IDchunk_idUnique identifier for the chunkwith ID 426a3506-01d2-4e91-b201-af5f344501a7