{"uid":"cap_Lrm7aPb-r23rCKQ2eyB9r","slug":"domain-osint-agentdiet-dev-web-url-distillation-bm25-budget-extract-53c8a72c","name":"Web URL Distillation & BM25 Budget Extract","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/paywall-clean-extract)","url":"https://domain-osint.agentdiet.dev/v1/paywall-clean-extract?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_zXvVTsqtjD0s5ccchIEdS","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 a webpage URL (or raw HTML) and compresses it into compact, agent-ready tokens using configurable distillation modes including BM25-focused budget extraction","exampleAgentPrompt":"Can you fetch https://stripe.com/docs/payments/accept-a-payment and distill it into clean Markdown, keeping it under 1500 tokens and focusing on the query 'payment intent flow'?","exampleUseCases":[{"title":"Token-budget web research for agents","prompt":"Grab https://openai.com/research/gpt-4 and compress it into budget mode with max 800 tokens, focused on the query 'model capabilities and benchmarks' — I need it compact enough to fit in my context window."},{"title":"Structured data extraction from a product page","prompt":"Distill https://aws.amazon.com/ec2/pricing/ in structured mode so I get the pricing tables and metadata as clean JSON, not the full noisy HTML."},{"title":"Skeleton outline of a long documentation page","prompt":"Fetch https://docs.python.org/3/library/asyncio.html and give me a skeleton outline so I can quickly see all the headings and sections without loading 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-trimmed excerpt), along with roi_proof metrics (raw_tokens, distilled_tokens, tokens_saved, compression_ratio_pct, llm_cost_saved_usd, roi_multiplier), optional cache status (HIT/MISS), and billing details including fee charged in USD.","failureModes":["Invalid or unreachable URL returns an error status","Paywalled pages may not be fully extractable despite the endpoint name","max_tokens below 20 is rejected by schema validation","BM25 query provided without mode=budget may be ignored","Raw HTML too large may hit server-side limits","Payment not processed (402) if x402 billing is not configured","Malformed URL schema causes fetch failure"],"whenToPreferThis":"Choose this endpoint when you need to read and compress a webpage into your LLM context window efficiently, especially when token cost is a concern. It is superior to naive full-page fetches when you have a BM25 focus query to filter content or a strict token budget. Prefer over generic scrapers when you need Markdown, structured JSON, or skeleton outline output with built-in compression metrics. Ideal for autonomous agents that need to ingest web content without blowing their context budget.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:21.130Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-web-url-distillation-bm25-budget-extract-53c8a72c"}