Markdown Toc API
https://api.findutils.com/api/tools/markdown-toc/execute Build a nested Markdown table of contents from a document's headings, with GitHub-style anchor links by default (or GitLab anchors, or plain labels), and return both the TOC and the document with the TOC inserted. Reads ATX (#) and Setext (=== / ---) headings; skips headings inside fenced and indented code blocks, HTML comments and front matter. Repeated headings get the anchors the host gives them (#setup, #setup-1). The TOC replaces a [TOC] line or fills <!-- toc --> ... <!-- tocstop -->; with no marker it goes after a leading H1, else at the top. A one-shot insert: nothing watches the file.
Needs an API key. Running a tool needs an API key. Keys are not for sale yet: ask for early access. About API keys
Request body
application/json-
markdown
string required
The Markdown document.
-
slug_style
string optional
Anchor rules: github (default), gitlab, or plain (labels without links). One of
github · gitlab · plain. Default"github". -
min_level
integer optional
Shallowest heading level listed, 1 to 6. Default 2, which leaves out a lone title H1. Default
2. -
max_level
integer optional
Deepest heading level listed, 1 to 6. Default 4. Default
4. -
bullet
string optional
List marker: - (default), *, or 1. for a numbered list. One of
- · * · 1.. Default"-". -
indent
integer optional
Spaces per nesting level: 2 (default) or 4. A numbered list uses at least 3, which Markdown needs to nest under "1. ". One of
2 · 4. Default2. -
ignore_code_blocks
boolean optional
Skip # lines inside fenced and indented code blocks. Default true. Default
true. -
add_heading
boolean optional
Put a "## Table of Contents" heading above the list. Default false. Default
false.
Example arguments
Verified{
"markdown": "# Project\n\n## Install\n\n## Usage\n\n### Options\n\n## Setup\n\n## Setup\n"
} More Text tools
- Bookmarks Diff Compare two Netscape bookmarks.html exports (before and after) and list the links that were added, removed, or changed.
- Bookmarks Html To Markdown Convert a browser bookmarks.html export (the Netscape bookmark format Chrome, Firefox, Edge and Safari write) into Markdown for Notion…
- Case Convert Convert a string between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE, dot.case, Title Case, Sentence case, lower, UPPER.
- Citation Generator Generate a reference-list citation in APA 7, MLA 9, Chicago, or Harvard style for a book, website, journal, or article.
- Code Diff Checker Returns a line-by-line diff of two code snippets: each line marked added, removed or unchanged with its original and modified line numbers…
- Code Highlight Html Returns syntax-highlighted HTML for a code snippet: HTML-escaped text wrapped in <span style="color: ..."> elements using one of six colour…