---
title: "Extract Headers"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/markdown/extractheaders
markdown: https://docs.nodetool.ai/nodes/lib/markdown/extractheaders.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/markdown/extractheaders.md
---

# Extract Headers

**Type:** `lib.markdown.ExtractHeaders`

**Namespace:** `lib.markdown`

## Description

Extracts headers and creates a document structure/outline.
    markdown, headers, structure

    Use cases:
    - Generate table of contents
    - Analyze document structure
    - Extract main topics from documents

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| markdown | `str` | The markdown text to analyze | `` |
| max_level | `int` | Maximum header level to extract (1-6) | `6` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `list[dict[str, any]]` |  |

## Related Nodes

Browse other nodes in the [lib.markdown](./) namespace.
