Skip to main content
Use the API to generate a hierarchical table of contents (TOC) from a parsed document. 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.
is in Preview. This feature is still in development and may not return accurate results. Do not use this feature in production environments.

Example Use Cases

Use 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

accepts the Markdown output from (which contains reference anchors) and returns a structured table of contents. 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
The TOCs that generates are in English, regardless of the source document language.

Run Parse First

The API requires the Markdown output from the API as input. The Markdown must contain reference anchors (<a id="..."></a>) that uses to map sections back to specific chunks in the original document.

Section with the API

Section a document by calling the endpoint.
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.
ParameterRequiredDescription
markdownRequired if markdown_url omittedThe Markdown output from the API. Accepts a file upload or a raw string.
markdown_urlRequired if markdown omittedA URL pointing to a Markdown file to fetch and section.
guidelinesOptionalNatural-language instructions that control how the hierarchy is built. When omitted, the API infers structure automatically. Examples:

"Treat each numbered article as a top-level section"
"Create a flat structure, no more than 2 levels deep"
"Separate the introduction and appendices from the main body"
modelOptionalThe section model version to use. If omitted, the API uses the latest model. For more information, see Section Model Versions.
For detailed information about the API response, go to JSON Response for Sectioning.
For information about pricing and credits, go to Pricing & Billing.

Use Section with Our Libraries

Click one of the tiles below to learn how to use the API with our libraries.

Python Library

Use with our Python library.
https://mintcdn.com/landingaitest/9admv5znHgUFfVyj/images/ts-logo-512-green.svg?fit=max&auto=format&n=9admv5znHgUFfVyj&q=85&s=37d2005241bb43dec1aa8716782a7508

TypeScript Library

Use with our TypeScript library.

Share Your Feedback

is in public preview and we are actively looking for feedback to improve it. To share your experience, schedule a feedback session with us. Come prepared to discuss:
  • What is working well
  • Any challenges you’ve encountered and how the feature could improve
  • The email address for your account, found in your profile page
  • The documents you used
  • The code you used