{"uid":"cap_yxh5E0Opsx_lYvfce-l2h","slug":"agentdiet-markdown-distill-d1f85200","name":"AgentDiet Markdown Distill","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://agentdiet.dev/v1/markdown-distill)","url":"https://agentdiet.dev/v1/markdown-distill?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"Target webpage URL to fetch and distill (or builtin://stripe-docs)"},"html":{"type":"string","description":"Optional raw HTML string to distill directly without fetching"},"mode":{"enum":["markdown","structured","skeleton","budget"],"type":"string","default":"markdown","description":"Distillation mode"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"max_tokens":{"type":"integer","minimum":20,"description":"Strict token budget 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":["x402"],"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":"unknown","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cYPBtOQ6GDlkEbbFiGLSI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_9mry8RAH5f4DhY1cGGWkC","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a URL and converts its HTML content into clean, token-efficient Markdown by stripping 85-97% of HTML bloat","exampleAgentPrompt":"Can you fetch the article at https://example.com/blog/my-post and convert it to clean markdown, stripping all the HTML junk so I can use it in my prompt without wasting tokens?","exampleUseCases":[{"title":"Summarize a news article efficiently","prompt":"Grab https://techcrunch.com/2024/05/01/some-story/ and distill it to clean markdown so I can summarize it without blowing up my context window."},{"title":"Feed a documentation page to an agent","prompt":"Convert the docs at https://docs.langchain.com/docs/get-started/introduction into lean markdown — I want to pass it to my agent without all the HTML overhead."},{"title":"Research a competitor's landing page","prompt":"Fetch https://competitor.com/pricing and strip out all the HTML so I just get the readable text as markdown — I want to see what they're offering."}],"resultDescription":"Returns a Markdown-formatted string of the target page's content with HTML tags, scripts, styles, and other token-bloating elements removed, typically reducing token count by 85-97% compared to raw HTML.","failureModes":["Invalid or unreachable URL returns an error or empty content","Paywalled or bot-blocked pages may return minimal or no content","Very large pages may be truncated or time out","Dynamic JavaScript-rendered content may not be captured if the page requires JS execution","Malformed input schema (missing 'url' query param) returns a validation error","Payment failure via x402 protocol blocks the request"],"whenToPreferThis":"Use this endpoint when you need to feed web page content into an LLM prompt and want to minimize token usage. It is ideal over generic web scrapers when you specifically need clean Markdown output optimized for AI consumption, and when cost per call ($0.001 USDC) matters at scale. Prefer it over raw HTML fetchers when you need the content to be immediately readable and structured without post-processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:41:57.654Z","isFirstParty":false,"canonicalSlug":"agentdiet-markdown-distill-d1f85200"}