input for a new upload or file_id for a previous upload. Your API key authenticates the request. All other controls are optional.
Send a document
SetUNSTRUCTURED_API_KEY to your API key and replace document.pdf with your file path.
To run the Python or TypeScript example, first install the Python SDK or TypeScript SDK.
- Python
- TypeScript
- cURL
markdown when processing completes. HTTP 202 means processing continues; retain the response’s Location header and follow request progress.
Choose the output
The default isoutput=markdown. Add -F "output=elements" to receive individual elements with text, type, and page metadata. In that representation, markdown is null.
The optional include query parameter accepts coordinates and table_html only with elements output. Some elements might not include the coordinates or table HTML you request. Check whether each field is present before reading it.
Generate image descriptions
Image descriptions add generated text about images to your parsed document. Image descriptions are disabled by default. The following examples enable them. Use the same API key and SDK setup as Send a document.- Python
- TypeScript
- cURL
advanced_options as a JSON string in the multipart form. Image descriptions are the only supported enrichment option. See the Parse API reference.
The sample text below describes the logo in the ACME Corp sample file. The JSON excerpt shows the corresponding Image element. Other response fields are omitted.
- Markdown
- JSON
Reuse your document
Usefile_id instead of input for a previous upload. After Parse completes, use its id as parse_id to Extract fields.
Choose Parse first when you need its Markdown, elements, or a completed Parse to reuse for multiple extractions. To extract fields directly from a document in one request, see Extract directly from a document.
See the captured response and optional parameters.
See Chain Parse and Extract for a complete sequence that passes the Parse ID into Extract.
