Get All Data
Retrieve all processed data for a model in a simplified, flattened format.
/api/v1/extraction-schema/get-all-dataRetrieve all processed data for a model in a simplified, flattened JSON format. Data is organized by filename with normalized column names, making it ideal for bulk export, analytics, and integration with external systems.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
extractionSchemaId | string | query | Yes | The extraction schema (model) ID to retrieve data for. |
Request
const response = await fetch(
`https://app.limai.io/api/v1/extraction-schema/get-all-data?extractionSchemaId=${schemaId}`,
{
headers: { "Authorization": `Bearer ${API_TOKEN}` }
}
)
const allData = await response.json()
for (const [filename, fileData] of Object.entries(allData)) {
const records = Array.isArray(fileData) ? fileData : [fileData]
for (const record of records) {
console.log(filename, record)
}
}Response
Data is organized by filename. Single-row documents return an object; multi-row documents return an array. Nested tables appear as direct properties.
Multi-Row Example
{
"invoice_001.pdf": [
{
"invoice_number": "INV-001",
"total_amount": "1000.00",
"line_items": [
{
"item_description": "Software License",
"quantity": "1",
"unit_price": "800.00"
}
]
},
{
"invoice_number": "INV-002",
"total_amount": "500.00"
}
],
"invoice_002.pdf": {
"invoice_number": "INV-003",
"total_amount": "750.00"
}
}Empty Response
Returns an empty object {} when no data exists for the model.
Column Name Normalization
All column and table names are automatically normalized in the response:
- Convert to lowercase
- Replace spaces and slashes with underscores
- Remove special characters (keep letters, numbers, underscores)
- Collapse multiple underscores into one
- Remove leading/trailing underscores
| Original Name | Normalized |
|---|---|
Invoice Number | invoice_number |
Total Amount ($) | total_amount |
Client's Email | clients_email |
Date/Time | date_time |
If multiple columns normalize to the same name, the API returns a 400 error with details about the conflicting columns. Rename one column in the platform to resolve the conflict.