# Web URL DOM Stripper & Token Distiller

> Web URL DOM Stripper & Token Distiller is a paid API for AI agents from domain-osint.agentdiet.dev, paid per call via MPP, $0.001/call, status unknown (last checked 2026-10-21).

Fetches a webpage (or accepts raw HTML) and distills it into compact, agent-ready tokens using BM25 budget control and multiple extraction modes

## Facts

- Endpoint: GET https://domain-osint.agentdiet.dev/v1/dom-stripper?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: domain-osint.agentdiet.dev
- Website: https://domain-osint.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/domain-osint-agentdiet-dev-web-url-dom-stripper-token-distiller-a76910be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Aj8Lz03wxevlK7r3I2NAw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability domain-osint-agentdiet-dev-web-url-dom-stripper-token-distiller-a76910be
```

Example prompt: Fetch the Stripe pricing page at https://stripe.com/pricing and distill it into compact markdown, keeping it under 500 tokens and focusing on the query 'payment fees'.

## When to prefer this

Choose this endpoint when an AI agent needs to read a webpage but must stay within a strict token budget, reduce LLM inference costs, or convert messy HTML into clean structured content. It is especially valuable when processing documentation pages, landing pages, or research articles where only the essential textual content is needed. Prefer it over generic web scrapers when you need built-in token compression metrics and BM25-driven relevance filtering.

## Known failure modes

- URL is unreachable or returns a non-200 status — distillation fails with an error status
- Raw HTML input is malformed or empty — may produce empty or low-quality output
- max_tokens set too low (below 20) — request rejected with validation error
- BM25 query provided without mode=budget — query parameter ignored silently
- Payment not included or insufficient — HTTP 402 response blocking the call
- Target URL requires JavaScript rendering — static fetch may miss dynamic content

## How this service works

Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://domain-osint.agentdiet.dev/v1/dom-stripper)

## Output

Returns a data object containing the distilled content (Markdown text, structured JSON, skeleton outline, or BM25-focused excerpt depending on mode), along with ROI proof metrics (raw token count, distilled token count, tokens saved, compression ratio, estimated LLM cost saved), optional cache hit/miss status, and billing details.

## Request schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/domain-osint-agentdiet-dev-web-url-dom-stripper-token-distiller-a76910be/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from domain-osint.agentdiet.dev](https://www.zero.xyz/host/domain-osint.agentdiet.dev/llms.txt)
