{"uid":"cap_qph-j8cYX6R98YE2j_ra6","slug":"company-enrich-agentdiet-dev-web-url-html-distiller-with-bm25-budget-e80a1ee3","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://company-enrich.agentdiet.dev/v1/clean-html)","url":"https://company-enrich.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_wCfERL_3S-tdWphUbzdZF","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"company-enrich.agentdiet.dev","brandSlug":"company-enrich-agentdiet-dev-mpp","brandBaseUrl":"https://company-enrich.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or raw HTML and distills it into compact, agent-ready tokens using multiple extraction modes including BM25-ranked budget excerpts","exampleAgentPrompt":"Distill the content at https://stripe.com/docs/payments into compact markdown, keeping it under 2000 tokens and focusing on 'payment intents' — I need just the relevant parts without wasting tokens.","exampleUseCases":[{"title":"Token-budget web research for agents","prompt":"Fetch https://openai.com/research/gpt-4 and give me a BM25-ranked excerpt focused on 'context window size', capped at 500 tokens — I only want the parts relevant to that topic."},{"title":"Structured data extraction from landing page","prompt":"Pull https://stripe.com/pricing and distill it into structured tables showing all the pricing tiers and fees — use structured mode so I get clean JSON I can compare."},{"title":"Skeleton outline of documentation page","prompt":"Grab https://docs.anthropic.com/claude/reference and return just the skeleton outline of its sections and headings — I want to understand the structure without reading the whole thing."}],"resultDescription":"Returns a data object containing the distilled content (Markdown text, structured JSON tables/metadata, a skeleton outline, or a BM25-ranked excerpt depending on mode), plus ROI proof metrics showing raw vs distilled token counts, tokens saved, compression ratio percentage, LLM cost saved in USD, and ROI multiplier. Also includes cache hit/miss status and billing details.","failureModes":["URL is unreachable or returns non-200 — fetch fails with an error status","HTML is malformed and cannot be parsed — partial or empty distillation returned","max_tokens set too low to include any meaningful content — minimal output","BM25 query returns no matching segments — empty budget excerpt","Rate limiting or payment failure — 402 response requiring payment","URL is a non-HTML resource (PDF, binary) — distillation may fail or return raw text"],"whenToPreferThis":"Choose this endpoint when your agent needs to read webpage content without consuming the full raw HTML token budget — especially when LLM context window cost is a concern. It is particularly valuable when you want BM25-focused excerpts relevant to a specific query, when you need structured tables or metadata extracted from a page, or when you want a quick skeleton outline before deciding whether to fetch full content. Prefer it over direct HTTP fetch when token efficiency matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:29.023Z","isFirstParty":false,"canonicalSlug":"company-enrich-agentdiet-dev-web-url-html-distiller-with-bm25-budget-e80a1ee3"}