{"uid":"cap_ztVhZbu5DjRZ9p63npQmD","slug":"x402broker-com-web-url-context-compressor-bm25-budget-control-b83c932d","name":"Web URL Context Compressor (BM25 Budget Control)","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://x402broker.com/v1/context-compress)","url":"https://x402broker.com/v1/context-compress?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_gpbu8ESsCOoM0zWtS9iGS","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402broker.com","brandSlug":"x402broker-com-mpp","brandBaseUrl":"https://x402broker.com","brandDocsUrl":null,"whatItDoes":"Fetches and distills a web URL or raw HTML into compact, agent-ready tokens using configurable modes including BM25 budget-controlled excerpts","exampleAgentPrompt":"Can you distill https://stripe.com/docs/api into compact markdown and keep it under 2000 tokens using budget mode, focused on payment intents?","exampleUseCases":[{"title":"Documentation page for agent RAG","prompt":"Distill the Stripe API docs at https://stripe.com/docs/api into clean structured markdown so I can feed just the relevant parts into my agent — use budget mode, focus on 'webhooks', and cap it at 1500 tokens."},{"title":"Token-efficient news article summarization","prompt":"Fetch https://techcrunch.com/2025/01/15/some-article and distill it into skeleton mode so I get just the outline and key headings without blowing my context window."},{"title":"Competitor landing page extraction","prompt":"Grab https://openai.com/pricing and convert it into structured JSON tables mode so I can parse out all the pricing tiers and model details cleanly for my competitive analysis."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled content (Markdown, structured tables, skeleton, or BM25 excerpt depending on mode), plus an 'roi_proof' object showing raw vs distilled token counts, tokens saved, compression ratio percentage, and estimated LLM cost saved in USD. Also includes cache status (HIT/MISS) and billing details.","failureModes":["URL is unreachable or returns non-200 status — endpoint may return an error status","HTML payload too large or malformed — distillation may fail or truncate","max_tokens set below minimum of 20 — schema validation error","BM25 query provided without mode=budget — query may be ignored","Rate limiting or payment failure via x402 — HTTP 402 returned if funds insufficient","URL behind authentication/paywalls — fetched content may be login page instead of target"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to read a web page but must stay within a token budget, or when raw HTML is too noisy and verbose for direct LLM consumption. It is especially valuable when using BM25 mode to focus on a specific topic within a large document, or when structured/skeleton modes are needed to extract tables and outlines efficiently. Prefer it over raw web scraping when token cost reduction and LLM-ready output formatting matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:14.854Z","isFirstParty":false,"canonicalSlug":"x402broker-com-web-url-context-compressor-bm25-budget-control-b83c932d"}