{"uid":"cap_pJDh9eLucUKgctJYCA1mi","slug":"arxiv-digest-agentdiet-dev-web-url-html-distiller-with-bm25-budget-4092c3ee","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/distill)","url":"https://arxiv-digest.agentdiet.dev/v1/distill?utm_source=zero.xyz","method":"POST","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_37f8MmoEVfuRDBpg6ifgq","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 a URL or processes raw HTML and distills it into compact, agent-ready tokens using markdown, structured, skeleton, or BM25-focused budget modes","exampleAgentPrompt":"Can you distill https://arxiv.org/abs/2405.12345 into compact markdown, staying under 500 tokens and focusing on the methodology section?","exampleUseCases":[{"title":"Arxiv paper research extraction","prompt":"Distill this arxiv paper URL https://arxiv.org/abs/2406.00001 into structured markdown so I can read the key findings without burning through my token budget — keep it under 800 tokens."},{"title":"BM25-focused competitor pricing research","prompt":"Fetch and distill https://stripe.com/pricing into budget mode with query 'transaction fees per payment' and cap the output at 300 tokens so I only get the relevant pricing details."},{"title":"Documentation page skeleton outline","prompt":"Take this documentation page at https://docs.example.com/api/overview and give me a skeleton outline of its sections so I can navigate it quickly without reading the whole thing."}],"resultDescription":"Returns a distilled version of the webpage or HTML in the requested mode (markdown, structured JSON tables/metadata, skeleton outline, or BM25-scored budget excerpt), along with ROI proof metrics showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved in USD. Also includes optional billing details and cache hit/miss status.","failureModes":["URL is unreachable or returns non-200 status — endpoint may return an error status","HTML content is too large or malformed — distillation may fail or produce degraded output","mode=budget used without providing a query — BM25 scoring may be non-targeted","max_tokens set too low — output may be aggressively truncated or unusable","Payment not provided or insufficient — HTTP 402 returned requiring x402 micropayment","Rate limiting or network timeout when fetching remote URL"],"whenToPreferThis":"Choose this endpoint when you need to compress web pages or raw HTML into token-efficient representations before passing content to an LLM, especially when you have a strict token budget or want to focus retrieval on a specific query using BM25 scoring. It is particularly valuable for processing documentation pages, research papers, and structured sites where the full HTML would be prohibitively expensive to process directly. Prefer this over generic scraping tools when you need built-in compression metrics and LLM cost savings proof.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:30:52.665Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-web-url-html-distiller-with-bm25-budget-4092c3ee"}