---
title: "Get Parse Results"
method: GET
path: "/datastores/{datastore_id}/documents/{document_id}/parse"
tags: ["/datastores/{id}/documents"]
---

# Get Parse Results

`GET /datastores/{datastore_id}/documents/{document_id}/parse`

Get the parse results that are generated during ingestion for a given document. Retrieving parse results for existing documents ingested before the release of this endpoint is not supported and will return a 404 error.

## Path parameters

- `datastore_id` string, uuid, required — Datastore ID of the datastore from which to retrieve the document
- `document_id` string, uuid, required — Document ID of the document to retrieve details for

## Query parameters

- `output_types` ParseOutputFormat[] — The desired output format(s) of the parsed file. Must be `markdown-document`, `markdown-per-page`, and/or `blocks-per-page`. Specify multiple values to get multiple formats in the response. `markdown-document` parses the whole document into a single concatenated markdown output. `markdown-per-page` provides markdown output per page. `blocks-per-page` provides a structured JSON representation of the content blocks on each page, sorted by reading order.

## Response `200`

Successful Response

- ParseResultsResponseV1 — /parse results reponse object.
  - `file_name` string, required — The name of the file that was uploaded for parsing
  - `status` 'pending' | 'processing' | 'retrying' | 'completed' | 'failed' | 'cancelled', required
  - `pages` ParsedPage[] — Per-page parse results, containing per-page Markdown (if `markdown-per-page` was requested) and/or per-page `ParsedBlock`s (if `blocks-per-page` was requested).
    - `index` integer, required — The index of the parsed page (zero-indexed)
    - `markdown` string — The parsed, structured Markdown of this page. Present if `markdown-per-page` was among the requested output types.
    - `blocks` ParsedBlock[] — The parsed, structured blocks of this page. Present if `blocks-per-page` was among the requested output types.
      - `id` string, uuid, required — Unique ID of the block
      - `type` 'heading' | 'text' | 'table' | 'figure', required — The type of a parsed block.
      - `bounding_box` BlockBoundingBox, required — Normalized bounding box of a block, as relative percentages of the page width and height.
        - `x0` number, required — The x-coordinate of the top-left corner of the bounding box
        - `y0` number, required — The y-coordinate of the top-left corner of the bounding box
        - `x1` number, required — The x-coordinate of the bottom-right corner of the bounding box
        - `y1` number, required — The y-coordinate of the bottom-right corner of the bounding box
      - `markdown` string, required — The Markdown representation of the block
      - `confidence_level` 'low' | 'medium' | 'high' — The confidence level of a parsed block.
      - `page_index` integer — The page (0-indexed) that this block belongs to. Only set for heading blocks that are returned in the table of contents.
      - `parent_ids` string[] — The IDs of the parent in the document hierarchy, sorted from root-level to bottom. For root-level heading blocks, this will be an empty list. Only present if `enable_document_hierarchy` was set to true in the request.
      - `hierarchy_level` integer — The level of the block in the document hierarchy, starting at 0 for the root-level title block. Only present if `enable_document_hierarchy` was set to true in the request.
  - `markdown_document` string — The parsed, structured Markdown of the input file. Only present if `markdown-document` was among the requested output types.
  - `document_metadata` DocumentMetadata — Metadata about the document that was parsed.
    - `hierarchy` DocumentHierarchy — Document hierarchy within the parsed document
      - `blocks` ParsedBlock[] — Heading blocks which define the hierarchy of the document
        - `id` string, uuid, required — Unique ID of the block
        - `type` 'heading' | 'text' | 'table' | 'figure', required — The type of a parsed block.
        - `bounding_box` BlockBoundingBox, required — Normalized bounding box of a block, as relative percentages of the page width and height.
          - `x0` number, required — The x-coordinate of the top-left corner of the bounding box
          - `y0` number, required — The y-coordinate of the top-left corner of the bounding box
          - `x1` number, required — The x-coordinate of the bottom-right corner of the bounding box
          - `y1` number, required — The y-coordinate of the bottom-right corner of the bounding box
        - `markdown` string, required — The Markdown representation of the block
        - `confidence_level` 'low' | 'medium' | 'high' — The confidence level of a parsed block.
        - `page_index` integer — The page (0-indexed) that this block belongs to. Only set for heading blocks that are returned in the table of contents.
        - `parent_ids` string[] — The IDs of the parent in the document hierarchy, sorted from root-level to bottom. For root-level heading blocks, this will be an empty list. Only present if `enable_document_hierarchy` was set to true in the request.
        - `hierarchy_level` integer — The level of the block in the document hierarchy, starting at 0 for the root-level title block. Only present if `enable_document_hierarchy` was set to true in the request.
      - `table_of_contents` string — Markdown representation of the table of contents for this document

## Other responses

- `422` — Validation Error

## Changes

- **2025-08-26** `db7245c74772` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/contextualai/apis/endpoints/changes/datastores/:datastore_id/documents/:document_id/parse/get.md)

---

[API](https://skmtc.dev/contextualai/apis/endpoints.md) · [All operations](https://skmtc.dev/contextualai/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contextualai/endpoints/revisions/ca7f807eec8b/schema)
