{"uid":"cap_ayK_tqYeb4ssng8YUGTza","slug":"serp-extract-agentdiet-dev-context-bloat-eliminator-bm25-budgeted-web-7bc138b2","name":"Context Bloat Eliminator – BM25-Budgeted Web Distillation","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://serp-extract.agentdiet.dev/v1/context-bloat-eliminator)","url":"https://serp-extract.agentdiet.dev/v1/context-bloat-eliminator?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_qM3bfcfT8pEmAxqdEtugQ","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or accepts raw HTML and distills it into token-efficient Markdown, structured JSON, skeleton outline, or a BM25-ranked budget excerpt, with ROI proof of tokens saved.","exampleAgentPrompt":"Distill this URL https://stripe.com/docs/api into clean Markdown using budget mode, focused on 'payment intents', and cap the output at 500 tokens so I can see how many tokens we saved versus the raw page.","exampleUseCases":[{"title":"Cost-efficient doc ingestion for RAG pipeline","prompt":"Fetch https://docs.openai.com/api-reference and distill it with BM25 budget mode focused on 'function calling', capped at 800 tokens — I want to see the compression ratio and how much LLM cost we'd save versus feeding the raw page."},{"title":"Boilerplate-free article extraction for summarization","prompt":"I have this raw HTML from a news article — can you distill it into clean Markdown and strip all the nav menus, ads, and footers so I'm left with just the article body?"},{"title":"Skeleton outline of a long technical page","prompt":"Pull https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview and give me a skeleton outline of the page structure so I can see the main sections without reading the whole thing."}],"resultDescription":"Returns a `data` object containing the distilled content in the requested format (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, ROI multiplier, and estimated LLM cost saved in USD. Also includes optional cache hit/miss status and billing details.","failureModes":["URL is unreachable or returns non-200 HTTP status — endpoint may return an error status","Raw HTML is malformed or empty — distillation may produce minimal or empty output","mode=budget requires a query and max_tokens; omitting them may fall back to defaults or error","Token budget too low (below 20) triggers schema validation failure","BM25 query too vague returns low-relevance excerpt with poor ROI multiplier","Paywalled or JS-rendered pages may yield thin or incomplete distilled content"],"whenToPreferThis":"Choose this endpoint when you need to feed webpage content into an LLM pipeline and want to minimize token consumption and cost. It is especially valuable when the raw HTML is large and noisy (ads, navigation, footers) and you need only the signal. The BM25 budget mode is ideal when you have a specific query focus and a hard token ceiling. Prefer this over generic scrapers when you need built-in ROI proof (tokens saved, cost saved) alongside the distilled content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:35:04.626Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-context-bloat-eliminator-bm25-budgeted-web-7bc138b2"}