Parse raw text into structured JSON
parse_textExtract clean, schema-guaranteed JSON from raw/messy text you already have — scraped web content, email bodies, chat logs, OCR output, or pasted tables. Pass the text in text. Use this instead of parse_document when you don't have a file. Optional JSON schema (or schema_id) constrains the output shape and instructions guides extraction. Returns the extracted data plus a confidence score and a review_needed flag. Costs 1 credit per successful call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The raw text to extract structured data from. | |
| redact | No | When true, PII (emails, SSNs, card numbers, phones, etc.) is masked in the output before it leaves the server. | |
| schema | No | Optional JSON Schema describing the exact output shape you want. When provided, the returned `data` conforms to it. | |
| schema_id | No | Optional named template to use instead of a hand-written schema, e.g. "invoice", "receipt", "resume". Call the list_schemas tool for the full set. Ignored when `schema` is provided. | |
| instructions | No | Optional natural-language guidance for what to extract. |