# Agent Tools Document Extract

> Agent Tools Document Extract is a paid API for AI agents from agent-tools.jbarkules.workers.dev, paid per call via x402, $0.006/call, status unknown (last checked 2026-10-28).

Extracts full text and structured fields (dates, amounts, invoice numbers, tables, contacts) from a PDF or image URL using OCR where needed

## Facts

- Endpoint: GET https://agent-tools.jbarkules.workers.dev/v1/document/extract?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-tools-document-extract-08f116e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ha5k3cBDkotx66zIjgIiM

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 agent-tools-document-extract-08f116e6
```

Example prompt: Can you parse this invoice PDF at https://example.com/invoice-1234.pdf and pull out the invoice number, date, line items, subtotal, tax, and amount due?

## When to prefer this

Use this endpoint when you need to extract structured data from a document at a URL — especially invoices, receipts, statements, or scanned forms — in a single API call without managing OCR pipelines separately. Prefer this over raw PDF-to-text endpoints when you need structured fields (amounts, dates, invoice numbers) automatically identified, not just raw text. Choose over upload-based endpoints when you already have a public URL for the document.

## Known failure modes

- URL is not publicly accessible (returns error or empty result)
- PDF is password-protected or encrypted (cannot extract text)
- Image quality too low for reliable OCR (partial or garbled text returned)
- URL points to an unsupported file type (error response)
- Document has no machine-readable or recognizable text (empty extraction)
- Network timeout fetching large documents

## How this service works

One call document parsing for invoices, receipts, statements, forms and scanned pages: PDF or image URL in, full text plus extracted fields out (dates, money amounts, totals/tax/amount due, invoice or order numbers, key: value pairs, emails, phones, URLs, simple tables). Images and scans use OCR.

## Output

Returns full extracted text from the document along with structured fields: dates, monetary amounts (subtotal, tax, total, amount due), invoice or order numbers, email addresses, phone numbers, URLs, simple tables, and arbitrary key-value pairs detected in the document. Scanned images and image-based PDFs are processed through OCR first.

## 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": "Public PDF or image URL"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "pdf",
  "text": "INVOICE\nInvoice #: INV-1042\nDate: 2026-10-01\nTotal: $1,250.00",
  "pages": 1,
  "fields": {
   "urls": [],
   "dates": [
    "2026-10-01"
   ],
   "emails": [],
   "phones": [],
   "tables": [],
   "totals": [
    {
     "label": "total",
     "value": "$1,250.00"
    }
   ],
   "amounts": [
    "$1,250.00"
   ],
   "key_values": {
    "Date": "2026-10-01",
    "Invoice": "INV-1042"
   },
   "identifiers": [
    "Invoice #: INV-1042"
   ]
  },
  "characters": 1840
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-tools-document-extract-08f116e6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-tools.jbarkules.workers.dev](https://www.zero.xyz/host/agent-tools.jbarkules.workers.dev/llms.txt)
