{"uid":"cap_OWwNLjRi23EMWxdFFnPl4","slug":"serp-extract-agentdiet-dev-dom-stripper-bm25-budget-web-distillation-49a6c97b","name":"DOM Stripper – BM25-Budget 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/dom-stripper)","url":"https://serp-extract.agentdiet.dev/v1/dom-stripper?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_XYIUdFzhQFl-3_RJAsiNh","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 compact, token-efficient content using markdown, structured, skeleton, or BM25 budget-controlled modes","exampleAgentPrompt":"Fetch https://stripe.com/docs/payments/accept-a-payment and distill it into clean markdown, staying under 800 tokens and focusing the BM25 budget on 'payment intent creation'.","exampleUseCases":[{"title":"Token-budget research summary","prompt":"Pull https://en.wikipedia.org/wiki/Transformer_(machine_learning_model) and give me a BM25-focused distillation about 'attention mechanism', capped at 500 tokens so it fits in my prompt."},{"title":"Structured data extraction from product page","prompt":"Distill https://www.apple.com/iphone-15-pro/ in structured mode so I get the specs and pricing as clean JSON tables without all the marketing fluff."},{"title":"Skeleton outline for long documentation","prompt":"Grab https://docs.python.org/3/library/asyncio.html and give me a skeleton outline of the page so I can see the section headings and structure before deciding which part to read in full."}],"resultDescription":"Returns a JSON object containing: (1) 'data' with the distilled content in the chosen mode (markdown text, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt); (2) 'roi_proof' with raw token count, distilled token count, tokens saved, compression ratio %, ROI multiplier, and estimated LLM cost saved in USD; (3) optional 'cache' object with HIT/MISS status and latency; (4) optional 'billing' object with fee charged; and (5) 'status' field set to 'ok'.","failureModes":["URL unreachable or returns non-200 — endpoint may return an error status","HTML too short or empty — distillation returns minimal or empty data","max_tokens set too low — BM25 budget mode may truncate aggressively with little useful content","query missing when mode=budget — BM25 focusing has no target, may fall back to generic truncation","Invalid mode enum value — request rejected with validation error","Payment not provided or insufficient — HTTP 402 returned requiring x402 USDC payment"],"whenToPreferThis":"Choose this endpoint when you need to feed webpage content to an LLM but want to minimize token cost and noise — especially when a strict token budget matters (mode=budget with BM25 focusing lets you extract only the most query-relevant content). Prefer it over generic scrapers when you need ROI proof of token savings, or when you already have raw HTML and want to skip a network fetch. It is the right choice when you need structured JSON tables or a skeleton outline rather than raw HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:33:24.948Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-dom-stripper-bm25-budget-web-distillation-49a6c97b"}