{"uid":"cap_LW-BTeiNsdiC1vzAFJFQP","slug":"unstructured-text-to-json-extractor-claude-haiku-d442ef6f","name":"Unstructured Text to JSON Extractor (Claude Haiku)","description":"Extract JSON from text — pull structured fields (invoice data, contact info, product specs, any custom schema) out of unstructured text, via Claude Haiku 4.5. JSON body: {text: string (max 8000 chars), schema: object (JSON Schema describing the fields to extract)}.","url":"https://x402-seller-0ay3.onrender.com/api/ai/extract","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Source text (max 8000 chars)."},"schema":{"type":"object","description":"JSON Schema describing the fields to extract."}}},"responseSchema":{"type":"json","example":{"data":{"total":340,"customer":"Jane Doe","due_date":"2026-09-15","invoice_number":"4521"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wmYMRPAFcoP0__u9ilQV2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured JSON fields from unstructured text using a caller-provided JSON Schema, powered by Claude Haiku 4.5","exampleAgentPrompt":"Extract the invoice number, customer name, total amount, and due date from this text as JSON — here's the text: 'Invoice #4521 for Jane Doe. Total due: $340.00. Payment due by September 15, 2026.' Use a schema with fields invoice_number, customer, total, and due_date.","exampleUseCases":[{"title":"Invoice data extraction pipeline","prompt":"Pull the invoice number, customer name, line item totals, and due date out of this raw invoice text and give it back as structured JSON: 'Invoice #8832 — Billed to Acme Corp. Items: Widget x3 ($90), Gadget x1 ($45). Total: $135. Due: 2026-11-01.'"},{"title":"Contact info parsing from emails","prompt":"I have a block of text from a business email and I need to extract the sender's name, company, phone number, and email address into a JSON object. Here's the text: 'Hi, I'm Sarah Lin from TechBridge Solutions. Reach me at sarah@techbridge.io or call (415) 555-0192.'"},{"title":"Product spec sheet structuring","prompt":"Extract the product name, weight, dimensions, material, and SKU from this product description text into a JSON object with those fields: 'EcoDesk Pro (SKU: ED-2204) — made from recycled aluminum, weighing 12kg, dimensions 120x60x75cm.'"}],"resultDescription":"Returns a JSON object with a 'data' key containing the extracted fields as specified by the caller's JSON Schema — e.g. {\"data\": {\"invoice_number\": \"4521\", \"customer\": \"Jane Doe\", \"total\": 340, \"due_date\": \"2026-09-15\"}}. Field names and types match the schema provided in the request.","failureModes":["Text exceeds 8000 character limit — request will be rejected or truncated","Malformed or invalid JSON Schema in the schema field causes extraction failure","Fields not present or inferable from the source text will be null or omitted","Ambiguous text may cause Claude to hallucinate plausible-sounding but incorrect field values","Schema with overly complex nested structures may reduce extraction accuracy","Rate limiting or service unavailability on the Render hosting platform"],"whenToPreferThis":"Choose this endpoint when you have unstructured or semi-structured text (emails, invoices, descriptions, transcripts) and need to pull specific fields into a machine-readable JSON object using a schema you define. It is ideal for any schema that varies per use case since you supply the schema dynamically. Prefer this over regex or rule-based parsers when the text is natural language and field positions are inconsistent. If you need to extract from a web URL rather than raw text, use the sibling web-scrape endpoint instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:45.609Z","isFirstParty":false}