SchemaLock — extract structured JSON data from any PDF/image or raw text/HTML, converting
SchemaLock — extract structured JSON data from any PDF/image or raw text/HTML, converting it into a JSON Schema you supply, not limited to invoice/receipt/contract/resume. Unlike the fixed invoice/receipt/contract/resume endpoints, this accepts any JSON Schema — you define the fields. Takes a PDF/image file OR raw text/HTML you already have (e.g. a scraped page). Schema-conformance, not fact-checking. A rejected schema is a 400 and costs nothing.
20000 (raw units)
price
3
calls / 30d
1
unique payers
2026-09-08
updated
Provider
doc-extract-api.thestarboy9696-4ef.workers.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x65c767C483dd862d08Bc3d6500Cd4CD770Ae28ED",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "20000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"content": "<string: raw text or HTML, e.g. an already-scraped web page, max 100000 chars — send this OR 'file', not both>",
"file": "<binary: PDF, PNG, or JPEG/WEBP, max 15MB — send this OR 'content', not both>",
"instructions": "<optional string: extra guidance for the model, max 1000 chars>",
"schema": "<string: JSON Schema, type \"object\", e.g. {\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"string\"},\"ship_date\":{\"type\":\"string\"},\"total_weight_kg\":{\"type\":\"number\"}}}>"
},
"bodyType": "form-data",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"data": {
"order_id": "PO-88213",
"ship_date": "2026-07-14",
"total_weight_kg": 42.5
},
"retried": false,
"validation_warnings": []
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {}
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/8238.json, and this resource appears in /discovery/resources and /discovery/search.