# Web URL Article Extractor & Token Distiller

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

Fetches a web URL and distills it into compact, agent-ready tokens in multiple formats (markdown, structured, skeleton, or BM25 budget excerpt) to reduce LLM context costs.

## Facts

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

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 onchain-risk-agentdiet-dev-web-url-article-extractor-token-distiller-0c95d9b2
```

Example prompt: Can you distill https://stripe.com/docs/payments/accept-a-payment into compact markdown tokens so I can read the key content without blowing my context window?

## When to prefer this

Choose this endpoint when an AI agent needs to ingest web page content but must stay within a strict token budget, or when raw HTML/full page content would be too expensive to process with an LLM. It is especially useful for RAG pipelines, research agents, or any workflow where multiple pages need to be read efficiently. The budget mode with BM25 query focusing makes it superior to generic scrapers when only a targeted section of a page is needed.

## Known failure modes

- URL is unreachable or returns a non-200 status — endpoint may return an error status
- URL points to a paywalled or bot-blocked page — content may be empty or partial
- mode=budget used without a query parameter — BM25 ranking has no focus signal
- max_tokens set too low — may produce empty or truncated output
- URL is not a valid HTTP/HTTPS URL and not a builtin:// alias — schema validation failure
- Payment not provided or invalid — HTTP 402 returned blocking the request

## How this service works

Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://onchain-risk.agentdiet.dev/v1/article-extractor)

## Output

Returns a JSON object with a 'data' field containing the distilled content in the requested format (markdown text, structured JSON tables/metadata, skeleton outline, or BM25-focused excerpt), plus an 'roi_proof' object showing raw vs distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved in USD. Also includes cache status (HIT/MISS) and billing details.

## Request schema (JSON Schema)

```json
{
 "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"
  },
  "query": {
   "type": "string",
   "description": "BM25 focus query when mode=budget"
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 20,
   "description": "Strict token 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/onchain-risk-agentdiet-dev-web-url-article-extractor-token-distiller-0c95d9b2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchain-risk.agentdiet.dev](https://www.zero.xyz/host/onchain-risk.agentdiet.dev/llms.txt)
