{"uid":"cap_t9100ag78-e4wwx6fopZ0","slug":"shopify-intel-agentdiet-dev-bm25-budget-controlled-url-html-distiller-50e5dc6f","name":"BM25 Budget-Controlled URL & HTML Distiller","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://shopify-intel.agentdiet.dev/v1/spa-markdown-reader)","url":"https://shopify-intel.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_VZXArGG1eOSPFMuqyrOLH","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"shopify-intel.agentdiet.dev","brandSlug":"shopify-intel-agentdiet-dev-mpp","brandBaseUrl":"https://shopify-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or accepts raw HTML and distills it into compact, agent-ready Markdown, structured JSON, a skeleton outline, or a BM25-ranked token-budget excerpt","exampleAgentPrompt":"Fetch https://shopify.dev/docs/api/storefront and distill it into compact markdown using budget mode, focused on 'authentication tokens', keeping the output under 800 tokens so I can use it without blowing my context window.","exampleUseCases":[{"title":"Token-safe competitor research from live URLs","prompt":"Grab https://stripe.com/docs/payments/checkout and distill it in budget mode with the query 'payment session creation', capped at 600 tokens — I need just the relevant bits for my agent without eating my whole context."},{"title":"Structured JSON extraction from a product page","prompt":"Distill https://shopify.com/enterprise into structured mode and give me JSON tables with the key pricing tiers, features, and metadata — I want clean data I can compare programmatically."},{"title":"Skeleton outline of a long documentation page","prompt":"Fetch https://docs.github.com/en/actions/using-workflows and return a skeleton outline of the page structure so I can quickly navigate what sections exist before deciding which to read in full."}],"resultDescription":"Returns a JSON object containing the distilled content in the requested mode (Markdown string, structured JSON tables/metadata, skeleton outline, or BM25-ranked excerpt), along with ROI proof metrics (raw token count, distilled token count, tokens saved, compression ratio percentage, estimated LLM cost saved in USD, and ROI multiplier), billing details, and cache hit/miss status with latency.","failureModes":["URL is unreachable or returns non-200 — fetch fails and an error status is returned","HTML content is empty or unparseable — distillation yields empty or minimal output","max_tokens ceiling too low to capture any meaningful content — truncated or empty excerpt","BM25 query does not match any content — budget mode returns empty or low-relevance results","Payment not provided or invalid — HTTP 402 returned blocking execution","Invalid mode enum value — request rejected with schema validation error"],"whenToPreferThis":"Choose this endpoint when you need to ingest a live web page or raw HTML into an agent pipeline while strictly controlling token consumption. It is especially valuable when mode=budget is combined with a BM25 query to retrieve only the most relevant passage from a large document within a hard token ceiling. Prefer it over generic web scrapers when you need built-in compression ROI metrics, structured JSON extraction, or skeleton outlines — and when you are operating under tight context-window constraints. It is distinct from plain markdown distillers by virtue of its BM25 relevance-ranking and per-call token budget enforcement.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:34:35.836Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-bm25-budget-controlled-url-html-distiller-c4b755d8"}