{"uid":"cap_ST60kJZqM6C15SYKUTBrm","slug":"arxiv-digest-agentdiet-dev-web-url-html-distiller-with-bm25-budget-dc67b935","name":"Web URL HTML Distiller with BM25 Budget Control","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://arxiv-digest.agentdiet.dev/v1/clean-html)","url":"https://arxiv-digest.agentdiet.dev/v1/clean-html?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_N0HnjZBm5tlZFTwvOFFqu","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"arxiv-digest.agentdiet.dev","brandSlug":"arxiv-digest-agentdiet-dev-mpp","brandBaseUrl":"https://arxiv-digest.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches and distills a web URL or raw HTML into compact, token-efficient agent-ready content using configurable extraction modes and BM25-focused budgeting.","exampleAgentPrompt":"Distill the content at https://arxiv.org/abs/2405.12345 into clean markdown and keep it under 500 tokens, focusing on the methodology section.","exampleUseCases":[{"title":"Research paper extraction for agent","prompt":"Grab the arxiv paper at https://arxiv.org/abs/2406.11200 and distill it into structured markdown — I need just the abstract, methods, and results, ideally under 800 tokens."},{"title":"Budget-constrained competitor page analysis","prompt":"Distill https://stripe.com/pricing into a token budget of 300 tokens, focusing my query on 'transaction fees and pricing tiers' so I only get the relevant bits."},{"title":"Skeleton outline of documentation page","prompt":"Give me a skeleton outline of the page at https://docs.openai.com/api-reference so I can see the high-level structure without reading the whole thing."}],"resultDescription":"Returns a 'data' object containing the distilled content in the requested mode (Markdown, structured JSON, skeleton outline, or BM25 excerpt), along with ROI proof metrics (raw_tokens, distilled_tokens, tokens_saved, compression_ratio_pct, llm_cost_saved_usd, roi_multiplier), optional cache hit/miss metadata, and billing details including fee charged in USD.","failureModes":["Invalid or unreachable URL returns an error status","Token budget too low (max_tokens < 20) rejected by schema validation","BM25 query provided without mode=budget may be silently ignored","Raw HTML too large may time out or exceed processing limits","Payment failure via x402 prevents execution and returns 402 status","Paywalled or bot-blocked pages may return empty or partial content"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to ingest web page content efficiently without burning large token budgets on raw HTML. It is especially valuable when fetching long documentation pages, research papers, or structured web content where only a relevant excerpt is needed. The BM25 budget mode makes it ideal for query-focused extraction. Prefer this over generic web scrapers when token cost reduction and ROI measurement matter to your workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:50.251Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-web-url-html-distiller-with-bm25-budget-dc67b935"}