{"uid":"cap_ioX3fLhJ4n23WXwWDjjF1","slug":"agentdiet-semantic-html-pruner-35049431","name":"AgentDiet Semantic HTML Pruner","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/semantic-html-pruner?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_OaMnkaRpo2NGhGeIS73Po","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 pages to semantically relevant content only, reducing token usage by up to 91% for AI context windows","exampleAgentPrompt":"Strip all the noise from https://example.com/article using a GET request and give me just the semantic content so I'm not burning tokens on nav bars, ads, and scripts.","exampleUseCases":[{"title":"RAG pipeline token cost reduction","prompt":"Before I embed this product page at https://shop.example.com/item/123 into my vector store, can you prune it down to just the meaningful HTML content so I'm not wasting embedding tokens on boilerplate?"},{"title":"Agent web research context compression","prompt":"I need you to fetch https://en.wikipedia.org/wiki/Artificial_intelligence and strip it down to only the semantically important content — I want to fit it in my context window without blowing my token budget."},{"title":"LLM summarization pre-processing","prompt":"Before summarizing the news article at https://techcrunch.com/2024/05/01/some-article, run it through the HTML pruner so the model only sees relevant text and not all the sidebar junk and tracking scripts."}],"resultDescription":"A JSON object with status 'ok', a data field containing the pruned semantic content of the target page, and an roi_proof object showing the compression_ratio_pct (e.g. 91.4%) achieved by removing non-semantic HTML noise.","failureModes":["Invalid or unreachable URL returns an error status","URL behind authentication or paywalls returns empty or partial content","Pages with heavy JavaScript rendering may not yield full semantic content since it is a GET-based fetch","Missing required 'url' query parameter results in a bad request error","Payment failure via x402/USDC causes 402 response before content is returned"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to fetch and use web page content but wants to minimize token consumption — especially for RAG ingestion, LLM summarization pipelines, or agentic browsing where context window space is at a premium. It is particularly valuable over raw HTML fetchers when the downstream consumer is an LLM that charges per token or has limited context. Best for static or server-rendered HTML pages where semantic pruning can reliably strip navigation, ads, scripts, and boilerplate.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:59.947Z","isFirstParty":false,"canonicalSlug":"agentdiet-semantic-html-pruner-35049431"}