Job Result
Retrieve the status and results of your data extraction jobs. Use this endpoint to check processing progress and download your extracted data once complete.
GET /job-result
Overview
After submitting a file for extraction, use the returned job ID to periodically check the processing status. Once complete, this endpoint returns your structured data in a clean, organized format.
Polling Best Practices
- Wait at least 10 seconds before your first status check
- Use exponential backoff: start with 2-second intervals, increasing to 5-10 seconds
- Most jobs complete within 30 seconds
Request Details
Method: GET Rate Limit: 5 requests per 5 seconds
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | string | ✅ | The job ID returned from the extract-file-data endpoint |
Headers
| Header | Value | Required | Description |
|---|---|---|---|
Authorization | Bearer YOUR_API_KEY | ✅ | Your API authentication token |
Examples
- JavaScript
- Python
- cURL
const jobId = "c37e0a3b-0bd7-44d0-be7a-3cd1e2a70837";
const url = `https://sheets.lido.app/api/v1/job-result?jobId=${jobId}`;
const options = {
method: 'GET',
headers: { Authorization: 'Bearer YOUR_API_KEY' }
};
async function checkJobStatus() {
try {
const response = await fetch(url, options);
const data = await response.json();
if (data.status === 'success') {
console.log('Extraction complete!');
console.log('Data:', data.data);
return data.data;
} else if (data.status === 'running') {
console.log('Still processing...');
// Wait and check again
setTimeout(checkJobStatus, 5000);
} else if (data.status === 'error') {
console.error('Extraction failed:', data.error);
}
} catch (error) {
console.error('Request failed:', error);
}
}
checkJobStatus();
import requests
import time
job_id = "c37e0a3b-0bd7-44d0-be7a-3cd1e2a70837"
url = "https://sheets.lido.app/api/v1/job-result"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
def check_job_status():
try:
response = requests.get(url, headers=headers, params={"jobId": job_id})
data = response.json()
if data["status"] == "success":
print("Extraction complete!")
print(f"Data: {data['data']}")
return data["data"]
elif data["status"] == "running":
print("Still processing...")
time.sleep(5)
return check_job_status() # Recursive call
elif data["status"] == "error":
print(f"Extraction failed: {data['error']}")
return None
except Exception as error:
print(f"Request failed: {error}")
return None
result = check_job_status()
# Simple status check
curl --request GET \
--url 'https://sheets.lido.app/api/v1/job-result?jobId=c37e0a3b-0bd7-44d0-be7a-3cd1e2a70837' \
--header 'Authorization: Bearer YOUR_API_KEY'
# Bash script with polling
#!/bin/bash
JOB_ID="c37e0a3b-0bd7-44d0-be7a-3cd1e2a70837"
API_KEY="YOUR_API_KEY"
while true; do
response=$(curl -s --request GET \
--url "https://sheets.lido.app/api/v1/job-result?jobId=${JOB_ID}" \
--header "Authorization: Bearer ${API_KEY}")
status=$(echo $response | jq -r '.status')
if [ "$status" = "success" ]; then
echo "Extraction complete!"
echo $response | jq '.data'
break
elif [ "$status" = "running" ]; then
echo "Still processing..."
sleep 5
else
echo "Error: $response"
break
fi
done
Response Formats
The response format depends on the current job status:
Running Job
While your job is being processed:
{
"status": "running"
}
Successful Completion
When extraction is complete and successful:
- Single Row Data
- Multi-Row Data
{
"status": "success",
"data": [
[
"Acme Corp",
"INV-2024-001",
"$2,450.00",
"2024-02-15"
]
]
}
{
"status": "success",
"data": [
[
"Office Supplies Inc",
"$245.50",
"$0.00"
],
[
"Tech Solutions Ltd",
"$1,200.00",
"$150.00"
],
[
"Consulting Services",
"$0.00",
"$2,500.00"
]
]
}
Error Response
If processing fails:
{
"status": "error",
"error": "Unable to extract text from document. Please ensure the file is not corrupted and contains readable text."
}
Response Fields
Success Response
| Field | Type | Description |
|---|---|---|
status | string | Job status - will be "success" |
data | array | 2D array containing extracted data rows |
Data Structure
The data field contains a two-dimensional array where:
- Each outer array element represents a row of extracted data
- Each inner array contains the values for the columns you specified
- Values are returned as strings in the order of your column specification
- Empty or undetectable fields return empty strings
""
Running Response
| Field | Type | Description |
|---|---|---|
status | string | Job status - will be "running" |
Error Response
| Field | Type | Description |
|---|---|---|
status | string | Job status - will be "error" |
error | string | Descriptive error message |