{"uid":"cap_v90axv__jIjlfaC6P_a-E","slug":"24k-labs-html-to-markdown-converter-e2753794","name":"24K Labs HTML to Markdown Converter","description":"Convert a supplied HTML string to clean Markdown: strips scripts/style/nav, preserves headings, bold, italic, links, lists, code, and blockquotes. No fetch.","url":"https://api.24klabs.ai/api/html-to-markdown","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string"}}},"responseSchema":{"type":"json","example":{"markdown":"# Title\n\nHello **world** and [link](http://x.io).\n\n- one\n- two"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z5ESQlZxwMf8j6TmrJ63d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a supplied HTML string to clean Markdown by stripping noise (scripts, styles, nav) and preserving semantic structure like headings, bold, italic, links, lists, code, and blockquotes.","exampleAgentPrompt":"Take this HTML string I have and convert it to clean Markdown — strip out any scripts, styles, and navigation elements but keep the headings, links, lists, and code blocks intact: `<h1>Hello</h1><p>World <a href='https://example.com'>link</a></p>`","exampleUseCases":[{"title":"Prepare web content for LLM context","prompt":"I scraped the HTML of this news article and need it as clean Markdown so I can feed it into an LLM — here's the raw HTML, please convert it and strip all the nav menus and ads: `<html><body><nav>...</nav><article><h1>Breaking News</h1><p>Details here...</p></article></body></html>`"},{"title":"Convert HTML email to readable markdown","prompt":"I have the raw HTML of a newsletter email and want it converted to clean Markdown so I can read it in my notes app — here's the HTML, please strip the scripts and style blocks and preserve the headings and links."},{"title":"Normalize scraped HTML for storage","prompt":"I'm building a pipeline that scrapes product description pages and stores them as Markdown in a database — can you convert this HTML product description to Markdown, keeping bold text, bullet lists, and any links but removing all the JavaScript and CSS junk?"}],"resultDescription":"Returns the converted Markdown string with semantic formatting preserved (headings, bold, italic, links, lists, code blocks, blockquotes) and noise removed (scripts, styles, navigation elements). No HTTP fetching is performed — only the supplied HTML string is processed.","failureModes":["Empty or missing HTML input body returns an error","Malformed or non-HTML input may produce garbled or empty markdown","Extremely large HTML payloads may time out or be rejected","HTML with only scripts/styles and no semantic content may return an empty string"],"whenToPreferThis":"Use this endpoint when you already have an HTML string in memory and need a server-side, deterministic conversion to Markdown without fetching any URLs. Prefer it over browser-based or local parsing when you want consistent noise-stripping (scripts, styles, nav) applied automatically. It is especially useful for LLM context preparation, note-taking pipelines, and Markdown-first storage workflows where clean formatting fidelity matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:53:56.027Z","isFirstParty":false}