{"uid":"cap_q7GHmm7EiZ4a_I8SNec9I","slug":"2s-io-html-to-markdown-converter-017480d1","name":"2s.io HTML-to-Markdown Converter","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/html/to-markdown","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string","description":"Raw HTML to convert (≤2MB)."}}},"responseSchema":null,"example":{"request":{"html":"<html><head><title>Test Page</title></head><body><h1>Hello World</h1><p>This is a simple test paragraph with <strong>bold text</strong> and <em>italic text</em>.</p><ul><li>Item 1</li><li>Item 2</li></ul></body></html>"},"response":{"data":{"ok":true,"items":[{"text":"Hello World\n\nThis is a simple test paragraph with bold text and italic text.\nItem 1\nItem 2","title":"Test Page","markdown":"# Hello World\n\nThis is a simple test paragraph with **bold text** and *italic text*.\n\n- Item 1\n- Item 2","wordCount":18}],"total":1,"source":{"url":"https://2s.io","license":"No upstream license — computed by 2s.io","provider":"2s.io HTML-to-markdown converter"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"html.to-markdown","settlement":{"txHash":"0x1802fb45e88aa38a90b304be98897d041721de220f0d0b72732c16eff53ec56b","network":"eip155:8453","success":true}}}},"exampleRequest":{"html":"<html><head><title>Test Page</title></head><body><h1>Hello World</h1><p>This is a simple test paragraph with <strong>bold text</strong> and <em>italic text</em>.</p><ul><li>Item 1</li><li>Item 2</li></ul></body></html>"},"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oimJg4BB2wg8E6Lj1uUeT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts raw HTML into clean Markdown text, returning the markdown, plain text, title, and word count.","exampleAgentPrompt":"Can you convert this HTML into markdown for me? Here's the raw HTML: '<h1>Hello</h1><p>A <a href=\"https://x.com\">link</a>.</p>'","exampleUseCases":null,"resultDescription":"Returns a JSON object with ok=true and an items array. Each item contains: 'markdown' (the converted markdown string), 'text' (plain text version), 'title' (extracted page title), and 'wordCount' (number of words). Also includes a 'total' count and 'source' metadata indicating the provider and license.","failureModes":["HTML exceeds 2MB size limit — likely returns an error or truncated result","Malformed or unparseable HTML — may return empty or partial markdown","Payment not sent or insufficient USDC — 402 Payment Required response","Network timeout for very large documents"],"whenToPreferThis":"Use this endpoint when you need to convert raw HTML strings to Markdown programmatically without signup or API keys, paying only per call. Ideal for agents that occasionally need HTML-to-Markdown conversion without committing to a subscription service, or when integrating into a crypto-native payment workflow via x402 on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T06:51:28.736Z","isFirstParty":false}