{"uid":"cap_1aIulnzO4bRx35kngyG2h","slug":"cve-intel-agentdiet-dev-html-url-to-markdown-distiller-with-bm25-9bd1afaa","name":"HTML/URL to Markdown 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://cve-intel.agentdiet.dev/v1/html-to-markdown)","url":"https://cve-intel.agentdiet.dev/v1/html-to-markdown?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_jCwHG-3RcH2hArbYPerev","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"cve-intel.agentdiet.dev","brandSlug":"cve-intel-agentdiet-dev-mpp","brandBaseUrl":"https://cve-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a web URL or raw HTML and distills it into compact, agent-ready Markdown or structured output with configurable token budgets and BM25 relevance filtering","exampleAgentPrompt":"Can you fetch https://docs.stripe.com/api and distill it into compact markdown using budget mode, focused on 'authentication', keeping it under 500 tokens?","exampleUseCases":[{"title":"Compress documentation for agent context","prompt":"Grab the OpenAI API docs at https://platform.openai.com/docs/overview and distill them into structured markdown so I can load them into my agent without blowing my context window."},{"title":"BM25 relevance-focused page extraction","prompt":"Fetch https://en.wikipedia.org/wiki/Retrieval-augmented_generation and extract only the parts relevant to 'vector databases' in budget mode, capped at 300 tokens."},{"title":"Convert raw HTML to clean markdown","prompt":"I've got a raw HTML blob from a scraped product page — can you distill it into clean markdown so my agent can read the price and description without all the junk tags?"}],"resultDescription":"Returns a JSON object containing distilled content (Markdown text, structured tables/metadata, skeleton outline, or BM25-ranked excerpt depending on mode), an ROI proof block showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved, plus optional cache hit/miss status and billing details.","failureModes":["Invalid or unreachable URL returns a fetch error with no data","max_tokens set below 20 is rejected with a validation error","query parameter ignored if mode is not 'budget'","Very large pages may exceed processing limits or return truncated output","Private/paywalled URLs may return empty or partial content","Raw HTML provided without html parameter when url is missing causes required field error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to consume web content but must stay within a strict token budget, or when raw HTML needs to be cleaned into readable Markdown. It is especially valuable when BM25 relevance filtering is needed to focus distillation on a specific query topic, or when ROI/compression metrics are needed to prove context efficiency. Prefer it over generic scrapers when token cost optimization and agent-readiness of output are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:43.867Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-html-url-to-markdown-distiller-with-bm25-9bd1afaa"}