id to Extract as parse_id. The second call reuses the parsed content without uploading or parsing the file again.
Use this flow when you want to inspect parsed content first or run multiple schemas against the same document. Use direct Extract when you already know your schema and want a single request that returns structured data.
Pass the Parse ID to Extract
A
file_id identifies an uploaded file; a Parse ID identifies processed content. Keep the original Parse ID when you want another extraction. Extract returns its own result ID.
Chain two requests
SetUNSTRUCTURED_API_KEY to your API key and save your document as document.pdf. Install the Python SDK or TypeScript SDK before using those tabs. The cURL example uses zsh and requires jq.
Compile the TypeScript examples before you run them.
Requests without a Prefer header wait up to 15 minutes by default. HTTP 200 returns a completed result; HTTP 202 returns a pending job handle. These examples poll pending jobs until their results are ready.
TypeScript requests a 30-second wait to fit the SDK’s 60-second client timeout and Node’s 300-second header limit. The Python and cURL synchronous examples use the service’s default wait.
- Synchronous (default)
- Asynchronous
- Python
- TypeScript
- cURL
Run another schema against the same Parse
Keep the parsed document’s ID from the first operation. Send another Extract request with that ID and a different schema, such as one requestingtotal instead of invoice_number.
Each Extract request creates a separate extraction. Reusing the Parse avoids repeating the parsing step; it does not make extraction free or imply indefinite retention.
See the Extract endpoint, captured Extract response, and retention guidance.
