Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint · rollforge · bestiary · statline · matchpoint · retail · agentops · browserworkflow · modelrouter · compose
$ man html-to-markdown

/html-to-markdown

agentutility / mediakit / html-to-markdown
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakit
CATEGORY
uncategorized
STATUS
live
NAME
html-to-markdown convert html to markdown
SYNOPSIS
POST https://x402.agentutility.ai/html-to-markdown
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

Convert HTML to Markdown. Strips nav, scripts, ads, and other boilerplate. Preserves headings, lists, tables, code blocks, links, and images. Accepts raw HTML or a URL — when given a URL the server fetches the page and runs the converter on the body. Returns clean Markdown plus title and char counts. Ideal for LLM context windows, RAG ingestion, and content archival.

INPUTrequest schema
propertytypedescriptionreq?
htmlstringRaw HTML to convert. Mutually exclusive with 'url' — supply one.optional
urlstringPage URL to fetch and convert. Server follows redirects. Mutually exclusive with 'html'.optional
include_linksbooleanKeep hyperlinks as Markdown [text](href). Default true. Set false for prose-only output.optional
include_imagesbooleanKeep images as Markdown ![alt](src). Default true.optional
user_agentstringOptional User-Agent header sent when fetching 'url'. Default is a generic browser UA.optional
OUTPUTresponse shape
fieldtypedescription
titlestringPage title extracted from the HTML <title> tag or first heading.
markdown_charsstringCharacter count of the converted markdown output.
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/html-to-markdown \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster
npx -y @agentutility/mcp-<cluster>

# Required: EVM private key with USDC on Base
export X402_PRIVATE_KEY=0x...

# Then call the html-to-markdown tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
mediakithtml-to-markdownmarkdown-convertercontent-extractionurl-to-markdownreadabilityscraping
methods
POST
cluster
mediakit
price
$0.005 USDC per call
ADJACENTother endpoints in mediakit
endpointdescriptionprice
compress-pdfPDF compressor / PDF size reducer.$0.005
convert-html-to-markdownConvert HTML to Markdown.$0.005
excel-to-csvConverts Excel workbooks (.xlsx / .xls) to CSV, TSV, or JSON with multi-sheet handling, returning each sheet by name.$0.005
excel-to-google-sheetsConverts Excel files for import into Google Sheets.$0.005
html-markdownConverts raw HTML or a URL into clean Markdown, preserving headings, lists, tables, code blocks, links, and images.$0.005
json-yamlConverts between JSON and YAML in either direction.$0.005
pdf-compressShrinks PDFs to a smaller size for email or the web, with three quality levels: ebook (lowest, web-quality), printer (medium), prepress (…$0.005
url-to-markdownFetches a public URL, strips boilerplate, and returns clean Markdown plus title and character counts.$0.005
SEE ALSO
agentutility · mediakit · x402 · mcp · llms.txt · registry.json · bazaar.x402.org