{"uid":"cap_Lcm3HbtNP0hYMJTYqywOR","slug":"extract-structured-json-from-text-using-custom-field-list-1e480b05","name":"Extract Structured JSON from Text Using Custom Field List","description":"Extract structured JSON from any text using your field list (invoices, emails, contracts, listings) — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/ai/extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"text":{"type":"string","description":"required, up to 16,000 chars"},"fields":{"type":"object","description":"required: {field_name: what to extract}, up to 30 fields"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"text-extract-json","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.006,"receipt_id":"g402-<16hex>"},"sources":[{"ok":true,"name":"<source>"}],"limitations":"<text>","generated_at":"<iso time>","evidence_hash":"sha256:<64hex>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Un2ObwtG3XYV6gZs4NV2Z","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Takes arbitrary text (invoices, emails, contracts, listings) and a user-defined field map, returning structured JSON with the requested fields extracted.","exampleAgentPrompt":"Pull the vendor name, invoice number, total amount, due date, and line items out of this invoice text and give me the result as structured JSON: [paste invoice text here].","exampleUseCases":[{"title":"Invoice data extraction for accounting","prompt":"I have the raw text of an invoice — extract the vendor name, invoice number, issue date, due date, subtotal, tax, and total amount from it and return them as JSON."},{"title":"Contract party and clause extraction","prompt":"Here's the text of a service agreement — pull out the names of both parties, the effective date, the contract term length, and the termination notice period as structured fields."},{"title":"Job listing structured parsing","prompt":"Extract the job title, company name, location, salary range, required years of experience, and top 5 required skills from this job posting text and return them as a JSON object."}],"resultDescription":"A structured JSON object where each key corresponds to a field name provided in the input field map, and each value is the extracted content from the source text. Missing or not-found fields may be null or absent.","failureModes":["Text exceeds 16,000 character limit — request rejected","More than 30 fields defined in the field map — may fail or truncate","Field definitions are ambiguous — extracted values may be incorrect or empty","AI model unable to identify requested fields in text — returns null values","Malformed input object or missing required params — HTTP error response","Payment failure via x402 protocol — call not executed"],"whenToPreferThis":"Choose this endpoint when you have unstructured or semi-structured text (emails, invoices, contracts, listings, forms) and need to extract a specific, user-defined set of named fields as structured JSON. It is ideal for document processing pipelines, data entry automation, and any workflow where you need to convert free-form text into machine-readable records with custom schemas. Prefer it over general LLM prompting when you want a consistent, schema-driven extraction result via a paid, reliable API endpoint.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:46:10.142Z","isFirstParty":false,"canonicalSlug":"extract-structured-json-from-text-using-custom-field-list-1e480b05"}