{"uid":"cap_8Sv66sX5Uv82qOY6vmQEV","slug":"tradepilotusa-markdown-heading-outline-extractor-f0aeadd7","name":"TradepilotUSA Markdown Heading Outline Extractor","description":"Extract ATX headings with levels and source line numbers from Markdown, excluding fenced code blocks. Leaves inline Markdown in titles unchanged. Setext and container-nested headings are outside the supported subset.","url":"https://www.tradepilotusa.com/api/agent-commerce/v1/services/markdown_heading_outline/execute?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"markdown":{"type":"string","maxLength":48000}}},"responseSchema":{"type":"json","example":{"result":{"syntax":"ATX headings outside fenced code; inline Markdown preserved; Setext headings excluded","headings":[{"line":1,"level":1,"title":"Overview"},{"line":3,"level":2,"title":"Delivery"}],"heading_count":2},"utility":"markdown_heading_outline","provenance":{"execution":"deterministic_local","model_used":false,"network_request_performed":false},"request_id":"example_markdown_heading_outline"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-FivRe64mmCH88f6oOffZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a Markdown document and returns a structured outline of all ATX headings (H1–H6) with their line numbers and levels.","exampleAgentPrompt":"Can you extract all the headings from this markdown document and give me a structured outline showing each heading's level and line number? Here's the markdown: '# Introduction\\n\\nSome text.\\n\\n## Background\\n\\nMore text.'","exampleUseCases":[{"title":"Auto-generate document table of contents","prompt":"I have a long markdown README file — can you pull out all the headings and their levels so I can build a table of contents from it? Here's the full markdown text."},{"title":"Validate section structure of a doc","prompt":"Can you extract all the headings from this markdown spec I wrote and tell me how many there are and what levels they are, so I can check whether the structure looks right?"},{"title":"Index headings for search navigation","prompt":"I need to index all the section headers in this markdown wiki page — can you give me each heading's title, level, and line number so I can build a jump-to-section nav?"}],"resultDescription":"Returns a JSON object containing: a 'headings' array where each item has 'line' (line number), 'level' (1–6), and 'title' (heading text); a 'heading_count' integer; a 'syntax' description clarifying that only ATX-style headings outside fenced code blocks are extracted; a 'utility' identifier; and a 'provenance' block confirming deterministic local execution with no model or network calls used.","failureModes":["Markdown input exceeds 48,000 character limit — request rejected","Empty markdown string returns an empty headings array with heading_count 0","Setext-style headings (underline syntax) are intentionally excluded and will not appear in results","Headings inside fenced code blocks are excluded by design","Malformed JSON body returns a 400-level error"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, zero-hallucination extraction of ATX heading structure from Markdown — no LLM involved, so results are perfectly consistent. Ideal when you need line numbers for navigation, want to validate document structure programmatically, or need to build a table of contents without any AI variance. Prefer over LLM-based parsing when accuracy and reproducibility are critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:48:25.553Z","isFirstParty":false,"canonicalSlug":"tradepilotusa-markdown-heading-outline-extractor-f0aeadd7"}