{"uid":"cap_W-K58GDWN2fltXuHQCiQY","slug":"domain-osint-agentdiet-dev-semantic-html-pruner-with-bm25-budget-8eb37535","name":"Semantic HTML Pruner 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://domain-osint.agentdiet.dev/v1/semantic-html-pruner)","url":"https://domain-osint.agentdiet.dev/v1/semantic-html-pruner?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_2cXq6lkGXfrDiEYxh75jg","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"domain-osint.agentdiet.dev","brandSlug":"domain-osint-agentdiet-dev-mpp","brandBaseUrl":"https://domain-osint.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches and distills a URL or raw HTML into compact Markdown, structured JSON, skeleton outline, or a BM25-ranked token-budgeted excerpt to reduce LLM context costs","exampleAgentPrompt":"Distill the content at https://stripe.com/docs/payments into clean markdown using budget mode focused on 'payment intents', keeping it under 500 tokens so I can feed it to my LLM without blowing the context window.","exampleUseCases":[{"title":"Token-efficient doc page grounding","prompt":"Fetch the OpenAI API reference page at https://platform.openai.com/docs/api-reference and distill it into budget mode focused on 'function calling', capped at 800 tokens — I need only the relevant parts for my agent."},{"title":"Structured product data extraction","prompt":"Take this raw HTML from our competitor's pricing page and convert it into structured JSON tables — I want the pricing tiers and feature list cleanly extracted without all the navigation and footer noise."},{"title":"Skeleton outline for long documentation","prompt":"Get the content from https://docs.aws.amazon.com/ec2/latest/userguide/concepts.html and give me a skeleton outline mode summary so I can see the document's high-level structure before deciding which sections to dig into."}],"resultDescription":"Returns a `data` object containing the distilled content (Markdown text, structured JSON tables/metadata, skeleton outline, or BM25-ranked excerpt), plus an `roi_proof` block showing raw token count, distilled token count, tokens saved, compression ratio percentage, and estimated LLM cost saved in USD. Optionally includes cache hit/miss status and billing details.","failureModes":["URL is unreachable or returns non-200 — service cannot fetch content","Raw HTML is malformed beyond parsing — distillation may be empty or degraded","max_tokens too low for meaningful extraction — output truncated aggressively","BM25 query finds no relevant tokens — budget excerpt may be empty","Payment not authorized via x402 — request rejected with 402 status","URL behind login/paywall — fetched HTML is a login page, not target content"],"whenToPreferThis":"Choose this endpoint when you need to feed webpage content to an LLM but want to minimize token usage and cost — especially when the page is large, noisy, or contains boilerplate. Prefer budget mode with a BM25 query when you only care about a specific topic within a page. Prefer structured mode when you need tabular data or metadata in JSON form. Use over generic scraping tools when token compression ROI and LLM cost savings are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:46.163Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-semantic-html-pruner-with-bm25-budget-8eb37535"}