{"uid":"cap_b6cG1SOBZWr1GnLvYwTJz","slug":"polymarket-odds-agentdiet-dev-web-distiller-with-bm25-budget-control-d9fabe98","name":"Web Distiller 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://polymarket-odds.agentdiet.dev/v1/web-scrape)","url":"https://polymarket-odds.agentdiet.dev/v1/web-scrape?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_Rt1iDTTqwWBRYJ22vay2m","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"polymarket-odds.agentdiet.dev","brandSlug":"polymarket-odds-agentdiet-dev-mpp","brandBaseUrl":"https://polymarket-odds.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches and distills a webpage URL (or raw HTML) into Markdown, structured data, skeleton, or a BM25-ranked token-budget excerpt","exampleAgentPrompt":"Fetch the page at https://example.com/article and distill it into markdown using budget mode focused on 'machine learning benchmarks', keeping it under 500 tokens.","exampleUseCases":[{"title":"Focused research from a news article","prompt":"Pull the article at https://techcrunch.com/2024/05/01/ai-agents-explainer and distill it in budget mode, focused on 'autonomous agents', capped at 800 tokens — I just want the most relevant bits without reading the whole thing."},{"title":"Structured data extraction from a product page","prompt":"Scrape https://store.example.com/products/laptop-pro and give me the structured output — I need the product name, price, variants, and specs as JSON tables."},{"title":"Skeleton outline of a long documentation page","prompt":"Take the page at https://docs.openai.com/api-reference and extract just a skeleton outline so I can see the structure without getting all the detail."}],"resultDescription":"Returns a 'data' object containing the distilled content in the requested mode (Markdown text, structured JSON tables/metadata, skeleton outline, or BM25-ranked excerpt), along with an 'roi_proof' block showing raw token count, distilled token count, tokens saved, compression ratio percentage, LLM cost saved in USD, and an ROI multiplier. Also includes cache status (HIT/MISS) and billing details.","failureModes":["URL is unreachable or returns non-200 — fetch failure with error status","Invalid or malformed URL provided — validation error","max_tokens below minimum of 20 — schema validation error","mode=budget used without a query parameter — missing required context for BM25 ranking","Raw HTML provided is empty or unparseable — distillation returns empty or error","Payment not attached or insufficient — HTTP 402 payment required","Rate limiting or upstream timeout on slow pages"],"whenToPreferThis":"Choose this endpoint when you need to ingest web content within a strict token budget, especially when BM25-ranked relevance filtering is important (mode=budget with a query). It is the right choice when you want to avoid sending raw HTML to an LLM and instead get a pre-compressed, cost-efficient distillation. Prefer it over general-purpose scrapers when you need ROI/compression metrics alongside the content, or when you already have raw HTML and want it distilled without a network fetch.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:40:33.368Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-web-distiller-with-bm25-budget-control-88cc6087"}