Skip to content

List a folder's files + documents

GET
/api/v1/folders/{folderId}/documents
curl --request GET \
--url 'https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion' \
--header 'X-Api-Key: <X-Api-Key>'

The path segment accepts a folder id OR name (URL-encoded), e.g. /v1/folders/Website%20Examples/documents. Files come back in the folder’s manual sortOrder (set in the app or via the reorder endpoint), then newest-filed first.

folderId
required
string

Folder id or name.

Example
Website%20Examples
expand
string

Inline relations. documents.model replaces each document’s model id string with { id, name }. Shallow (one hop).

Example
documents.model
fields[model]
string

Fields for an expanded model. Default: id,name.

Example
id,name,version

Files filed into the folder, each with its document(s). The folder rides in meta.

Media typeapplication/json
object
data
required
Array<object>
object
id

The file id.

string
fileName
string
filedAt
string
sortOrder

Manual position within this folder (lower = earlier). Files are returned in this order; unset edges trail, newest-filed first.

integer
nullable
documents
Array<object>
object
id
string
model
One of:
string
nullable
status
string
createdAt
string
meta
required
object
pagination

List pagination. Bounded collections return real totals; large (cursor-backed) collections may leave totals null and set cursor.

object
page
integer
pageSize
integer
totalItems
integer
nullable
totalPages
integer
nullable
hasNext
boolean
hasPrevious
boolean
cursor
string
nullable
folder
object
id
string
name
string
path
string
parentId
string
nullable
Example
{
"data": [
{
"id": "file_mra6797o",
"fileName": "invoice.pdf",
"filedAt": "2026-07-07T04:50:12.649Z",
"documents": [
{
"id": "doc_mra67l5v",
"model": "mdl_inv01",
"status": "processed",
"createdAt": "2026-07-07T04:50:26.659Z"
}
]
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 1,
"totalItems": 1,
"totalPages": 1,
"hasNext": false,
"hasPrevious": false,
"cursor": null
},
"folder": {
"id": "fld_mr9y6w",
"name": "Website Examples",
"path": "Website Examples"
}
}
}

Missing or invalid API key.

Media typeapplication/json

Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.

object
statusCode
integer
statusMessage
string
Example
{
"statusCode": 404,
"statusMessage": "Document not found"
}

Folder not found.

Media typeapplication/json

Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.

object
statusCode
integer
statusMessage
string
Example
{
"statusCode": 404,
"statusMessage": "Document not found"
}