{"uid":"cap_hCTjS43M2Ql5CX9W1vTlT","slug":"json-repair-agentdiet-dev-url-to-markdown-web-distiller-d49e78a1","name":"URL to Markdown Web Distiller","description":"Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://json-repair.agentdiet.dev/v1/url-to-markdown)","url":"https://json-repair.agentdiet.dev/v1/url-to-markdown?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"Target webpage URL to distill (or builtin://stripe-docs)"},"mode":{"enum":["markdown","structured","skeleton","budget"],"type":"string","default":"markdown","description":"Extraction mode: markdown, structured, skeleton, or budget"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"max_tokens":{"type":"integer","minimum":20,"description":"Strict token ceiling when mode=budget"}}},"responseSchema":{"type":"object","required":["status","roi_proof","data"],"properties":{"data":{"type":"object","description":"Distilled Markdown, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt."},"cache":{"type":"object","properties":{"status":{"enum":["HIT","MISS"],"type":"string"},"cache_key":{"type":"string"},"latency_ms":{"type":"number"}}},"status":{"type":"string","description":"Execution status ('ok')"},"billing":{"type":"object","properties":{"agent_id":{"type":"string"},"payment_method":{"type":"string"},"fee_charged_usd":{"type":"number"}}},"roi_proof":{"type":"object","properties":{"raw_tokens":{"type":"integer"},"tokens_saved":{"type":"integer"},"roi_multiplier":{"type":"number"},"distilled_tokens":{"type":"integer"},"llm_cost_saved_usd":{"type":"number"},"compression_ratio_pct":{"type":"number"}}}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.001","displayCostAsset":"USD","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.001/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZyOAwfb0Ytbgr0IMtvxjS","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"json-repair.agentdiet.dev","brandSlug":"json-repair-agentdiet-dev-mpp","brandBaseUrl":"https://json-repair.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a web page by URL and converts it into compact, token-efficient markdown or structured output for AI agent consumption","exampleAgentPrompt":"Can you distill https://stripe.com/docs/api into compact markdown so I can feed it to my agent without blowing the token budget — use budget mode with a max of 2000 tokens and focus the BM25 query on 'payment intents'?","exampleUseCases":[{"title":"Research page summarized for agent","prompt":"Grab https://openai.com/research/gpt-4 and distill it into clean markdown for me — I want to feed it into my pipeline without wasting tokens."},{"title":"Token-budget doc fetch for coding agent","prompt":"Fetch https://docs.github.com/en/rest and extract only the parts relevant to 'authentication tokens' using budget mode with a max of 1500 tokens."},{"title":"Structured data extraction from landing page","prompt":"Pull https://www.notion.so/product and give me the content as structured JSON tables and metadata — I want pricing tiers and feature lists in a clean format."}],"resultDescription":"Returns a JSON object containing distilled content in one of four formats (markdown, structured JSON, skeleton outline, or BM25 budget excerpt), plus an roi_proof object showing raw_tokens, distilled_tokens, tokens_saved, compression_ratio_pct, and llm_cost_saved_usd. Also includes cache hit/miss status and billing details.","failureModes":["Invalid or unreachable URL returns an error status","max_tokens below minimum of 20 causes a validation error","BM25 query provided without mode=budget may be ignored","Paywalled or JavaScript-heavy pages may return incomplete content","Payment not processed (402) if x402 payment header is missing or insufficient"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to ingest web content with strict token budgets — especially when raw HTML would be too verbose or expensive to process directly. The BM25 budget mode makes it uniquely suited for targeted information retrieval from long pages. Prefer over generic scrapers when token efficiency and cost savings (tracked via roi_proof) matter, or when you need structured JSON tables extracted from a page rather than raw text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:47.119Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-url-to-markdown-web-distiller-d49e78a1"}