Fetch a parse result
GET
/api/v1/documents/{documentId}
const url = 'https://api.langparse.dev/api/v1/documents/example?expand=model&fields%5Bmodel%5D=id%2Cname%2Cversion';const options = {method: 'GET', headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.langparse.dev/api/v1/documents/example?expand=model&fields%5Bmodel%5D=id%2Cname%2Cversion' \ --header 'X-Api-Key: <X-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”documentId
required
string
Query Parameters
Section titled “Query Parameters”expand
string
Expand relations. model replaces the top-level model id string with {id,name}; documents.model expands split sub-documents. Shallow (one hop).
Example
modelfields[model]
string
Fields to return for an expanded model (allowed: id, name, version, geometry). Default: id,name.
Example
id,name,versionResponses
Section titled “Responses”Document status and (when processed) structured result
Media typeapplication/json
object
id
string
model
Model id string, or { id, name } when ?expand=model.
string
status
string
debugId
string
pageCount
integer
data
object
key
additional properties
any
fields
Array<object>
object
name
string
value
confidence
string
boxes
Array<object>
object
left
number
top
number
width
number
height
number
page
integer
Example
{ "status": "queued", "fields": [ { "confidence": "high" } ]}Missing or invalid API key
Document not found