Skip to main content
When you section a document with the API, the results are returned in a structured JSON format.

Example Response

This example shows the information that returns for a sample homeowner’s insurance policy. You can download the source document to follow along: Insurance Policy PDF The screenshot below shows the first page of the document. First page of a homeowner's insurance policy 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.

Response Structure

The response contains the following top-level fields:

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:

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 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:

Processing Metadata (metadata)

The metadata field provides information about the sectioning process: