Limai Docs
API ReferenceDocument Processing

Get Files Data (Bulk)

Retrieve extracted data for multiple files in a single request.

POST/api/v1/document/get-files-data

Retrieve extracted data for multiple files in a single request. Accepts up to 100 file IDs and returns data for all accessible files.

Parameters

NameTypeInRequiredDescription
fileIdsstring[]bodyYesArray of file IDs to retrieve data for. Minimum 1, maximum 100.
includestring[]bodyNoOptional enrichments to include: confidence, boundingBoxes, validations. 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 a confidence object to every cell with overall, llm, layout, and consensus scores (0–1, null when not computed).
  • boundingBoxes — adds a boundingBoxes array 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. null when boxes were never computed for the cell.
  • validations — adds a validations array to every cell (normalized entries with checkKey, source of RULE/SCRIPT/AGENT, passed, message, expected, actual, amended) plus a per-file validations object containing the aggregate failCount, per-check results (checks), and declarative rule results (rules).

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 an object where each key is a file ID and the value contains the file's data and status.

Response200
{
  "file_abc123": {
    "status": "COMPLETED",
    "fileId": "file_abc123",
    "data": {
      "tables": {}
    }
  },
  "file_def456": {
    "status": "PROCESSING",
    "fileId": "file_def456"
  },
  "file_ghi789": {
    "status": "FAILED",
    "fileId": "file_ghi789",
    "errorMessage": "File not found"
  }
}

Validation Error

Response400
{
  "error": "Validation error",
  "details": {
    "fieldErrors": {
      "fileIds": [
        "Array must contain at least 1 element(s)"
      ]
    }
  }
}

On this page