{"uid":"cap_mOiCDRHxjiRaUXIB1ca--","slug":"defi-yield-agentdiet-dev-web-url-distillation-bm25-budget-reader-ca2ffa21","name":"Web URL Distillation & BM25 Budget Reader","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://defi-yield.agentdiet.dev/v1/spa-markdown-reader)","url":"https://defi-yield.agentdiet.dev/v1/spa-markdown-reader?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_ezmYswg8gSGeFalla89gu","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches and distills any web URL or raw HTML into compact Markdown, structured JSON, outline skeleton, or BM25-focused token-budget excerpts for agent consumption","exampleAgentPrompt":"Can you fetch https://docs.stripe.com/payments and distill it into compact markdown using budget mode, focused on 'payment intents', keeping it under 2000 tokens?","exampleUseCases":[{"title":"LLM cost-efficient doc fetching","prompt":"Grab the content from https://developers.cloudflare.com/workers/runtime-apis/fetch/ and distill it into markdown — I want to feed it to my agent without burning through my token budget."},{"title":"BM25-focused webpage excerpt","prompt":"Fetch https://ethereum.org/en/defi/ and extract only the parts most relevant to 'yield farming risks' in budget mode with a max of 1500 tokens."},{"title":"Structured data extraction from HTML","prompt":"I have this raw HTML from a product page — can you distill it into structured JSON tables pulling out all the metadata and pricing info?"}],"resultDescription":"Returns a JSON object containing: distilled content (Markdown, structured JSON, skeleton outline, or BM25 excerpt) under `data`; an `roi_proof` object showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved in USD; optional `cache` metadata (HIT/MISS, latency); and `billing` details including fee charged.","failureModes":["Invalid or unreachable URL returns an error status","HTML payload too large may exceed processing limits","Budget mode without a query may return unfiltered content","max_tokens below minimum (20) rejected with validation error","SPA or JavaScript-heavy pages may not render fully","Rate limiting or payment failure (402) if agent lacks sufficient balance"],"whenToPreferThis":"Choose this endpoint when an agent needs to consume web content without overloading its context window — especially when token cost is a concern. Ideal for feeding live documentation, DeFi pages, or arbitrary URLs into an LLM pipeline with built-in compression telemetry. Prefer over raw fetch when you need BM25-focused excerpts, structured JSON extraction, or provable ROI on token savings.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:47.658Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-web-url-distillation-bm25-budget-reader-ca2ffa21"}