{"uid":"cap_5WB2RLacyqLsLJMF7wq9v","slug":"serp-extract-agentdiet-dev-web-url-context-trimmer-distiller-abd39cb3","name":"Web URL Context Trimmer & Distiller","description":"Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://serp-extract.agentdiet.dev/v1/context-trimmer)","url":"https://serp-extract.agentdiet.dev/v1/context-trimmer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"Target webpage URL to distill (or builtin://stripe-docs)"},"mode":{"enum":["markdown","structured","skeleton","budget"],"type":"string","default":"markdown","description":"Extraction mode: markdown, structured, skeleton, or budget"},"limit":{"type":"integer","default":20,"maximum":100,"minimum":1,"description":"Maximum number of items to return per page (1-100)"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"cursor":{"type":"string","description":"Opaque pagination cursor for fetching the next page"},"max_tokens":{"type":"integer","minimum":20,"description":"Strict token 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_jNXrgQyxng_f5e5-9tfcR","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a webpage URL (or raw HTML) and compresses it into compact, agent-ready tokens using BM25 budget control and multiple distillation modes","exampleAgentPrompt":"Distill the content at https://docs.stripe.com/payments/payment-intents into compact markdown — use budget mode with a 1500 token ceiling and focus on 'payment intent lifecycle' so I can pass it to another model without blowing my context window.","exampleUseCases":[{"title":"Trimming docs page for LLM grounding","prompt":"Fetch https://docs.openai.com/guides/function-calling and distill it into clean markdown under 2000 tokens so I can include it in my system prompt without exceeding my context limit."},{"title":"Focused BM25 extraction from a news article","prompt":"I need the most relevant sections from https://techcrunch.com/2025/05/10/ai-agent-funding — use budget mode with a max of 800 tokens and focus the BM25 query on 'agent infrastructure investment'."},{"title":"Structured data extraction from a product page","prompt":"Pull https://www.anthropic.com/pricing and return a structured JSON table of all the pricing tiers and token costs — I need clean data I can compare programmatically."}],"resultDescription":"Returns a distilled version of the webpage in the requested mode (markdown, structured JSON, skeleton outline, or BM25 budget excerpt), along with an roi_proof object showing raw token count, distilled token count, tokens saved, compression ratio percentage, estimated LLM cost saved in USD, and an ROI multiplier. Also includes cache hit/miss status and billing details.","failureModes":["Invalid or unreachable URL returns an error status","max_tokens below minimum of 20 is rejected","mode=budget without a query may return unfiltered budget excerpt","Raw HTML too large may time out or be truncated","Paywalled or JavaScript-rendered pages may return incomplete content","Missing required url parameter returns validation error"],"whenToPreferThis":"Choose this endpoint when you need to pass web page content to an LLM but want to minimize token usage and cost — especially when working with long documentation pages, news articles, or product pages. The BM25 budget mode is uniquely useful when you have a specific query focus and a hard token ceiling. Prefer this over general-purpose scrapers when compression ratio and token savings are first-class concerns, or when you want structured JSON tables extracted rather than raw HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:52.417Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-web-url-context-trimmer-distiller-abd39cb3"}