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

# Section

export const section = 'ADE Section';

export const split = 'ADE Split';

export const adeTypeScriptLibrary = 'ade-typescript';

export const adePythonLibrary = 'ade-python';

export const companyName = 'LandingAI';

export const extract = 'ADE Extract';

export const parse = 'ADE Parse';

export const ade = 'Agentic Document Extraction';

Use the [{section} API](https://docs.landing.ai/api-reference/tools/ade-section) to generate a hierarchical table of contents (TOC) from a parsed document.

{section} analyzes the semantic structure of your document and returns a flat, reading-order list of sections and subsections, each with a title, hierarchy level, section number, and a reference to the starting chunk in the parsed document.

<Info>{section} is in Preview. This feature is still in development and may not return accurate results. Do not use this feature in production environments.</Info>

## Example Use Cases

Use {section} in workflows that need to navigate, scope, or retrieve content by section:

* **Extraction pipelines**: Scope extraction queries to specific sections of a document (for example, "extract all tables in the Claims section").
* **RAG and search**: Use section-aware chunking instead of sliding-window chunking for more relevant retrieval results.
* **Document review**: Generate a navigable TOC for long documents such as insurance policies, contracts, reports, and technical manuals.
* **Cross-document analysis**: Process large document batches and compare structure across a corpus.
* **LLM applications**: Provide context windows organized by section rather than arbitrary token splits.

## How It Works

{section} accepts the Markdown output from {parse} (which contains [reference anchors](./ade-markdown-response#anchor-tags)) and returns a structured table of contents.

{section} automatically infers the document's hierarchy. You can also pass an optional `guidelines` parameter to control how sections are grouped.

The response includes two formats for the same TOC:

* **`table_of_contents`**: A structured JSON array for programmatic use
* **`table_of_contents_md`**: A Markdown-formatted TOC you can prepend to the document for navigation

<Info>
  The TOCs that {section} generates are in English, regardless of the source document language.
</Info>

## Run Parse First

The {section} API requires the Markdown output from the [{parse} API](https://docs.landing.ai/api-reference/tools/ade-parse) as input. The Markdown must contain [reference anchors](./ade-markdown-response#anchor-tags) (`<a id="..."></a>`) that {section} uses to map sections back to specific chunks in the original document.

## Section with the API

Section a document by calling the [{section}](https://docs.landing.ai/api-reference/tools/ade-section) endpoint.

```shell theme={null}
curl -X POST 'https://api.va.landing.ai/v1/ade/section' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'markdown=@parsed_output.md' \
  -F 'model=section-latest'
```

### Parameters

Get the full parameters from the [API reference](https://docs.landing.ai/api-reference/tools/ade-section).

| Parameter      | Required                           | Description                                                                                                                                                                                                                                                                                                                                       |
| :------------- | :--------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `markdown`     | Required if `markdown_url` omitted | The Markdown output from the [{parse} API](https://docs.landing.ai/api-reference/tools/ade-parse). Accepts a file upload or a raw string.                                                                                                                                                                                                         |
| `markdown_url` | Required if `markdown` omitted     | A URL pointing to a Markdown file to fetch and section.                                                                                                                                                                                                                                                                                           |
| `guidelines`   | Optional                           | Natural-language instructions that control how the hierarchy is built. When omitted, the API infers structure automatically. Examples: <br /><br />• `"Treat each numbered article as a top-level section"`<br />• `"Create a flat structure, no more than 2 levels deep"`<br />• `"Separate the introduction and appendices from the main body"` |
| `model`        | Optional                           | The section model version to use. If omitted, the API uses the latest model. For more information, see [Section Model Versions](./ade-section-models).                                                                                                                                                                                            |

For detailed information about the API response, go to [JSON Response for Sectioning](./ade-section-response).

<Info>For information about pricing and credits, go to [Pricing & Billing](./ade-pricing).</Info>

## Use Section with Our Libraries

Click one of the tiles below to learn how to use the [{section}](https://docs.landing.ai/api-reference/tools/ade-section) API with our libraries.

<CardGroup cols={2}>
  <Card title="Python Library" icon="python" href="./ade-python#section-getting-started">
    Use {section} with our Python library.
  </Card>

  <Card
    title="TypeScript Library"
    icon={
  <>
    <img className="block dark:hidden" src="/images/ts-logo-512-03221Dxcf.png" alt="TypeScript" style={{ width: "1.5rem", height: "1.5rem", margin: 0 }} />
    <img className="hidden dark:block" src="/images/ts-logo-512-DBFF9B.png" alt="TypeScript" style={{ width: "1.5rem", height: "1.5rem", margin: 0 }} />
  </>
}
    href="./ade-typescript#section-getting-started"
  >
    Use {section} with our TypeScript library.
  </Card>
</CardGroup>

## Share Your Feedback

{section} is in public preview and we are actively looking for feedback to improve it. To share your experience, [schedule a feedback session with us](https://landing-ai.zoom.us/zbook/landingai-fatimasalehbhai/landingai-ade-feedback).

Come prepared to discuss:

* What is working well
* Any challenges you've encountered and how the feature could improve
* The email address for your {ade} account, found in your [profile page](https://va.landing.ai/settings/personal/profile)
* The documents you used
* The code you used
