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

# Choosing an output format

> Pick between Markdown, the structured result, and annotated output based on what your application does with the result

A single parse can be read several ways. The readable and interchange renderings come from the result endpoint, where you pass a `format`; the strongly-typed structured result has its own endpoint and method. The underlying parse is generated once and is the same each time; how you fetch it decides how the content is shaped for you. This guide matches each option to the job it suits.

## Choose by what you do next

<CardGroup cols={2}>
  <Card title="Markdown" icon="markdown">
    Feeding a language model, or showing the document to a person.
  </Card>

  <Card title="Structured" icon="brackets-curly">
    Reading elements, tables, chart data, or positions in your own code.
  </Card>

  <Card title="Annotated" icon="location-dot">
    Needing the text together with where it sits on the page.
  </Card>
</CardGroup>

## Markdown: text for people and models

Reach for Markdown when the consumer of the output reads prose. It renders headings as headings, lists as lists, and tables as Markdown grids, which is the shape a language model handles most reliably and a person reads most easily. Use it for retrieval-augmented generation, for summaries, and for any view a human will look at. The result endpoint returns Markdown as a string.

<CodeGroup>
  ```python Python theme={null}
  result = client.documents.get_result(job_id=job_id, format="markdown")
  print(result)
  ```

  ```bash curl theme={null}
  curl "https://api.meibel.ai/v2/documents/$JOB_ID/result?format=markdown" \
    -H "Meibel-API-Key: $MEIBEL_API_KEY"
  ```
</CodeGroup>

## Structured: typed elements for your code

Choose the structured result when your program acts on the content rather than displaying it. It comes back as pages of typed elements, each carrying a `label`, its `text`, a `bbox`, a `reading_order`, and a `confidence` score, with tables exposing their cells by row and column and charts carrying their digitized data. This is the result to read when you route content by label, pull values out of tables, or read a chart's series.

<CodeGroup>
  ```python Python theme={null}
  from meibel import ParseLayoutLabel

  result = client.documents.get_structured_result(job_id=job_id)

  headings = [
      el
      for page in result.pages
      for el in page.elements
      if el.label in (ParseLayoutLabel.TITLE, ParseLayoutLabel.SECTIONHEADER)
  ]
  ```

  ```bash curl theme={null}
  curl "https://api.meibel.ai/v2/documents/$JOB_ID/structured" \
    -H "Meibel-API-Key: $MEIBEL_API_KEY"
  ```
</CodeGroup>

The full field list is in the [output schema](/document-parsing/reference/output-schema).

## Annotated: Markdown with position

Use annotated output when you want readable text and still need to know where each piece came from. It is Markdown with bounding-box provenance comments attached to the content, so you can render the text and, when needed, trace a passage back to its region on the page.

<CodeGroup>
  ```python Python theme={null}
  result = client.documents.get_result(job_id=job_id, format="annotated")
  ```

  ```bash curl theme={null}
  curl "https://api.meibel.ai/v2/documents/$JOB_ID/result?format=annotated" \
    -H "Meibel-API-Key: $MEIBEL_API_KEY"
  ```
</CodeGroup>

<Note>
  If you need both a readable view and full structured data, fetch each in turn. One parse serves every rendering, so a second fetch does not re-run the work.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Output schema" icon="code" href="/document-parsing/reference/output-schema">
    Every field in the structured result.
  </Card>

  <Card title="The parsed document" icon="diagram-project" href="/document-parsing/concepts/the-parsed-document">
    The element model that every rendering expresses.
  </Card>
</CardGroup>
