{"uid":"cap_bTrAbfV0JBGsmSzXCfrrT","slug":"agentdiet-dom-stripper-context-window-token-compressor-b7cae17d","name":"AgentDiet DOM Stripper — Context Window Token Compressor","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.","url":"https://rag-diet.agentdiet.dev/v1/dom-stripper?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","POST"],"type":"string"},"queryParams":{"type":"object","properties":{"url":{"type":"string"},"mode":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","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":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_U4_UYIFf8U-ypjKgAAkM_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Strips and compresses HTML/DOM content from a URL to reduce token usage by up to 91% for AI context windows","exampleAgentPrompt":"Strip and compress the HTML from https://example.com/article using GET mode so I get just the clean, token-efficient text — I need to fit it into my AI context window without burning tokens on nav menus and boilerplate.","exampleUseCases":[{"title":"RAG pipeline web content ingestion","prompt":"Before I index this page into my vector store, strip all the HTML noise from https://docs.somelib.io/getting-started and give me just the clean distilled text — I want to minimize embedding costs."},{"title":"Agent browsing on a token budget","prompt":"I need to read https://news.ycombinator.com/item?id=12345 but my context window is almost full — can you run it through the DOM stripper and give me the compressed version so I only use the tokens that matter?"},{"title":"LLM grounding with live web data","prompt":"Fetch and compress https://en.wikipedia.org/wiki/Retrieval-augmented_generation for me using GET — I want the highest possible compression so I can paste the result straight into my prompt without hitting the token limit."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled/compressed content, a 'status' field ('ok' on success), and an 'roi_proof' object showing the compression_ratio_pct achieved (e.g. 91.4% token reduction).","failureModes":["Invalid or unreachable URL returns error status","Unsupported content type (non-HTML) may yield poor compression or error","Rate limit or payment failure (x402) if USDC payment not settled","Timeout on slow-loading target pages","Empty or near-empty page yields low compression ratio"],"whenToPreferThis":"Choose this endpoint when you need to feed live web content into an LLM or RAG pipeline and want to aggressively reduce token count before passing content downstream. It is especially useful when context windows are constrained, when scraping many pages on a token budget, or when building agent workflows that must access web content cheaply. Prefer it over raw HTML fetching or generic text extractors when you need a provable compression ratio and structured JSON output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:02.693Z","isFirstParty":false,"canonicalSlug":"agentdiet-dom-stripper-context-window-token-compressor-b7cae17d"}