{"uid":"cap_sfa9eyeimCUVP6uiCuLFY","slug":"url2md-8e8669dc","name":"url2md","description":"PDFs, JavaScript pages and ordinary HTML as clean Markdown. Pays a page's x402 toll for you. Follows robots.txt.","url":"https://url2md.io/v1/md","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":2048,"description":"Absolute http(s) URL to convert; percent-encode it in the query string. http and https only, no credentials in the URL, no private, loopback or internal hosts, and the port must be one Cloudflare proxies (80, 443, 8080, 8443, 8880, 2052/2053/2082/2083/2086/2087/2095/2096). robots.txt is honoured for the user-agent token url2md."},"format":{"enum":["json","markdown"],"type":"string","description":"json: the whole result object. markdown: the markdown body alone, sent as text/markdown. Omit it and the format follows the Accept header (text/markdown → markdown), else json."},"render":{"enum":["auto","static","browser"],"type":"string","default":"auto","description":"auto: static first, browser only when the page looks client-rendered. static: never use a browser. browser: always render in a headless browser."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["url","finalUrl","source","markdown","words","tokensEstimate","fetchedAt","timing","render","warnings"],"properties":{"url":{"type":"string","description":"the URL as asked for"},"lang":{"type":["string","null"]},"title":{"type":["string","null"],"description":"also sent percent-encoded as X-Url2md-Title"},"words":{"type":"integer","description":"also sent as X-Url2md-Words"},"render":{"type":"object","properties":{"mode":{"enum":["auto","static","browser"],"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"escalated":{"type":"boolean"}}},"source":{"enum":["static","browser","pdf","origin-markdown","text"],"type":"string","description":"how the markdown was produced; also sent as X-Url2md-Source"},"timing":{"type":"object","properties":{"fetchMs":{"type":"integer"},"totalMs":{"type":"integer"},"renderMs":{"type":["integer","null"]},"convertMs":{"type":"integer"},"browserMsUsed":{"type":["integer","null"]}}},"charset":{"type":["string","null"]},"finalUrl":{"type":"string","description":"the URL after redirects; also sent as X-Url2md-Final-Url"},"markdown":{"type":"string","description":"the converted page"},"warnings":{"type":"array","items":{"type":"string"}},"canonical":{"type":["string","null"]},"fetchedAt":{"type":"string","format":"date-time"},"redirects":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string"},"from":{"type":"string"},"status":{"type":"integer"}}}},"contentType":{"type":["string","null"]},"description":{"type":["string","null"]},"contentSignal":{"type":["string","null"],"description":"Upstream Content-Signal header, passed through untouched"},"blockSuspected":{"type":["object","null"],"properties":{"markers":{"type":"array","items":{"type":"string"}}},"description":"set when what came back looks like a bot challenge or block page rather than the page: the origin answered 200 and the call was charged, but the content is probably not what was asked for. Also sent as X-Url2md-Block-Suspected, and named in warnings[]."},"tokensEstimate":{"type":"integer","description":"also sent as X-Url2md-Tokens-Estimate"}},"description":"The conversion result. The same metadata always travels in response headers as well, so a caller that asked for text/markdown still gets it: X-Url2md-Source (static | browser | pdf | origin-markdown | text), X-Url2md-Final-Url, X-Url2md-Title (percent-encoded), X-Url2md-Words, X-Url2md-Tokens-Estimate, X-Url2md-Ledger-Id (the ledger row for the settled payment), and X-Url2md-Upstream-Toll (USD paid to the origin when the page itself charged an x402 toll, absent otherwise). The x402 settlement receipt is in PAYMENT-RESPONSE. Errors are JSON with a stable error.code, and any error after a charge carries error.details.callerCharged with the ledger id."}}}}},"responseSchema":{"type":"json","example":{"url":"https://example.com","lang":null,"title":"Example Domain","words":24,"render":{"mode":"auto","reasons":[],"escalated":false},"source":"static","timing":{"fetchMs":268,"totalMs":412,"renderMs":null,"convertMs":3,"browserMsUsed":null},"charset":"utf-8","finalUrl":"https://example.com/","markdown":"# Example Domain\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n[Learn more](https://iana.org/domains/example)","warnings":[],"canonical":null,"fetchedAt":"2026-09-06T03:45:14.033Z","redirects":[],"contentType":"text/html","description":null,"contentSignal":null,"tokensEstimate":42}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.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_405zKvdcK11wITiRc8h0V","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts any URL (static HTML, JavaScript-rendered pages, or PDFs) into clean Markdown text suitable for AI agent consumption","exampleAgentPrompt":"Can you fetch the content of https://en.wikipedia.org/wiki/Markdown and give it to me as clean Markdown so I can process it with my AI?","exampleUseCases":[{"title":"Feeding live articles to an LLM","prompt":"Grab the full article at https://www.theverge.com/2024/1/15/some-article and convert it to clean Markdown so I can summarize it."},{"title":"Extracting PDF research paper content","prompt":"That PDF at https://arxiv.org/pdf/2301.07041.pdf — can you pull out all the text as Markdown so I can analyze the methodology section?"},{"title":"Monitoring a JavaScript-rendered product page","prompt":"Fetch the content of https://store.example.com/products/widget — it's a React page — and get me the clean Markdown text so I can check what it says about pricing."}],"resultDescription":"A JSON object containing the converted Markdown string, page title, word count, estimated token count, detected language, source type (static/JS-rendered/PDF), fetch and render timing breakdown, charset, final URL after redirects, redirect chain, content type, canonical URL, and any warnings encountered during conversion.","failureModes":["URL is blocked by robots.txt for the url2md user-agent token — returns an error indicating crawl disallowed","URL is unreachable or times out — returns a fetch error","JavaScript rendering fails or times out for dynamic pages — may return partial or empty markdown","Payment via x402 protocol is rejected or underfunded — call is not processed","URL returns non-HTML/non-PDF content type that cannot be converted — returns a content-type warning or error","Redirects exceed limits or produce a redirect loop — returns a redirect error"],"whenToPreferThis":"Choose url2md when you need to reliably convert any arbitrary URL — including JavaScript-rendered single-page apps and PDFs — into clean, AI-ready Markdown with a single HTTP call. It is especially valuable when you need structured metadata alongside the text (title, word count, token estimate, timing). Prefer it over general-purpose scrapers when you need consistent Markdown output without HTML noise, and when you need robots.txt-compliant fetching. The per-call USDC micro-payment model via x402 makes it practical for on-demand agent use without subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:30:13.052Z","isFirstParty":false}