{"uid":"cap_VcLSa5xsS3VfuWHA1OJr1","slug":"github-audit-agentdiet-dev-web-url-html-distiller-with-bm25-budget-c28b4a0f","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://github-audit.agentdiet.dev/v1/pdf-extract)","url":"https://github-audit.agentdiet.dev/v1/pdf-extract?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__VIoSRB1i1Sxc0Ncjsd9e","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"github-audit.agentdiet.dev","brandSlug":"github-audit-agentdiet-dev-mpp","brandBaseUrl":"https://github-audit.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or accepts raw HTML and distills it into compact, agent-ready content with BM25-ranked token budget control and multiple output modes","exampleAgentPrompt":"Can you distill https://stripe.com/docs/api into compact markdown, using budget mode with the query 'payment intents' and a max of 500 tokens so I don't blow my context window?","exampleUseCases":[{"title":"Research page compression for agent pipeline","prompt":"Fetch https://openai.com/research/gpt-4 and distill it into markdown, keeping it under 300 tokens focused on the query 'model capabilities' — I need a tight excerpt my agent can reason over."},{"title":"Structured data extraction from a pricing page","prompt":"Pull https://vercel.com/pricing and distill it in structured mode so I get the pricing tiers and feature comparisons as clean JSON tables."},{"title":"Skeleton outline of a long documentation page","prompt":"Take this raw HTML from our internal wiki and give me a skeleton outline of its structure — just the headings and section hierarchy, nothing more."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled content (markdown, structured tables, skeleton outline, or BM25-ranked excerpt), an 'roi_proof' object showing raw vs. distilled token counts, tokens saved, compression ratio, estimated LLM cost saved, and ROI multiplier, plus optional cache hit/miss status and billing info.","failureModes":["URL is unreachable or returns non-200 — distillation fails with an error status","Raw HTML is empty or malformed — may return empty or minimal output","mode=budget used without a query parameter — BM25 ranking has no focus signal","max_tokens set too low (below 20) — rejected by schema validation","Target URL blocks bots/crawlers — fetch fails silently or returns CAPTCHA HTML","Token budget too tight relative to content — may truncate critical information"],"whenToPreferThis":"Choose this endpoint when you need to reduce the token footprint of web content before passing it to an LLM, especially when operating under strict context window constraints. It is particularly valuable in agentic pipelines where multiple pages must be processed cheaply, or when BM25-ranked excerpting is needed to surface query-relevant content from long pages. Prefer it over raw fetch + truncation because it provides structured output modes, compression metrics, and ROI proofs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:36:49.958Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-web-url-html-distiller-with-bm25-budget-c28b4a0f"}