{"uid":"cap_91WfT5mQz6hdpPYa_Pp0A","slug":"alpha-stream-agentdiet-dev-agentdiet-webpage-distiller-42f7e33c","name":"AgentDiet Webpage Distiller","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://alpha-stream.agentdiet.dev/v1/webpage-distiller)","url":"https://alpha-stream.agentdiet.dev/v1/webpage-distiller?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_C74DuzG_pISJhjc_oWeBp","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"alpha-stream.agentdiet.dev","brandSlug":"alpha-stream-agentdiet-dev-mpp","brandBaseUrl":"https://alpha-stream.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a web URL (or accepts raw HTML) and compresses it into compact, agent-ready tokens using markdown, structured JSON, skeleton outline, or BM25 budget-controlled extraction modes.","exampleAgentPrompt":"Grab https://stripe.com/docs/payments/checkout and distill it into compact markdown with a 500-token budget, focusing on the query 'how to create a payment session'.","exampleUseCases":[{"title":"Budget-capped research on a product page","prompt":"Fetch https://openai.com/pricing and distill it into markdown mode, keeping it under 300 tokens — I need just the key pricing tiers without all the fluff."},{"title":"Structured extraction of a news article","prompt":"Pull the article at https://techcrunch.com/2024/06/01/example-article and convert it to structured JSON tables so I can parse the headline, author, date, and main body cleanly."},{"title":"BM25-focused distillation of documentation","prompt":"Distill https://docs.anthropic.com/claude/reference/getting-started into budget mode with a max of 400 tokens, using the query 'authentication and API keys' so I only get the relevant section."}],"resultDescription":"Returns a JSON object containing the distilled content (markdown, structured JSON tables, skeleton outline, or BM25-excerpted text), a status field, ROI proof metrics (raw token count, distilled token count, tokens saved, compression ratio, estimated LLM cost saved), optional cache hit/miss info, and billing details including fee charged in USD.","failureModes":["Invalid or unreachable URL returns an error status","Raw HTML and URL both omitted triggers a validation error on required 'url' field","mode=budget without a query or max_tokens may return unfiltered or oversized output","Payment failure via x402 results in a 402 HTTP response and no content returned","Target page blocks automated fetching (e.g. bot protection) causing fetch failure","max_tokens set below 20 triggers schema validation error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to read web content but must stay within a token budget or minimize LLM costs — especially useful when raw HTML would overwhelm a context window. It is particularly strong when you need BM25-focused relevance filtering (query-targeted extraction) or structured JSON tables from web pages. Prefer it over generic scrapers when token efficiency and cost ROI metrics matter to your pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:59.953Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-agentdiet-webpage-distiller-42f7e33c"}