{"uid":"cap_eb3cJlhOh6fnjQDhpTy9-","slug":"agentutility-convert-html-to-markdown-55d9bfaa","name":"agentutility — convert-html-to-markdown","description":"817 pay-per-call APIs for AI agents. Every endpoint is POST /<name> and is payable in USDC over x402 on Base and Solana — no signup, no API key, just pay-per-call. GET https://x402.agentutility.ai/ returns the same catalog as machine-readable JSON.","url":"https://x402.agentutility.ai/convert-html-to-markdown?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{"url":{"type":"string","description":"Page URL to fetch and convert. Server follows redirects. Mutually exclusive with 'html'."},"html":{"type":"string","description":"Raw HTML to convert. Mutually exclusive with 'url' — supply one."},"user_agent":{"type":"string","description":"Optional User-Agent header sent when fetching 'url'. Default is a generic browser UA."},"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."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"title":{"type":"string"},"markdown":{"type":"string"},"html_chars":{"type":"integer"},"source_url":{"type":"string"},"markdown_chars":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"title":"Markdown","markdown":"# Markdown\n\nMarkdown is a lightweight markup language...","html_chars":32418,"source_url":"https://en.wikipedia.org/wiki/Markdown","markdown_chars":5421}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_KdYvoqcH-RyDF7zfKBBHA","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 a URL or raw HTML string into clean Markdown text, returning title, markdown content, and character counts.","exampleAgentPrompt":"Fetch the page at https://en.wikipedia.org/wiki/Markdown and convert it to clean markdown — keep the links but drop the images.","exampleUseCases":[{"title":"Webpage content for LLM context","prompt":"Grab the article at https://www.bbc.com/news/technology-12345678 and convert it to markdown so I can feed it into my summarization pipeline — keep all the links."},{"title":"Raw HTML to markdown for documentation","prompt":"I have this raw HTML snippet from our internal CMS and I need it converted to markdown for our docs site — here's the HTML: <h1>Getting Started</h1><p>Welcome to our <a href='/docs'>documentation</a>.</p>"},{"title":"Prose-only extraction for readability","prompt":"Convert the page at https://medium.com/some-article to plain markdown prose — no images, no links, just the readable text."}],"resultDescription":"Returns a JSON object with the page title, full markdown-formatted content, the source URL that was fetched, the original HTML character count, and the resulting markdown character count. Markdown preserves headings, lists, links, and images by default (configurable).","failureModes":["URL is unreachable or returns a non-200 status — server may return an error or empty markdown","Mutually exclusive inputs: supplying both 'url' and 'html' simultaneously causes a validation error","Page behind a login wall or bot protection may return incomplete or empty HTML","Very large HTML pages may produce oversized markdown responses or time out","Invalid HTML may produce malformed or unexpected markdown output"],"whenToPreferThis":"Use this endpoint when you need to convert a live webpage or a raw HTML string into clean, LLM-friendly Markdown — especially for feeding web content into AI pipelines, documentation tools, or summarization workflows. It's ideal when you want configurable control over whether links and images are retained. Prefer this over generic scraping endpoints when you specifically need Markdown output with character-count metadata and no signup or API key overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-06T12:38:37.265Z","isFirstParty":false,"canonicalSlug":"agentutility-convert-html-to-markdown-55d9bfaa"}