Skip to main content

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

ParameterTypeRequiredDescription
jobIdstringThe job ID returned from the extract-file-data endpoint

Headers

HeaderValueRequiredDescription
AuthorizationBearer YOUR_API_KEYYour API authentication token

Examples

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();

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:

{
"status": "success",
"data": [
[
"Acme Corp",
"INV-2024-001",
"$2,450.00",
"2024-02-15"
]
]
}

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

FieldTypeDescription
statusstringJob status - will be "success"
dataarray2D 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

FieldTypeDescription
statusstringJob status - will be "running"

Error Response

FieldTypeDescription
statusstringJob status - will be "error"
errorstringDescriptive error message