{"uid":"cap_JNAzet4MOA6fDHKg-CLTE","slug":"mesh-agentdiet-dev-paywall-clean-web-distiller-with-bm25-budget-control-1b32d900","name":"Paywall-Clean 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://mesh.agentdiet.dev/v1/paywall-clean-extract)","url":"https://mesh.agentdiet.dev/v1/paywall-clean-extract?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_yRcI-D18z0MszEFoZhm-n","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mesh.agentdiet.dev","brandSlug":"mesh-agentdiet-dev-mpp","brandBaseUrl":"https://mesh.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or accepts raw HTML and distills it into clean Markdown, structured JSON, a skeleton outline, or a BM25-ranked token-budget excerpt","exampleAgentPrompt":"Can you fetch https://stripe.com/docs/payments and distill it into clean markdown, keeping the output under 2000 tokens using BM25 budget mode focused on the query 'payment intents'?","exampleUseCases":[{"title":"Research article distillation for LLM pipeline","prompt":"Pull this long news article at https://www.nytimes.com/2024/05/01/technology/ai-regulation.html and distill it into clean markdown so I can feed it to my summarizer without blowing my token budget."},{"title":"Token-budget excerpt for RAG context window","prompt":"I need to extract only the most relevant parts of https://docs.openai.com/guides/fine-tuning related to the query 'hyperparameter tuning' — please use budget mode and cap it at 1500 tokens."},{"title":"Structured data extraction from raw HTML","prompt":"I have this raw HTML from a product page and I want you to distill it into structured JSON tables — especially prices, specs, and metadata — without fetching anything from the web."}],"resultDescription":"Returns a JSON object containing: distilled content in the chosen format (Markdown text, structured JSON tables/metadata, skeleton outline, or BM25-ranked budget excerpt) under the 'data' key; an 'roi_proof' object showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved in USD; optional cache status (HIT/MISS) and billing details including fee charged.","failureModes":["URL is unreachable or returns a non-200 status — endpoint may return an error status","HTML payload is empty or malformed — distillation may fail or return minimal output","max_tokens is set too low relative to content size — output may be aggressively truncated","BM25 query is missing when mode=budget — may fall back to default behavior or return an error","Payment not provided or insufficient — returns HTTP 402 requiring x402 USDC payment","Rate limiting or upstream paywall blocks fetch — content may be unavailable"],"whenToPreferThis":"Choose this endpoint when you need to extract clean, token-efficient content from a URL or HTML blob for downstream LLM processing, especially when context window size or LLM cost is a concern. It is particularly valuable when you want BM25-ranked relevance filtering to surface only the most query-relevant passages within a strict token ceiling. Prefer it over generic web scrapers when you need structured JSON tables, skeleton outlines, or Markdown alongside token savings metrics. It supports both live URL fetching and offline raw HTML distillation, making it versatile for both real-time pipelines and pre-fetched content workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:33:10.106Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-paywall-clean-web-distiller-with-bm25-budget-control-1b32d900"}