{"name":"url2md","version":"0.6.0","description":"URL → clean Markdown for AI agents. Static pages, JavaScript-rendered pages and PDFs. Honours robots.txt. Pays x402 tolls on your behalf.","openapi":"https://url2md.io/openapi.json","source":"https://github.com/glassyeah/url2md","endpoints":{"convert":{"GET":"https://url2md.io/v1/md?url=https://example.com","POST":"https://url2md.io/v1/md with JSON body {\"url\": \"https://example.com\", \"render\": \"auto\", \"format\": \"json\"}","parameters":{"url":"required; absolute http(s) URL, percent-encoded in the query string","render":"auto (default) | static | browser","format":"json (default) | markdown; or send Accept: text/markdown"},"headers":"header names are case-insensitive (HTTP/2 delivers payment-required, payment-response and x-url2md-* in lower case)"},"health":"https://url2md.io/health"},"example":"curl 'https://url2md.io/v1/md?url=https://example.com'","pricing":{"model":"x402","protocolVersion":2,"price":"$0.005","priceAtomic":"5000","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","chain":"Base","payTo":"0xa09aE66Ec8664475697FfC0eb45aa3Fe52Aa6030","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","paidRoutes":["GET /v1/md","POST /v1/md"],"freeRoutes":["GET /","GET /health","GET /openapi.json"],"charging":"base price: verified before the conversion runs and settled on-chain when the response is successful, or earlier, before a browser render starts (render=browser, or render=auto on a page that needs it); an error before that point is never charged. If a render you asked for then fails, you were charged: the error carries your receipt, details.callerCharged = true and details.ledgerStatus. Toll quotes (paymentFlow upfront): settled before the conversion runs; if the origin then rejects the toll or the page cannot be converted, the error carries your receipt and details.callerCharged = true. There is no automatic refund; url2md reconciles its ledger against the chain.","howToPay":"Call a paid route. The 402 carries the terms. Sign an EIP-3009 USDC transfer authorization for accepts[0].amount to accepts[0].payTo (PAYMENT-REQUIRED header, base64 JSON) and retry with it in the PAYMENT-SIGNATURE header. The payer wallet needs USDC only, no ETH: the facilitator submits the transfer and pays the gas. Header names are case-insensitive. Client libraries: @x402/fetch and @x402/axios (JavaScript, https://www.npmjs.com/package/@x402/fetch), x402 (Python, https://pypi.org/project/x402/); EIP-3009: https://eips.ethereum.org/EIPS/eip-3009. The successful response carries a PAYMENT-RESPONSE header with the settlement transaction.","passthrough":{"enabled":true,"marginPct":25,"maxTollUsd":"0.05","payer":"0xd38a5307Ca677B2D0cd766d400d48E3f2984Eb0a","how":"When the origin itself answers 402 with x402 terms (exact scheme, USDC on eip155:8453), the first paid call answers 402 again with a quote: base price + origin toll + 25% margin, paymentFlow \"upfront\". The quote itself travels in accepts[0].extra.quote, signed by url2md; client libraries echo it with the payment, so the retry is honoured from any location. Pay that quote; it settles first, then url2md pays the origin from its own wallet and returns the page with X-Url2md-Upstream-Toll. Tolls above $0.05 are refused (UPSTREAM_TOLL_TOO_HIGH). Quotes are valid for 15 minutes."},"docs":"https://x402.org"},"policies":{"robots":"robots.txt is honoured per RFC 9309 for the user-agent token 'url2md' (falling back to '*'); an unreachable robots.txt counts as disallow","userAgent":"Mozilla/5.0 (compatible; url2md/0.1; +https://github.com/glassyeah/url2md)","limits":{"maxBytes":10485760,"maxRedirects":5,"timeoutMs":20000,"browserTimeoutMs":30000}}}