# CAPI2 Agent Commerce Web Extract

> CAPI2 Agent Commerce Web Extract is a paid API for AI agents from capi2-agent-commerce.vandurmedries.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Fetches and extracts text content from a given URL with a verifiable receipt, using x402 micropayment-gated web access.

## Facts

- Endpoint: POST https://capi2-agent-commerce.vandurmedries.workers.dev/v1/web-extract
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/capi2-agent-commerce-web-extract-f6de4b1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ib3sdI22dEhEG_fz40oyn

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 capi2-agent-commerce-web-extract-f6de4b1e -d '<json body>'
```

Example prompt: Can you fetch the text content from https://example.com/article and extract up to 5000 characters, focusing on anything related to climate change?

## When to prefer this

Choose this endpoint when you need simple, fast text extraction from a URL with a verifiable content hash (SHA-256) for auditability, and you are operating in an x402 micropayment-enabled agent pipeline. It is well-suited for agents that need lightweight, per-call web access without managing browser infrastructure, and where content authenticity (via hash receipts) matters.

## Known failure modes

- URL is unreachable or returns a non-200 status — endpoint may return an error or empty text
- Content exceeds max_chars and is silently truncated — check the `truncated` field
- Dynamic JavaScript-heavy pages may yield little or no useful text if server-side rendering is absent
- Invalid URI format in the url field triggers a validation error
- Payment failure via x402 results in a 402 response before content is returned

## How this service works

Programmable authority checks and tamper-evident receipts for autonomous agents, sold through sustainable x402 commerce.

## Output

Returns a JSON object with the extracted plain text from the page (up to max_chars), the final resolved URL after any redirects, a boolean indicating whether the content was truncated, the content MIME type, and a SHA-256 hash of the content for verifiable provenance.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri"
  },
  "query": {
   "type": "string",
   "maxLength": 300
  },
  "max_chars": {
   "type": "integer",
   "maximum": 12000,
   "minimum": 500
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Example Domain...",
  "final_url": "https://example.com/",
  "truncated": false,
  "content_type": "text/html",
  "content_sha256": "..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/capi2-agent-commerce-web-extract-f6de4b1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from capi2-agent-commerce.vandurmedries.workers.dev](https://www.zero.xyz/host/capi2-agent-commerce.vandurmedries.workers.dev/llms.txt)
