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

# JSON Response for Sectioning

export const adePythonLibrary = 'ade-python';

export const section = 'ADE Section';

export const parse = 'ADE Parse';

export const ade = 'Agentic Document Extraction';

When you section a document with the [{section} API](https://docs.landing.ai/api-reference/tools/ade-section), the results are returned in a structured JSON format.

## Example Response

This example shows the information that {section} returns for a sample homeowner's insurance policy. You can download the source document to follow along: <a href="/examples/insurance_policy.pdf" download="insurance_policy.pdf">Insurance Policy PDF</a>

The screenshot below shows the first page of the document.

<img src="https://mintcdn.com/landingaitest/x8SnkIYnL4fLQGOH/images/insurance-policy-1.png?fit=max&auto=format&n=x8SnkIYnL4fLQGOH&q=85&s=28926b7f033f3c2ae482de563c2c1019" alt="First page of a homeowner's insurance policy" className="bordered-image" width="400" data-path="images/insurance-policy-1.png" />

{section} analyzed the full document and returned a hierarchical table of contents. The **Declarations And Policy Overview** section on the first page appears as section `2` (level 1) in the response.

**Insured Property** and **Policy Period And Renewal** are its level 2 subsections, each with their own level 3 sub-subsections.

Each entry's `start_reference` points to the chunk where that section begins in the parsed document.

```json [expandable] theme={null}
{
  "table_of_contents": [
    {
      "title": "Policy Header",
      "level": 1,
      "section_number": "1",
      "start_reference": "1c4b7184-346d-490f-a7bf-bf2442bcbd7c"
    },
    {
      "title": "Declarations And Policy Overview",
      "level": 1,
      "section_number": "2",
      "start_reference": "494d766e-5cf1-48c4-a580-73061b722b90"
    },
    {
      "title": "Insured Property",
      "level": 2,
      "section_number": "2.1",
      "start_reference": "1e6c9100-f461-4bb8-8dcd-8ae0311a97c0"
    },
    {
      "title": "Mortgage And Lienholder",
      "level": 3,
      "section_number": "2.1.1",
      "start_reference": "95e79ad7-72b5-4c9f-9717-8488996c6795"
    },
    {
      "title": "Detached Structures",
      "level": 3,
      "section_number": "2.1.2",
      "start_reference": "4c1e087b-aee9-4494-9789-735388a7579c"
    },
    {
      "title": "Policy Period And Renewal",
      "level": 2,
      "section_number": "2.2",
      "start_reference": "de55b7d5-df5c-480e-8b91-0f9f10f5b059"
    },
    {
      "title": "Cancellation",
      "level": 3,
      "section_number": "2.2.1",
      "start_reference": "7cc48544-b2ec-4e34-b2a1-ae1b3b7d17a6"
    },
    {
      "title": "Annual Premium",
      "level": 3,
      "section_number": "2.2.2",
      "start_reference": "b8c0ba71-d786-4f89-a07f-3fcfc0edd734"
    },
    {
      "title": "Schedule Of Coverages And Limits",
      "level": 1,
      "section_number": "3",
      "start_reference": "3700c26c-dd67-4dda-a712-081becb9ab63"
    },
    {
      "title": "Coverage A Dwelling",
      "level": 2,
      "section_number": "3.1",
      "start_reference": "de789af4-1585-4b3f-9193-4253a9e58f6b"
    },
    {
      "title": "Ordinance Or Law",
      "level": 3,
      "section_number": "3.1.1",
      "start_reference": "c7eaad71-19ca-4ab4-90cb-e8e9581ededc"
    },
    {
      "title": "Named Storm Deductible",
      "level": 3,
      "section_number": "3.1.2",
      "start_reference": "d1300436-0131-49d1-a98a-1f46ece31c23"
    },
    {
      "title": "Coverage C Personal Property",
      "level": 2,
      "section_number": "3.2",
      "start_reference": "80ed234f-1824-4def-b7fb-6883c3fa2b52"
    },
    {
      "title": "Sub Limits",
      "level": 3,
      "section_number": "3.2.1",
      "start_reference": "0c3e0c5a-80ee-49f6-9ca5-52941547d4bd"
    },
    {
      "title": "Business Property",
      "level": 3,
      "section_number": "3.2.2",
      "start_reference": "60aba72b-ca56-4806-97b0-bdf580669943"
    },
    {
      "title": "Exclusions",
      "level": 1,
      "section_number": "4",
      "start_reference": "29529f14-e489-4f2a-bea8-0eef68f431b0"
    },
    {
      "title": "Earth Movement And Flood",
      "level": 2,
      "section_number": "4.1",
      "start_reference": "51c3a6b7-7b78-404e-a1f3-b39be8498294"
    },
    {
      "title": "Ensuing Loss",
      "level": 3,
      "section_number": "4.1.1",
      "start_reference": "908cf899-f5af-40c8-9829-4e09da9083c9"
    },
    {
      "title": "Concurrent Causation",
      "level": 3,
      "section_number": "4.1.2",
      "start_reference": "f48d2861-3d9a-4db6-b2d1-78d22013c3fb"
    },
    {
      "title": "Other Exclusions",
      "level": 2,
      "section_number": "4.2",
      "start_reference": "3336ee6d-9723-4fe1-914f-75109187cc0a"
    },
    {
      "title": "Wear And Tear",
      "level": 3,
      "section_number": "4.2.1",
      "start_reference": "f66ab1c5-d5fe-42ac-bf71-56a3c769a0a6"
    },
    {
      "title": "Vacancy",
      "level": 3,
      "section_number": "4.2.2",
      "start_reference": "75eff73f-3166-45dd-9140-a9182f858e47"
    },
    {
      "title": "Claims And Conditions",
      "level": 1,
      "section_number": "5",
      "start_reference": "35ccfa20-00fb-462e-b375-aaa1b84a1d8f"
    },
    {
      "title": "Duties After A Loss",
      "level": 2,
      "section_number": "5.1",
      "start_reference": "a08d6602-32b0-41e0-ad85-5d951dfc93c0"
    },
    {
      "title": "Notice Deadline",
      "level": 3,
      "section_number": "5.1.1",
      "start_reference": "a68996f1-acd7-403e-bb68-58a7fbe336f0"
    },
    {
      "title": "Emergency Repairs",
      "level": 3,
      "section_number": "5.1.2",
      "start_reference": "edd78fe8-08d6-4f55-a19b-d15a2a05464b"
    },
    {
      "title": "Dispute Resolution",
      "level": 2,
      "section_number": "5.2",
      "start_reference": "bdf63da4-4f34-48f0-82a2-cece1ef666d0"
    },
    {
      "title": "Suit Limitation",
      "level": 3,
      "section_number": "5.2.1",
      "start_reference": "db860fc2-e02e-4efa-8205-553b392b63ca"
    },
    {
      "title": "Loss Payment",
      "level": 3,
      "section_number": "5.2.2",
      "start_reference": "0f7081fd-75c2-4e0f-8355-b4d66a13c20f"
    },
    {
      "title": "Policyholder Acknowledgment",
      "level": 1,
      "section_number": "6",
      "start_reference": "065d0342-0c5b-4fbc-9888-b78ac5e0fefc"
    },
    {
      "title": "Signature Lines",
      "level": 1,
      "section_number": "7",
      "start_reference": "f47e4117-eda0-477d-9a76-482bff511444"
    }
  ],
  "table_of_contents_md": "- [Policy Header](#1c4b7184-346d-490f-a7bf-bf2442bcbd7c)\n- [Declarations And Policy Overview](#494d766e-5cf1-48c4-a580-73061b722b90)\n    - [Insured Property](#1e6c9100-f461-4bb8-8dcd-8ae0311a97c0)\n        - [Mortgage And Lienholder](#95e79ad7-72b5-4c9f-9717-8488996c6795)\n        - [Detached Structures](#4c1e087b-aee9-4494-9789-735388a7579c)\n    - [Policy Period And Renewal](#de55b7d5-df5c-480e-8b91-0f9f10f5b059)\n        - [Cancellation](#7cc48544-b2ec-4e34-b2a1-ae1b3b7d17a6)\n        - [Annual Premium](#b8c0ba71-d786-4f89-a07f-3fcfc0edd734)\n- [Schedule Of Coverages And Limits](#3700c26c-dd67-4dda-a712-081becb9ab63)\n    - [Coverage A Dwelling](#de789af4-1585-4b3f-9193-4253a9e58f6b)\n        - [Ordinance Or Law](#c7eaad71-19ca-4ab4-90cb-e8e9581ededc)\n        - [Named Storm Deductible](#d1300436-0131-49d1-a98a-1f46ece31c23)\n    - [Coverage C Personal Property](#80ed234f-1824-4def-b7fb-6883c3fa2b52)\n        - [Sub Limits](#0c3e0c5a-80ee-49f6-9ca5-52941547d4bd)\n        - [Business Property](#60aba72b-ca56-4806-97b0-bdf580669943)\n- [Exclusions](#29529f14-e489-4f2a-bea8-0eef68f431b0)\n    - [Earth Movement And Flood](#51c3a6b7-7b78-404e-a1f3-b39be8498294)\n        - [Ensuing Loss](#908cf899-f5af-40c8-9829-4e09da9083c9)\n        - [Concurrent Causation](#f48d2861-3d9a-4db6-b2d1-78d22013c3fb)\n    - [Other Exclusions](#3336ee6d-9723-4fe1-914f-75109187cc0a)\n        - [Wear And Tear](#f66ab1c5-d5fe-42ac-bf71-56a3c769a0a6)\n        - [Vacancy](#75eff73f-3166-45dd-9140-a9182f858e47)\n- [Claims And Conditions](#35ccfa20-00fb-462e-b375-aaa1b84a1d8f)\n    - [Duties After A Loss](#a08d6602-32b0-41e0-ad85-5d951dfc93c0)\n        - [Notice Deadline](#a68996f1-acd7-403e-bb68-58a7fbe336f0)\n        - [Emergency Repairs](#edd78fe8-08d6-4f55-a19b-d15a2a05464b)\n    - [Dispute Resolution](#bdf63da4-4f34-48f0-82a2-cece1ef666d0)\n        - [Suit Limitation](#db860fc2-e02e-4efa-8205-553b392b63ca)\n        - [Loss Payment](#0f7081fd-75c2-4e0f-8355-b4d66a13c20f)\n- [Policyholder Acknowledgment](#065d0342-0c5b-4fbc-9888-b78ac5e0fefc)\n- [Signature Lines](#f47e4117-eda0-477d-9a76-482bff511444)\n",
  "metadata": {
    "filename": "insurance_policy-md.md",
    "org_id": "org_123",
    "duration_ms": 15435,
    "credit_usage": 6.0588,
    "job_id": "17aa1381fe97495f8b9be76baba9932c",
    "version": "section-20260406"
  }
}
```

## Response Structure

The response contains the following top-level fields:

| Field                                                                      | Description                                                                                   |
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [`table_of_contents`](#table-of-contents-table_of_contents)                | A flat, reading-order array of section entries with hierarchy levels and chunk references.    |
| [`table_of_contents_md`](#markdown-table-of-contents-table_of_contents_md) | A Markdown-formatted version of the same TOC with anchor links.                               |
| [`metadata`](#processing-metadata-metadata)                                | Processing information including credit usage, duration, filename, job ID, and model version. |

## Table of Contents (`table_of_contents`)

The `table_of_contents` field contains a flat array of all sections and subsections in the order they appear in the document. The flat list structure is optimized for retrieval use cases. You can iterate the list directly without recursion.

Each entry includes:

| Field             | Description                                                                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`           | The generated text for the section heading.                                                                                                                                           |
| `level`           | The hierarchy depth. Top-level sections are `1`, subsections are `2`, sub-subsections are `3`, and so on.                                                                             |
| `section_number`  | The hierarchical number for this section (for example, `"1"`, `"1.2"`, `"1.2.3"`). Use this field to reconstruct parent-child relationships: entry `"2.1"` is a child of entry `"2"`. |
| `start_reference` | The ID of the chunk where this section begins. This corresponds to a `chunks[].id` value from the [{parse} API](https://docs.landing.ai/api-reference/tools/ade-parse) response.      |

## Markdown Table of Contents (`table_of_contents_md`)

The `table_of_contents_md` field provides a ready-to-use Markdown-formatted TOC. Each entry is an anchor link pointing to the corresponding [reference anchor](./ade-markdown-response#anchor-tags) in the document Markdown. Indentation represents the hierarchy level.

You can prepend this string to the document's full Markdown to enable in-document navigation:

```text theme={null}
- [Introduction](#uuid_a1)
- [Methods](#uuid_b2)
    - [Data Collection](#uuid_c3)
        - [Survey Design](#uuid_d4)
```

## Processing Metadata (`metadata`)

The `metadata` field provides information about the sectioning process:

| Field          | Description                                                                                                    |
| -------------- | -------------------------------------------------------------------------------------------------------------- |
| `filename`     | The name of the input Markdown file.                                                                           |
| `org_id`       | Organization identifier.                                                                                       |
| `duration_ms`  | Processing time in milliseconds.                                                                               |
| `credit_usage` | Number of credits consumed.                                                                                    |
| `job_id`       | Unique job identifier.                                                                                         |
| `version`      | Model version used for sectioning. For more information, go to [Section Model Versions](./ade-section-models). |
