Get Files Data (Bulk)
Retrieve extracted data for multiple files in a single request.
/api/v1/document/get-files-dataRetrieve extracted data for multiple files in a single request. Accepts up to 100 file IDs and returns data for all accessible files.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
fileIds | string[] | body | Yes | Array of file IDs to retrieve data for. Minimum 1, maximum 100. |
include | string[] | body | No | Optional enrichments to include: confidence, boundingBoxes, validations, metadata. Omit for the plain data payload. |
Optional Enrichments
By default each file's payload contains only the extracted values. Pass include to enrich the response:
confidence— adds aconfidenceobject to every cell withoverall,llm,layout, andconsensusscores (0–1,nullwhen not computed).boundingBoxes— adds aboundingBoxesarray to every cell. Each box is{"page": "2", "bbox": [yMin, xMin, yMax, xMax]}in normalized 0–1000 coordinates with the origin at the top-left.nullwhen boxes were never computed for the cell.validations— adds avalidationsarray to every cell and a per-filevalidationsobject carrying that document'sstatus, itsfailCount, the custom validation results (checks) and the validation rule results (rules). The shapes are the ones documented under Get File Data, resolved per file.metadata— adds a top-level_metablock to each file's result, describing the document itself. See Metadata.
Every cell's metadata also carries the column slug, alongside the table-level and column-list slugs, so responses can be consumed by stable slug instead of display name.
Note: documents processed through the synchronous process-file endpoint skip the confidence and bounding-box stages, so those fields stay null for such files even when requested. Use the async processing endpoints when you need them.
Request
const response = await fetch(
"https://app.limai.io/api/v1/document/get-files-data",
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
fileIds: ["file_abc123", "file_def456", "file_ghi789"],
include: ["confidence", "validations"]
})
}
)
const results = await response.json()Response
Returns results, an object whose keys are file IDs and whose values carry each file's data and status, alongside a summary counting the statuses. Each file reports its extraction job for the model it belongs to; this endpoint does not accept a jobId. Use get-file-data with a jobId to validate a read against the job you queued.
For each file, COMPLETED guarantees the extracted data is present in the same response (an empty-but-successful extraction still reports COMPLETED with empty tables). A file whose latest job is still queued reports PROCESSING, and a stalled job reports FAILED — never a partial COMPLETED. A file ID that does not exist or is not accessible reports NOT_FOUND instead of failing the batch.
{
"results": {
"file_abc123": {
"status": "COMPLETED",
"fileId": "file_abc123",
"data": {
"tables": {}
}
},
"file_def456": {
"status": "PROCESSING",
"fileId": "file_def456"
},
"file_ghi789": {
"status": "NOT_FOUND",
"fileId": "file_ghi789"
}
},
"summary": {
"completed": 1,
"processing": 1,
"failed": 0,
"classifying": 0,
"not_found": 1,
"total": 3
}
}Validation Error
{
"error": "Validation error",
"details": {
"fieldErrors": {
"fileIds": [
"Array must contain at least 1 element(s)"
]
}
}
}Metadata
include: ["metadata"] adds a reserved _meta key to each file's result object, beside fileId, status and data. It describes the document itself, not its cells, so it is the one enrichment that leaves the extracted values untouched.
{
"results": {
"file_abc123": {
"status": "COMPLETED",
"fileId": "file_abc123",
"data": {
"tables": {}
},
"_meta": {
"documentId": "cmm3k7r2v0007",
"fileName": "broker-quote-2026-09.pdf",
"submittedAt": "2026-09-01T10:12:33.000Z",
"submittedBy": {
"id": "usr_8a2f",
"name": "Jane Doe",
"email": "jane@acme.com"
},
"extractedAt": "2026-09-01T10:14:02.000Z"
}
},
"file_def456": {
"status": "PROCESSING",
"fileId": "file_def456",
"_meta": {
"documentId": "cmm3k1q9x0001",
"fileName": "invoice_001.pdf",
"submittedAt": "2026-09-02T08:41:10.000Z",
"submittedBy": null,
"extractedAt": null
}
},
"file_ghi789": {
"status": "NOT_FOUND",
"fileId": "file_ghi789"
}
},
"summary": {
"completed": 1,
"processing": 1,
"failed": 0,
"classifying": 0,
"not_found": 1,
"total": 3
}
}Fields of _meta:
| Field | Description |
|---|---|
documentId | The file's ID. |
fileName | The uploaded file name. |
submittedAt | When the file was uploaded, shown as "Date Added" in the grid. |
submittedBy | The user who uploaded the document, as { id, name, email }. null when the uploader is unknown. |
extractedAt | When the latest extraction run completed. null when no run has completed. |
_meta is present on every result whose file was found and accessible, whatever its status — PROCESSING, CLASSIFYING and FAILED results carry it too. NOT_FOUND results have none.
An unrecognized include value returns a 400 naming the allowed values, metadata among them.
Backwards compatibility
Without metadata in include, the response shape is exactly the one documented under Response.