{"uid":"cap_cDRs6KiWDK7IBqSmqVjEX","slug":"polymarket-odds-agentdiet-dev-web-url-html-distiller-with-bm25-budget-c7aef7ca","name":"Web URL & HTML 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/spa-markdown-reader)","url":"https://polymarket-odds.agentdiet.dev/v1/spa-markdown-reader?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_Pof5GyxiAjqN30nA2zH6Y","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 URL or raw HTML into compressed Markdown, structured JSON, skeleton outline, or BM25-focused token-budgeted excerpts","exampleAgentPrompt":"Pull the content from https://example.com/article and distill it into clean markdown using budget mode, focusing on 'AI regulation policy' and keep it under 2000 tokens.","exampleUseCases":[{"title":"Token-efficient research on live articles","prompt":"Fetch https://techcrunch.com/2024/06/01/openai-new-model and distill it into budget mode focused on 'model capabilities benchmarks' — keep the output under 1500 tokens so I don't blow my context window."},{"title":"Structured data extraction from a product page","prompt":"Grab the page at https://stripe.com/pricing and distill it in structured mode so I get clean JSON tables of their pricing tiers and features."},{"title":"Skeleton outline of a long documentation page","prompt":"Load https://docs.anthropic.com/en/docs/overview and give me a skeleton outline of the page so I can quickly navigate its structure."}],"resultDescription":"Returns a distilled representation of the target page in the requested format (Markdown, structured JSON, skeleton, or BM25 budget excerpt), plus an roi_proof block showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved in USD. Also includes cache status (HIT/MISS) and billing details.","failureModes":["Invalid or unreachable URL returns fetch error","JavaScript-heavy SPA may not fully render if not supported","Token budget too small (below 20) rejected with validation error","Malformed HTML payload may produce incomplete distillation","Rate limiting or payment failure returns 402 or auth error","BM25 query missing when mode=budget may fall back to default behavior"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to read a live webpage but wants to minimize token consumption — especially in budget mode with a BM25 query to extract only the most relevant content. Ideal when processing SPA pages, long documentation, or e-commerce listings where raw HTML would be prohibitively expensive to pass to an LLM. Prefer over generic scrapers when token cost control and compression ROI metrics matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:34:02.946Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-web-url-html-distiller-with-bm25-budget-4bf922b2"}