{"uid":"cap_JoGUVGvu5ZBRYy5vbnaaO","slug":"mesh-agentdiet-dev-web-url-distillation-html-compressor-7381c1f6","name":"Web URL Distillation & HTML Compressor","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://mesh.agentdiet.dev/v1/paywall-clean-extract)","url":"https://mesh.agentdiet.dev/v1/paywall-clean-extract?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":[],"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_3MMG4F1UC55c1B-jwF4u0","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mesh.agentdiet.dev","brandSlug":"mesh-agentdiet-dev-mpp","brandBaseUrl":"https://mesh.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or raw HTML and distills it into compact, agent-ready tokens using BM25-controlled budget modes (markdown, structured, skeleton, or budget)","exampleAgentPrompt":"Grab the content at https://stripe.com/docs/payments and distill it into clean markdown, keeping it under 800 tokens and focusing on the payment flow setup steps.","exampleUseCases":[{"title":"Research article into agent context","prompt":"Pull the article at https://techcrunch.com/2025/01/15/ai-agents-funding/ and compress it into clean markdown so I can include it in my agent's context without wasting tokens."},{"title":"Focused doc excerpt for a query","prompt":"Distill https://docs.openai.com/api-reference into budget mode, focused on 'function calling', and cap it at 600 tokens so my agent gets only what's relevant."},{"title":"Structured data extraction from a page","prompt":"Fetch https://www.ycombinator.com/companies and return the content in structured mode so I get tables and metadata about the companies in a clean JSON format."}],"resultDescription":"Returns a distilled version of the page in the requested mode (markdown, structured JSON tables, skeleton outline, or BM25-focused budget excerpt), along with ROI proof metrics including raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved. Includes cache status and billing info.","failureModes":["URL is unreachable or returns non-200 response — fetch error returned","Invalid or malformed URL string — validation error","max_tokens too low (below 20) — schema validation rejection","BM25 query missing when mode=budget — may return unfiltered or error","Raw HTML too large — may exceed processing limits","Payment/402 auth failure — endpoint returns 402 and requires micropayment","Paywalled or bot-blocked page — content may be minimal or empty"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to ingest web content without exhausting its context window — especially for long documentation pages, news articles, or raw HTML payloads. It is ideal when you need BM25-focused excerpts limited to a strict token budget, or when you want structured/skeleton modes rather than raw HTML. Prefer it over generic scrapers when token efficiency and LLM cost savings are priorities, and when you need built-in compression metrics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:52.250Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-web-url-distillation-html-compressor-7381c1f6"}