{"uid":"cap_9-M1sY7CgyAi97gshEtdO","slug":"x402-deployer-x402-deployer-workers-dev-2ad899e9","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 — when given a URL the server fetches the page and runs the converter on the body. Returns clean Markdown plus title and char counts. Ideal for LLM context windows, RAG ingestion, and content archival.","url":"https://x402-deployer.x402-deployer.workers.dev/html-to-markdown","method":"POST","headers":{},"bodySchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"properties":{"html":{"type":"string","description":"Raw HTML to convert. Mutually exclusive with 'url' — supply one."},"url":{"type":"string","description":"Page URL to fetch and convert. Server follows redirects. Mutually exclusive with 'html'."},"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."},"user_agent":{"type":"string","description":"Optional User-Agent header sent when fetching 'url'. Default is a generic browser UA."}}}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"source_url":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"},"markdown_chars":{"type":"integer"},"html_chars":{"type":"integer"}}}},"required":["type"]}},"required":["input"]},"responseSchema":null,"example":{"request":{"input":{"body":{"html":"<html><head><title>Test Article</title></head><body><h1>Sample Article</h1><p>This is a test paragraph with some <strong>bold text</strong> and a <a href=\"https://example.com\">link to example</a>.</p><p>Here is another paragraph with an image: <img src=\"https://example.com/image.jpg\" alt=\"test image\"></p></body></html>","include_links":true,"include_images":true},"type":"http","method":"POST","bodyType":"json"}},"response":{"title":null,"markdown":"# Sample Article\n\nThis is a test paragraph with some **bold text** and a [link to example](https://example.com).\n\nHere is another paragraph with an image: ![test image](https://example.com/image.jpg)","html_chars":320,"source_url":null,"markdown_chars":199}},"exampleRequest":{"html":"<html><head><title>Test Article</title></head><body><h1>Sample Article</h1><p>This is a test paragraph with some <strong>bold text</strong> and a <a href=\"https://example.com\">link to example</a>.</p><p>Here is another paragraph with an image: <img src=\"https://example.com/image.jpg\" alt=\"test image\"></p></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_3M8VREq2UXlVOm_99Cr8B","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 fetched web page URL into clean Markdown, stripping boilerplate and preserving structure.","exampleAgentPrompt":"Fetch the article at https://example.com/blog/post-1 and convert it to clean Markdown — strip out nav, ads, and scripts so I can feed it into my LLM context window.","exampleUseCases":null,"resultDescription":"Returns clean Markdown of the page or HTML content, along with the extracted page title and character counts for the raw and converted content.","failureModes":["URL unreachable or returns non-200 status — fetch error returned","Malformed HTML causes parser to produce minimal or empty Markdown","Page is JavaScript-rendered and server-side fetch returns empty body","Input is neither valid HTML nor a reachable URL — validation error","Very large HTML documents may exceed processing limits"],"whenToPreferThis":"Use this endpoint when you need to convert a URL or raw HTML into clean, structured Markdown suitable for LLM context windows, RAG pipelines, or content archival — especially when you want boilerplate like nav, scripts, and ads automatically stripped while preserving headings, lists, tables, code blocks, links, and images.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:50:25.498Z","isFirstParty":false}