> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meibel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Output schema

> Field-by-field detail of the strongly-typed structured result: the document, pages, elements, tables, cells, bounding boxes, and chart data

This page documents the strongly-typed structured result returned by `GET /documents/{job_id}/structured`, exposed in the SDKs as `get_structured_result`. The result is a `ParseStructuredDocument`: a set of pages, each holding its elements in reading order, with tables, chart data, recognized labels, positions, and confidence carried on the elements themselves. For the readable and interchange formats and how to choose among them, see [choosing an output format](/document-parsing/guides/choosing-an-output-format).

## Document

The top-level object of a structured parse.

| Field               | Type                                    | Description                                                                   |
| ------------------- | --------------------------------------- | ----------------------------------------------------------------------------- |
| `pages`             | array of [Page](#page)                  | The pages, each with its elements in reading order.                           |
| `num_pages`         | integer                                 | Number of pages in the source document.                                       |
| `confidence`        | [Confidence scores](#confidence-scores) | Aggregate confidence across all pages.                                        |
| `format`            | string \| null                          | Detected input format, such as `pdf`, `docx`, or `markdown`.                  |
| `gpu_ms`            | integer \| null                         | GPU inference time across all stages, in milliseconds.                        |
| `ocr_pages`         | integer \| null                         | Number of pages that required OCR.                                            |
| `orientation_pages` | integer \| null                         | Number of pages whose orientation was corrected.                              |
| `remote_regions`    | integer \| null                         | Number of regions sent to vision models, such as formulas, charts, and seals. |

```json theme={null}
{
  "num_pages": 12,
  "format": "pdf",
  "confidence": { "mean_layout_confidence": 0.96, "min_layout_confidence": 0.71, "num_elements": 214, "num_tables": 3 },
  "pages": [
    {
      "page_number": 0,
      "page_bbox": { "x0": 0, "y0": 0, "x1": 612, "y1": 792 },
      "elements": [
        { "label": "Title", "text": "Quarterly Report", "heading_level": 1, "reading_order": 0, "confidence": 0.98, "bbox": { "x0": 72, "y0": 60, "x1": 540, "y1": 96 } }
      ]
    }
  ]
}
```

## Confidence scores

The document-level summary carried on `confidence`.

| Field                    | Type    | Description                                           |
| ------------------------ | ------- | ----------------------------------------------------- |
| `mean_layout_confidence` | number  | Mean layout-detection confidence across all elements. |
| `min_layout_confidence`  | number  | Lowest layout-detection confidence of any element.    |
| `num_elements`           | integer | Total number of elements detected.                    |
| `num_tables`             | integer | Number of tables recognized.                          |

## Page

One page of the document. Elements sit in `elements`, already in reading order.

| Field                 | Type                                   | Description                                                                                                                                                  |
| --------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `page_number`         | integer                                | The page index, zero-based.                                                                                                                                  |
| `elements`            | array of [Element](#element)           | The page's elements, in reading order.                                                                                                                       |
| `page_bbox`           | [BoundingBox](#bounding-box)           | Page dimensions in PDF points, with a bottom-left origin.                                                                                                    |
| `ocr_applied`         | boolean \| null                        | Whether OCR ran on this page.                                                                                                                                |
| `ocr_score`           | number \| null                         | The OCR-need score, from 0 (has text) to 1 (needs OCR). Present even when OCR did not run.                                                                   |
| `orientation_degrees` | integer \| null                        | Rotation applied to set the page upright: 0, 90, 180, or 270.                                                                                                |
| `image_size`          | array of integer \| null               | Page image dimensions in pixels, when a page image was provided.                                                                                             |
| `transcript_lines`    | array of `ParseTranscriptLine` \| null | Gutter line numbers lifted out of the body text, on a page detected as a line-numbered legal transcript. Each carries its printed `number` and its position. |

## Element

One piece of content. `label`, `text`, `bbox`, `reading_order`, and `confidence` are always present; the rest appear when they apply.

| Field           | Type                                      | Description                                                                                             |
| --------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `label`         | string                                    | The element's role. See [element types](/document-parsing/reference/element-types).                     |
| `text`          | string                                    | The text content, assembled from the region. Empty for a purely visual element.                         |
| `bbox`          | [BoundingBox](#bounding-box)              | Position on the page, in pixel coordinates with a top-left origin.                                      |
| `reading_order` | integer                                   | Position in reading order, zero-based within the page.                                                  |
| `confidence`    | number                                    | Layout-detection confidence, from 0 to 1.                                                               |
| `heading_level` | integer \| null                           | Heading level from 1 to 6, on `Title` and `SectionHeader` elements.                                     |
| `table`         | [Table](#table) \| null                   | The cell grid, present when `label` is `Table`.                                                         |
| `chart_data`    | [ChartData](#chart-data) \| null          | The digitized plot, present on a `Chart` element when its geometry was recovered.                       |
| `ocr_text`      | array of [ChartText](#chart-text) \| null | Text recognized on a `Chart` region. Sibling to `chart_data`, so it survives when `chart_data` is null. |

<Note>
  Treat `label` as an open set. New roles can appear, so branch on the values you handle and fall through gracefully on the rest.
</Note>

## Table

The grid held by a `Table` element.

| Field         | Type                              | Description                             |
| ------------- | --------------------------------- | --------------------------------------- |
| `cells`       | array of [TableCell](#table-cell) | The cells of the table.                 |
| `num_rows`    | integer                           | Number of rows in the grid.             |
| `num_cols`    | integer                           | Number of columns in the grid.          |
| `page_number` | integer                           | The page the table sits on, zero-based. |
| `bbox`        | [BoundingBox](#bounding-box)      | Position of the whole table.            |

## Table cell

One cell within a table.

| Field       | Type                         | Description                                              |
| ----------- | ---------------------------- | -------------------------------------------------------- |
| `text`      | string                       | The cell's text.                                         |
| `row`       | integer                      | Zero-based row index of the cell's top-left position.    |
| `col`       | integer                      | Zero-based column index of the cell's top-left position. |
| `row_span`  | integer                      | Rows the cell spans; 1 when it does not span.            |
| `col_span`  | integer                      | Columns the cell spans; 1 when it does not span.         |
| `is_header` | boolean                      | Whether the cell is a header cell.                       |
| `bbox`      | [BoundingBox](#bounding-box) | Position of the cell.                                    |

```json theme={null}
{
  "num_rows": 2,
  "num_cols": 3,
  "page_number": 0,
  "cells": [
    { "text": "Region", "row": 0, "col": 0, "row_span": 1, "col_span": 1, "is_header": true },
    { "text": "Q1", "row": 0, "col": 1, "row_span": 1, "col_span": 1, "is_header": true },
    { "text": "Q2", "row": 0, "col": 2, "row_span": 1, "col_span": 1, "is_header": true },
    { "text": "West", "row": 1, "col": 0, "row_span": 1, "col_span": 1, "is_header": false },
    { "text": "120", "row": 1, "col": 1, "row_span": 1, "col_span": 1, "is_header": false },
    { "text": "140", "row": 1, "col": 2, "row_span": 1, "col_span": 1, "is_header": false }
  ]
}
```

Reading this grid, including spans, is covered in [extracting tables](/document-parsing/guides/extracting-tables).

## Bounding box

A rectangle on a page. An element's `bbox` is in pixel coordinates with a top-left origin; a page's `page_bbox` is in PDF points with a bottom-left origin.

| Field | Type   | Description                                         |
| ----- | ------ | --------------------------------------------------- |
| `x0`  | number | Left edge.                                          |
| `y0`  | number | Top or bottom edge, per the box's coordinate space. |
| `x1`  | number | Right edge.                                         |
| `y1`  | number | Bottom or top edge, per the box's coordinate space. |

## Chart data

The digitized plot carried by a `Chart` element's `chart_data`.

| Field                | Type                       | Description                                                                       |
| -------------------- | -------------------------- | --------------------------------------------------------------------------------- |
| `chart_type`         | string                     | `Line`, `Scatter`, `Bar`, `Area`, `Pie`, `Mixed`, or `Unknown`.                   |
| `series`             | array of [Series](#series) | The plotted series.                                                               |
| `x_axis`             | [Axis](#axis)              | Calibration of the x-axis.                                                        |
| `y_axis_left`        | [Axis](#axis) \| null      | Calibration of the left y-axis.                                                   |
| `y_axis_right`       | [Axis](#axis) \| null      | Calibration of the right y-axis, for dual-axis charts.                            |
| `categories`         | array of string            | Category labels, for a categorical x-axis.                                        |
| `plot_area`          | `ParseDualBBox`            | The plotting area inside the axes, given in both PDF points and pixels.           |
| `modality`           | string                     | `Vector` or `Raster`, whether the data came from drawn geometry or from an image. |
| `title`              | string \| null             | The chart title, when detected.                                                   |
| `overall_confidence` | number                     | Confidence in the digitization, from 0 to 1.                                      |
| `warnings`           | array of string            | Notes raised during digitization, such as a value disagreement.                   |

### Series

One plotted series within a chart.

| Field          | Type                              | Description                                                         |
| -------------- | --------------------------------- | ------------------------------------------------------------------- |
| `name`         | string \| null                    | The series name, when detected.                                     |
| `style`        | string                            | `Line`, `Scatter`, `Bar`, `Area`, or `PieSlice`.                    |
| `y_axis`       | string                            | `Left`, `Right`, or `Ambiguous`, the axis the series reads against. |
| `color`        | array of integer \| null          | The drawn RGB color.                                                |
| `dash_pattern` | array of number \| null           | The drawn dash pattern, which tells monochrome series apart.        |
| `points`       | array of [DataPoint](#data-point) | The series' points.                                                 |

### Data point

One digitized value on a series.

| Field           | Type            | Description                                                                                                                                               |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x`             | number          | The x value in data units, or the category index when `x_is_category` is true.                                                                            |
| `y`             | number          | The y value in data units.                                                                                                                                |
| `x_is_category` | boolean         | Whether `x` indexes `categories` rather than being a data value.                                                                                          |
| `confidence`    | number          | Confidence in the point.                                                                                                                                  |
| `source`        | string          | Where the value came from: `VectorPath`, `RasterMask`, `RasterMarker`, or `VlmAdjudicated` when a vision model's reading replaced the geometric estimate. |
| `bbox`          | `ParseDualBBox` | Position of the point, given in both PDF points and pixels.                                                                                               |

### Axis

Calibration of one axis, including the fit from pixels to data values.

| Field           | Type                     | Description                                                                               |
| --------------- | ------------------------ | ----------------------------------------------------------------------------------------- |
| `scale`         | string                   | `Linear`, `Log10`, `Categorical`, or `DateTime`.                                          |
| `data_range`    | array of number          | The axis's low and high data values.                                                      |
| `ticks`         | array of `ParseTickMark` | Detected tick marks and their values.                                                     |
| `pixel_to_data` | `ParseAffineFit`         | Linear fit from pixel position to data value, with `slope`, `intercept`, and `r_squared`. |
| `title`         | string \| null           | The axis title.                                                                           |
| `unit`          | string \| null           | The axis unit.                                                                            |

## Chart text

Each entry in an element's `ocr_text` array is one recognized label from a chart, such as an axis title or a data label.

| Field        | Type            | Description                                                                    |
| ------------ | --------------- | ------------------------------------------------------------------------------ |
| `text`       | string          | The recognized text.                                                           |
| `confidence` | number          | Confidence in the recognition.                                                 |
| `source`     | string          | `PdfText` when taken from the document's text, `Ocr` when read from the image. |
| `bbox`       | `ParseDualBBox` | Position, given in both PDF points and pixels.                                 |

Reading these in code is covered in [extracting chart data](/document-parsing/guides/extracting-chart-data).

## Job status

Returned by `GET /documents/{job_id}`. Reports where a job is and, once complete, a summary of what was found.

| Field                | Type            | Description                                       |
| -------------------- | --------------- | ------------------------------------------------- |
| `job_id`             | string          | The job identifier.                               |
| `status`             | string          | `queued`, `processing`, `completed`, or `failed`. |
| `format`             | string          | The result format the job produced.               |
| `pages`              | integer \| null | Page count. Populated when complete.              |
| `elements`           | integer \| null | Element count. Populated when complete.           |
| `tables`             | integer \| null | Table count. Populated when complete.             |
| `confidence`         | number \| null  | Overall confidence. Populated when complete.      |
| `processing_time_ms` | integer \| null | Time spent parsing, in milliseconds.              |
| `error`              | string \| null  | The failure reason, when `status` is `failed`.    |

## Related

<CardGroup cols={2}>
  <Card title="The parsed document" icon="diagram-project" href="/document-parsing/concepts/the-parsed-document">
    The model these fields express.
  </Card>

  <Card title="Formats and capabilities" icon="table-list" href="/document-parsing/reference/formats-and-capabilities">
    Supported inputs, formats, and job statuses.
  </Card>
</CardGroup>
