{"uid":"cap_EL0uh8uSPw-uzfHcitRb0","slug":"x402-convert-html-to-markdown-4c249fbd","name":"x402-convert HTML to Markdown","description":"Deterministic data-conversion API for AI agents. Pay-per-call in USDC on Base via x402 v2.","url":"https://x402-convert.arikanuk.workers.dev/html-to-md?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string","description":"Raw HTML to convert"}}},"responseSchema":{"type":"json","example":{"markdown":"# Hello\n\nWorld"}},"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_raVYvkuBbnK5UBnW9Bkw0","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":"Converts raw HTML content into clean Markdown text, paid per-call in USDC on Base via x402.","exampleAgentPrompt":"Take this raw HTML and convert it to clean markdown for me: '<h1>Hello</h1><p>This is a <strong>test</strong> paragraph.</p>'","exampleUseCases":[{"title":"Clean scraped webpage for LLM context","prompt":"I just scraped this HTML from a product page — can you convert it to markdown so I can feed it cleanly into my LLM prompt? Here's the HTML: '<div><h2>Product Name</h2><p>Description here.</p></div>'"},{"title":"Convert email HTML to readable notes","prompt":"I have this HTML email body and I want it as plain markdown so I can store it in my notes. Here's the HTML: '<html><body><h1>Meeting Recap</h1><ul><li>Item 1</li><li>Item 2</li></ul></body></html>'"},{"title":"Normalize CMS content for processing","prompt":"Our CMS exports articles in HTML — can you convert this article HTML to markdown so we can version-control it in our repo? HTML: '<article><h1>Title</h1><p>Body text here with a <a href=\"#\">link</a>.</p></article>'"}],"resultDescription":"A JSON object with a 'markdown' field containing the converted Markdown string, e.g. {\"markdown\": \"# Hello\\n\\nWorld\"}. The output is deterministic for the same HTML input.","failureModes":["Missing or empty 'html' field in request body — likely returns a 4xx error","Malformed HTML may produce incomplete or garbled markdown output","Payment failure via x402 protocol results in 402 Payment Required before conversion occurs","Very large HTML payloads may time out on the Cloudflare Worker runtime"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call HTML-to-Markdown conversion without managing your own parser or library. It is ideal for AI agent pipelines that sporadically need to normalize HTML content (scraped pages, CMS exports, email bodies) into LLM-friendly markdown, and where a micro-payment model ($0.01 USDC) is preferred over a subscription. It is deterministic and stateless, making it safe to use in automated workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:36:56.880Z","isFirstParty":false,"canonicalSlug":"x402-convert-html-to-markdown-4c249fbd"}