{"uid":"cap_1fu36nLij2ZNL15UjcTR2","slug":"well-004-html-to-markdown-bfe3bf3d","name":"well-004-html-to-markdown","description":"Convert HTML to tidy markdown ($0.005 USDC via x402). Pass html (string) and/or url (public https to fetch). At least one required; if both, prefers html and warns. URL fetches use the same allowlist as WELL-002 (https only — http/file/data/localhost/private IPs rejected; 1 MB body, ~10s timeout, max 5 redirects). Returns JSON { source, url?, final_url?, content_type?, markdown, warnings }. Provided as is, with no warranty or guarantee of accuracy or fitness. Nothing is stored.","url":"https://well-004-html-to-markdown.rainmaker-wells.workers.dev/api/html-to-markdown?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"https URL to fetch HTML from and convert. http/file/data/localhost/private IPs rejected."},"html":{"type":"string","description":"HTML string to convert to markdown. Preferred when both html and url are set."}}},"responseSchema":{"type":"object","additionalProperties":true},"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_26y0opLnx5uK69PVUtX34","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":"Converts HTML content (provided directly or fetched from a public URL) into clean, tidy Markdown text","exampleAgentPrompt":"Can you fetch https://en.wikipedia.org/wiki/Markdown and convert that page's HTML into clean markdown for me?","exampleUseCases":[{"title":"Webpage to Markdown for LLM ingestion","prompt":"Grab the HTML from https://docs.python.org/3/library/json.html and convert it to markdown so I can feed it into a prompt."},{"title":"Raw HTML string cleanup","prompt":"I have this blob of HTML from a CMS export — can you convert it to tidy markdown? Here's the HTML: <h1>Hello World</h1><p>This is a <strong>test</strong> paragraph.</p>"},{"title":"Article archiving in readable format","prompt":"Fetch the article at https://www.example.com/blog/my-article and convert it to markdown so I can save a clean readable copy."}],"resultDescription":"A JSON object containing: 'source' (whether input was 'html' or 'url'), optionally 'url' and 'final_url' (if a URL was fetched, including after redirects), 'content_type' (MIME type of fetched content), 'markdown' (the converted Markdown string), and 'warnings' (any advisory messages, e.g. if both html and url were provided).","failureModes":["Non-HTTPS URLs (http, file, data, localhost, private IPs) are rejected outright","Fetched page body exceeds 1 MB limit — request fails","URL fetch times out after ~10 seconds","More than 5 redirects encountered during URL fetch","Neither html nor url provided — request fails with error","Malformed or unparseable HTML may yield incomplete or garbled markdown","Both html and url provided — html is used and a warning is returned"],"whenToPreferThis":"Use this endpoint when you need a quick, paid-per-call HTML-to-Markdown conversion without managing your own parser or headless browser. It is ideal when you want to both fetch a public HTTPS page and convert it in a single step, or when you already have an HTML string and need clean markdown output. Prefer this over generic scraping endpoints when your goal is specifically a structured markdown document, not raw HTML extraction or structured data parsing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T08:22:28.724Z","isFirstParty":false,"canonicalSlug":"well-004-html-to-markdown-bfe3bf3d"}