# PDF Data Extraction API

> PDF Data Extraction API is a paid API for AI agents from api.strale.io, paid per call via x402, $0.324/call, status unknown (last checked 2026-09-13, last successful call 2026-04-30).

Extracts structured JSON data from PDF documents (via URL or base64) based on natural-language extraction instructions

## Facts

- Endpoint: POST https://api.strale.io/x402/pdf-extract
- Price: $0.324/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Last successful call: 2026-04-30
- Success rate: 100% of calls made through Zero
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-e9fbdeba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xmQD3VO4pO2nKakSKlZEl

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 api-strale-io-e9fbdeba -d '<json body>'
```

Example prompt: Extract the vendor name, invoice number, line items, and total amount from this PDF invoice — here's the URL: https://example.com/invoice-2024-05.pdf

## When to prefer this

Use this endpoint when you need to extract specific structured data from a PDF document and want to specify what to extract in natural language. It is ideal for invoices, contracts, reports, and forms where you know the fields you need but the document is not already machine-readable. Prefer this over generic OCR tools when you need JSON output with named fields rather than raw text.

## Known failure modes

- PDF URL is inaccessible or returns a non-PDF file — likely a 4xx or error JSON
- Base64 input is malformed or not a valid PDF — extraction fails with an error
- PDF is scanned/image-only with no text layer — extraction may return empty or incomplete results
- Extraction instructions are too vague — output may be incomplete or mismatched
- PDF is password-protected — unable to parse content
- File too large — may timeout or exceed processing limits

## How this service works

Extract structured data from any PDF document. Accepts a URL or base64-encoded PDF. Works on contracts, reports, forms — any document type. Returns JSON based on your extraction instructions. SQS: 98/100.

## Output

A JSON object containing the structured data extracted from the PDF, with fields corresponding to the extraction instructions provided. The structure adapts to what was requested, e.g. named fields for a contract, line items for an invoice, or form values for a form.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL to a PDF file"
  },
  "base64": {
   "type": "string",
   "description": "Base64-encoded PDF"
  },
  "extract": {
   "type": "string",
   "description": "What data to extract (natural language)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-e9fbdeba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
