# Extract API - Web & Document Extraction

> Extract API - Web & Document Extraction is a paid API for AI agents from extract-x402.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-20).

Extracts text and metadata from any publicly accessible web page or document URL, returning cleaned text, word count, and processing stats.

## Facts

- Endpoint: GET https://extract-x402.vercel.app/v1/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extract-api-web-document-extraction-33e1734a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ec6cdEPubVPEr0kKjBFdp

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 extract-api-web-document-extraction-33e1734a
```

Example prompt: Can you extract all the readable text from this page — https://example.com/article/ai-trends — so I can summarize it?

## When to prefer this

Use this endpoint when you need clean, readable text extracted from a single publicly accessible URL — web page or document — quickly and cheaply ($0.01 per call). Prefer this over the render/screenshot endpoints when you only need text content, not a visual representation. Use the batch endpoint instead when processing 10+ URLs at once for cost efficiency ($0.05 per 10 URLs).

## Known failure modes

- URL is not publicly accessible or requires authentication — returns error
- URL points to a non-extractable resource (e.g. binary, media file) — returns error or empty text
- Page uses heavy JavaScript rendering that the basic extract endpoint cannot process — may return incomplete text
- Network timeout fetching the target URL — returns timeout error
- Invalid or malformed URL supplied — returns validation error

## How this service works

Paid web & document extraction (single or batch), rendering, screenshots, URL-to-PDF and site intelligence for AI agents. Payment via x402 (HTTP 402) in USDC on Base (eip155:8453). $0.01 per extract/sitemap/feed, $0.02 per render/screenshot/pdf, $0.03 per site-intel, $0.05 per 10-URL batch.

## Output

Returns a JSON object containing the extracted plain text, document type (e.g. 'pdf', 'html'), total byte size, page count (for multi-page documents), word count, and processing time in milliseconds.

## Request schema (JSON Schema)

```json
{
 "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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Absolute http(s) URL of the page or file to extract"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Extracted text...",
  "type": "pdf",
  "bytes": 912344,
  "pages": 12,
  "wordCount": 5400,
  "processingMs": 640
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extract-api-web-document-extraction-33e1734a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from extract-x402.vercel.app](https://www.zero.xyz/host/extract-x402.vercel.app/llms.txt)
