{"uid":"cap_Z5Wa5ej9G8VCxC6I4uMIF","slug":"x402-deployer-x402-deployer-workers-dev-64e3b54f","name":"HTML to Markdown Converter","description":"Convert HTML to Markdown. Strips nav, scripts, ads, and other boilerplate. Preserves headings, lists, tables, code blocks, links, and images. Accepts raw HTML or a URL. Returns clean Markdown ideal for LLM context windows or RAG ingestion.","url":"https://x402-deployer.x402-deployer.workers.dev/convert-html-to-markdown","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":{"properties":{"url":{"type":"string","description":"Page URL to fetch and convert. Server follows redirects. Mutually exclusive with 'html'."},"html":{"type":"string","description":"Raw HTML to convert. Mutually exclusive with 'url' — supply one."},"user_agent":{"type":"string","description":"Optional User-Agent header sent when fetching 'url'. Default is a generic browser UA."},"include_links":{"type":"boolean","description":"Keep hyperlinks as Markdown [text](href). Default true. Set false for prose-only output."},"include_images":{"type":"boolean","description":"Keep images as Markdown ![alt](src). Default true."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"title":{"type":"string"},"markdown":{"type":"string"},"html_chars":{"type":"integer"},"source_url":{"type":"string"},"markdown_chars":{"type":"integer"}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"html":"<html><head><title>Test Page</title><script>console.log('ad');</script></head><body><nav>Navigation</nav><h1>Main Content</h1><p>This is a test paragraph with a <a href=\"https://example.com\">link</a>.</p><img src=\"test.jpg\" alt=\"test image\"><footer>Footer</footer></body></html>","include_links":true,"include_images":true},"type":"http","method":"POST","bodyType":"json"}},"response":{"title":null,"markdown":"# Main Content\n\nThis is a test paragraph with a [link](https://example.com).\n\n![test image](test.jpg)","html_chars":278,"source_url":null,"markdown_chars":101}},"exampleRequest":{"html":"<html><head><title>Test Page</title><script>console.log('ad');</script></head><body><nav>Navigation</nav><h1>Main Content</h1><p>This is a test paragraph with a <a href=\"https://example.com\">link</a>.</p><img src=\"test.jpg\" alt=\"test image\"><footer>Footer</footer></body></html>","include_links":true,"include_images":true},"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_WgF45EJvayGpTovdpCUUs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts raw HTML or a webpage URL into clean Markdown, stripping boilerplate like navigation, scripts, and ads while preserving semantic content.","exampleAgentPrompt":"Convert this HTML page at https://en.wikipedia.org/wiki/Large_language_model into clean Markdown — strip out the nav, ads, and scripts, but keep all the headings, tables, code blocks, and links so I can feed it into my RAG pipeline.","exampleUseCases":null,"resultDescription":"Returns clean Markdown text derived from the input HTML or URL, with boilerplate (navigation bars, scripts, ads, footers) removed and semantic content (headings, lists, tables, code blocks, links, images) preserved and properly formatted.","failureModes":["Invalid or unreachable URL returns an error indicating the page could not be fetched","Malformed HTML may result in incomplete or garbled Markdown output","Very large HTML documents may time out or be truncated","Pages behind authentication or paywalls will fail to fetch","Rate limiting or payment issues result in HTTP 402 payment required errors"],"whenToPreferThis":"Use this endpoint when you need to feed web content into an LLM or vector database and want clean, boilerplate-free Markdown. Ideal for RAG pipelines, LLM context preparation, or any workflow where raw HTML noise would degrade downstream NLP quality. Prefer this over generic scrapers when semantic structure (headings, tables, code blocks) must be preserved in Markdown form.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:44:59.467Z","isFirstParty":false}