{"uid":"cap_fjExciswE0z64u3T-T4mA","slug":"api-x402node-dev-2f957d71","name":"Markdown Table of Contents Extractor","description":"Extract Markdown table of contents (h1-h6 headings) with anchor slugs. Returns array of {level, text, anchor}. Use url param or ?text=markdown_here. Built for AI agents indexing docs, generating navigation, building doc search.","url":"https://api.x402node.dev/md/toc","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"properties":{"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XDR4_tLcbmKUawRDtrxlP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts a structured table of contents from Markdown content by parsing h1-h6 headings and generating anchor slugs for each.","exampleAgentPrompt":"Can you extract the table of contents from this README — pull all the headings with their anchor slugs so I can build a navigation sidebar? Here's the URL: https://raw.githubusercontent.com/some-org/some-repo/main/README.md","exampleUseCases":null,"resultDescription":"Returns an array of objects each containing: level (1-6 integer indicating heading depth), text (the heading text), and anchor (the URL-safe slug for linking). Covers all h1 through h6 headings found in the document in order.","failureModes":["Invalid or unreachable URL returns an error or empty result","Malformed markdown with no headings returns an empty array","Very large markdown documents may time out","URL pointing to non-markdown content may produce unexpected or empty results","Missing both url and text parameters results in a bad request error"],"whenToPreferThis":"Choose this endpoint when you need to programmatically extract structured heading hierarchy and anchor slugs from Markdown documents — particularly for building doc navigation, search indexes, or site maps. Ideal for AI agents processing GitHub READMEs, documentation sites, or any raw Markdown source without running a full markdown parser locally.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T06:54:31.291Z","isFirstParty":false}