{"uid":"cap_NH47hplEwT4Z_TqLtT2sG","slug":"defi-yield-agentdiet-dev-web-url-to-agent-ready-rag-chunks-bm25-f7a88699","name":"Web URL to Agent-Ready RAG Chunks (BM25 Budget Control)","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/rag-chunk)","url":"https://defi-yield.agentdiet.dev/v1/rag-chunk?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_M95P0yXAYAxf4kiYDqx1G","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 a webpage URL or raw HTML into compact, token-efficient Markdown, structured JSON, skeleton outlines, or BM25-focused budget excerpts for AI agent consumption.","exampleAgentPrompt":"Distill the content at https://stripe.com/docs/payments into compact markdown, keeping it under 800 tokens and focusing on 'payment intents'.","exampleUseCases":[{"title":"RAG pipeline web ingestion","prompt":"Grab the content from https://openai.com/blog/gpt-4-research and distill it into structured markdown under 600 tokens, focused on 'model capabilities', so I can feed it into my RAG pipeline."},{"title":"Competitor page skeleton for agent briefing","prompt":"Give me a skeleton outline of https://anthropic.com/claude — just the main headings and structure, no body text — so my agent gets a quick lay of the land without burning tokens."},{"title":"Financial doc table extraction","prompt":"Fetch https://sec.gov/cgi-bin/browse-edgar?action=getcompany and distill it into structured JSON tables so I can pull out the key filing metadata without parsing raw HTML myself."}],"resultDescription":"Returns a JSON object containing the distilled content in the requested format (Markdown text, structured JSON tables/metadata, skeleton outline, or BM25-ranked excerpt), plus an ROI proof block showing raw vs. distilled token counts, tokens saved, compression ratio percentage, LLM cost saved in USD, and a roi_multiplier. Also includes cache status (HIT/MISS) and billing details.","failureModes":["Invalid or unreachable URL returns an error status and no data","HTML too large or malformed may result in incomplete distillation","mode=budget without a query or max_tokens may produce suboptimal chunking","Rate limiting or payment failure (HTTP 402) blocks the request","Some pages behind authentication or bot-protection will not be fetchable","max_tokens set below 20 is rejected by schema validation"],"whenToPreferThis":"Choose this endpoint when you need to feed live web content into an LLM or RAG pipeline without blowing your token budget — especially when you need BM25-ranked relevance filtering, multiple output modes (markdown/structured/skeleton/budget), and a built-in ROI proof showing exactly how many tokens were saved. Prefer it over generic scrapers when token efficiency and agent-readiness (not raw HTML) are the primary goals.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:40.905Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-web-url-to-agent-ready-rag-chunks-bm25-f7a88699"}