{"uid":"cap_zSXoPWYaupbfxTUKvIZfW","slug":"agent-data-toolkit-extract-structured-json-from-text-8d394e77","name":"Agent Data Toolkit – Extract Structured JSON from Text","description":"Extract structured JSON matching a given schema from free-form text using an LLM worker.","url":"https://agent-data-toolkit.onrender.com/extract","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","required":["method"],"properties":{"body":{"type":"object","required":["text","schema"],"properties":{"text":{"type":"string","description":"string, free-form text (required)"},"schema":{"type":"object","description":"object, JSON Schema describing what to extract (required)"},"instructions":{"type":"string","description":"string, optional extra guidance"}}}}},"output":{"type":"object","properties":{"example":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean"},"data":{},"schema_error":{"type":"string"},"schema_valid":{"type":"boolean"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nmhlXKEb_90LSq4uKpnBy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Uses an LLM worker to extract structured JSON matching a caller-supplied schema from free-form text input.","exampleAgentPrompt":"Pull structured data from this paragraph into my schema — the schema has fields: name (string), date (string), amount (number), and currency (string). The text is: 'John Smith agreed to pay $1,250 USD on March 15th for the consulting services.'","exampleUseCases":[{"title":"Parse customer feedback into structured insights","prompt":"Extract feedback data from this customer review into a JSON with fields: sentiment (string), product_mentioned (string), rating (number), and key_complaint (string). Here's the review: 'The laptop is fantastic overall, though the battery life could be better. I'd give it 4 out of 5 stars. My main issue is that it overheats during video editing sessions.'"},{"title":"Convert job application into candidate profile","prompt":"Turn this application message into structured JSON with fields: applicant_name (string), desired_position (string), years_experience (number), and key_skills (array of strings). Message: 'Hi, I'm Sarah Chen with 7 years in full-stack development. I'm interested in your Senior Engineer role and I specialize in React, Node.js, and cloud infrastructure.'"},{"title":"Extract invoice details from receipt text","prompt":"Pull billing information from this receipt into my schema with fields: vendor_name (string), invoice_date (string), line_items (array), and total_amount (number). Receipt text: 'Acme Supplies invoice dated November 3rd: 5 reams of paper at $12 each, 2 toner cartridges at $45 each, and expedited shipping for $25. Total due: $175.'"}],"resultDescription":"A JSON object whose fields and types conform to the schema provided by the caller, with values populated by an LLM worker that read and interpreted the free-form input text. Missing fields may be null or omitted depending on what was inferrable from the text.","failureModes":["Text contains no information mappable to the schema — returns empty or null-filled JSON","Schema is malformed or unparseable — returns an error response","LLM worker fails to produce valid JSON — may return a raw text error or malformed JSON artifact","Input text is too long for the LLM context window — truncation or error","Payment not completed (x402) — request rejected before processing"],"whenToPreferThis":"Use this endpoint when you need to extract structured, schema-conformant JSON from unstructured or semi-structured text using LLM understanding, especially when the fields are semantically complex or not delimited by clear markers. Prefer over regex or rule-based parsing when the text is natural language and field boundaries are ambiguous. Pairs well with the sibling JSON validator endpoint to confirm output correctness.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:36:49.622Z","isFirstParty":false}