# HydraTrader Document Extract

> HydraTrader Document Extract is a paid API for AI agents from x402.hydratrader.ai, paid per call via x402, $0.3/call, status unknown (last checked 2026-10-11).

Extracts structured JSON fields from a PDF or document into a caller-defined schema, returning each field with a verified source quote and page number

## Facts

- Endpoint: POST https://x402.hydratrader.ai/v1/document-extract?utm_source=zero.xyz
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hydratrader-document-extract-31b9401d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SG_qi2CMC9HLckiS4K7_z

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 hydratrader-document-extract-31b9401d -d '<json body>'
```

Example prompt: Pull these fields from this annual report PDF at https://example.com/annual-report-2024.pdf — company name, total revenue, net income, CEO name, and headquarters address — and give me a verified quote and page number for each field.

## When to prefer this

Choose this endpoint when you need to extract specific, named fields from a text-based PDF or document and require verifiable source citations (quote + page number) for each extracted value. It is ideal for compliance, auditing, legal, or research workflows where traceability matters. Prefer it over generic LLM extraction when you need a structured JSON schema output with provenance. Not suitable for scanned/image PDFs, documents behind authentication, or sources requiring OCR.

## Known failure modes

- PDF is scanned/image-only (no text layer) — OCR not supported, returns error
- Source URL requires login, paywall, or authentication — cannot access, returns error
- Document exceeds 40 pages and no page range is specified — returns validation error
- Schema has more than 40 top-level properties — rejected
- URL is not publicly accessible or times out — returns fetch error
- Pasted text exceeds 160,000 character limit — returns validation error
- Requested fields are not present in the document — fields return null
- PDF is malformed or corrupted — returns parse error

## How this service works

Extract fields from a PDF or long document into JSON matching your schema. Every returned field carries a source quote and page number, checked against the document text; fields whose quote isn't found are dropped, not guessed. Input: public PDF/HTML URL or pasted text, up to 40 pages. Use for invoices, spec sheets, RFPs, filings. Not for scanned/image PDFs (no OCR), login/paywalled sources, or financial/legal advice. Errors aren't charged. No API key.

## Output

A JSON object matching the caller's provided schema, where each top-level field is populated with the extracted value plus a source_quote (verbatim text from the document) and page_number indicating where the value was found. Fields that cannot be located return null with an appropriate note.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pages": {
   "type": "string",
   "description": "Optional PDF page selection like '1-20,25' (≤40 pages; required when the PDF has >40 pages)"
  },
  "schema": {
   "type": "object",
   "description": "JSON Schema (type=object) for the record you want; 1–40 top-level properties; nested objects/arrays allowed"
  },
  "source": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "url": {
     "type": "string",
     "pattern": "^https?://",
     "description": "Public http(s) PDF, HTML or text URL (type=public_url); ≤10 MB"
    },
    "text": {
     "type": "string",
     "maxLength": 160000,
     "description": "Pasted document text (type=text)"
    },
    "type": {
     "enum": [
      "text",
      "public_url"
     ],
     "type": "string"
    }
   }
  },
  "client_ref": {
   "type": "string"
  },
  "instructions": {
   "type": "string",
   "maxLength": 1000,
   "description": "Optional formatting hints (e.g. 'amounts in USD')"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hydratrader-document-extract-31b9401d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.hydratrader.ai](https://www.zero.xyz/host/x402.hydratrader.ai/llms.txt)
