Skip to main content
POST
Parse a document with one body field: input. Authenticate with your API key. Output defaults to Markdown; profile and other controls are optional.
Start with Parse your first document.

Authorizations

unstructured-api-key
string
header
required

Headers

Prefer
string

Wait up to this many seconds for a completed parse.

Query Parameters

include
string[]

Optional list of projection fields to include in elements output. Allowed values are 'coordinates' and 'table_html'. Only valid when output='elements'.

Body

multipart/form-data

A document to parse, plus an optional schema to extract from it. Either input or file_id must be provided.

input
file

The document to parse. Required if file_id is not provided.

file_id
string

The ID of a previously uploaded file. Required if input is not provided.

filename
string

The original filename to attach to the job when parsing a previously uploaded file.

output
enum<string>
default:markdown

Shape of the parsed output.

Available options:
markdown,
elements
schema
string

Optional JSON Schema, as a JSON string, describing fields to extract. Its presence switches parse-only to parse-then-extract.

Maximum string length: 1048576
Example:

"{\"type\":\"object\",\"properties\":{\"invoice_number\":{\"type\":\"string\"}}}"

prompt
string

Optional free-text guidance that shapes how extracted fields are filled when schema is supplied. Limited to 1,048,576 bytes when encoded as UTF-8.

profile
enum<string>

Optional customer-facing outcome profile. Omit it to use the current deployment default, balanced, or select one explicitly.

Available options:
balanced,
best

Response

The parse operation result, carrying the canonical document.

Parse operation metadata plus the canonical document, possibly before extraction has finished.

id
string
required

Underlying job id, for support and tracing.

status
enum<string>
required

Document processing or terminal status.

Available options:
processing,
completed,
completed_with_warnings
profile
enum<string> | null
required

The effective profile used for raw-document partitioning.

Available options:
balanced,
best
markdown
string | null
required

Rendered Markdown projection when requested; null when elements are requested.

format_version
enum<string>
required

The document envelope version.

Available options:
2.0
metadata
object
required

Public document-level metadata.

extracted_data
object[] | null
required

Completed extraction results are available only after extraction has finished.

elements
object[]
required

Public document elements.

source
object | null
required

The associated original uploaded source file, when known.

warnings
object[]

Notes about a result that still succeeded.