# Extract JSON > Use this when you need to turn unstructured text (emails, invoices, receipts, job posts, listings, bios, support tickets, chat logs) into JSON matching a schema. Send the text plus a JSON Schema or a list of field names; get back data that validates against it. Missing values come back as null, never invented. Charged only on success. Pay per call with x402 (USDC, Base). No account, no API key. ## Endpoints - POST https://extract-json.mintfacts.workers.dev/extract: $0.002 USDC. Body: {"text": "...", "schema": {...}} or {"text": "...", "fields": [...]}, optional "instructions". Text up to 8000 characters. - POST https://extract-json.mintfacts.workers.dev/extract-lite: FREE demo, rate limited, up to 1000 characters and 5 fields. ## Request - schema: a JSON Schema with root type "object". Supported: type, properties, required, items, enum, description. Up to 80 leaf fields, 6 levels deep. - fields: shortcut list of names, optionally typed: name:string|number|integer|boolean|date|datetime|string[]|number[]|object[]. Example: ["vendor", "total:number", "date:date", "items:string[]"]. - instructions: optional guidance up to 500 characters (e.g. "amounts in cents", "dates as MM/DD/YYYY"). ## Response {"data": {...}, "model": "...", "warnings": [...], "missing": [...], "note": "..."} - data validates against your schema. Values not present in the text are null (never invented) and their paths are listed in "missing". - Light repairs (e.g. "$1,371.00" -> 1371) are reported in "warnings". ## Example curl -X POST https://extract-json.mintfacts.workers.dev/extract-lite -H 'content-type: application/json' -d '{"text":"Call me at 555-0142, Dana (VP Ops, Lumen Freight)","fields":["name","title","company","phone"]}' ## Payment - Unpaid requests to /extract return HTTP 402 with a PAYMENT-REQUIRED header (x402 v2). Pay with any x402 client and retry with PAYMENT-SIGNATURE. - Network: eip155:8453 (Base). Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). Pay-to: 0x59D0D643f1c91ACa0B1dcd4bE20edF188645845f. Amount: 2000 atomic units. - Payment is verified first, then the extraction runs, and it is settled only if it succeeds (HTTP 200). Bad input, text over the limit, and extractions that fail schema validation are never charged. ## MCP - Streamable HTTP endpoint: https://extract-json.mintfacts.workers.dev/mcp (JSON-RPC over POST). Tools: extract_json (paid), extract_json_lite (free), get_pricing. - Paid tools use the x402 MCP transport: the first call returns payment requirements (isError, structuredContent); retry with the payment in params._meta["x402/payment"]. ## Machine-readable - OpenAPI with x-payment-info: https://extract-json.mintfacts.workers.dev/openapi.json - https://extract-json.mintfacts.workers.dev/.well-known/x402 - https://extract-json.mintfacts.workers.dev/.well-known/mcp/server-card.json ## Privacy and limits Request text is processed by a model on Cloudflare Workers AI and is not stored or logged by this service. Don't send secrets. Automated output: check important values. Experimental service run by an individual, no uptime guarantee.