{"uid":"cap_NHnBEX8JvZazOnmeZV6HR","slug":"markdown-table-of-contents-extractor-445c4feb","name":"Markdown Table of Contents Extractor","description":"Extract the heading outline from Markdown — depth, text and a unique GitHub-style anchor slug for each heading. Optionally limit to a maximum heading depth.","url":"https://markdown.openverbs.com/v1/toc","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["markdown"],"properties":{"markdown":{"type":"string","maxLength":500000,"description":"Markdown source."},"maxDepth":{"type":"integer","maximum":6,"minimum":1,"description":"Deepest heading level to include. Default 6."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cqbYKpFu8rVjH5kWrzvqc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts a heading outline from Markdown source, returning each heading's depth, text, and a GitHub-style anchor slug, with optional maximum depth filtering.","exampleAgentPrompt":"Can you pull the full heading outline from this markdown file, including depth and anchor slugs for each heading, up to H3 level only?","exampleUseCases":[{"title":"Auto-generate docs site navigation","prompt":"I have a long markdown README — can you extract all the headings up to depth 3 with their anchor slugs so I can build a sidebar navigation menu?"},{"title":"Validate section coverage in a spec","prompt":"Here's a technical specification in markdown — pull out every heading and its depth so I can check that all the required sections are present."},{"title":"Deep-link to specific markdown sections","prompt":"I need the GitHub-style anchor slugs for all headings in this markdown document so I can create deep links to each section in our wiki."}],"resultDescription":"An ordered list of heading objects, each containing the heading level (depth 1–6), the heading text, and a unique GitHub-style anchor slug derived from the text. Optionally limited to headings up to the specified maxDepth.","failureModes":["Missing required 'markdown' field returns a validation error","Markdown content exceeding 500,000 characters is rejected","Invalid maxDepth value outside 1–6 range returns a validation error","Malformed JSON body returns a parse error","Empty markdown string returns an empty heading list"],"whenToPreferThis":"Choose this endpoint when you need structured heading metadata — depth, text, and anchor slugs — from Markdown content, especially when building navigation, generating links to sections, or auditing document structure. Prefer over generic Markdown renderers when you only need the heading outline without full HTML output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:24.221Z","isFirstParty":false}