Skip to main content
GET
/
extract
/
{job_id}
curl -X GET "https://prod.visionapi.unsiloed.ai/extract/{job_id}" \
  -H "api-key: your-api-key"
{
  "job_id": "36adb597-3c2c-43e8-a259-410553291f47",
  "status": "completed",
  "file_name": null,
  "created_at": "2026-03-10T16:41:58.407237+00:00",
  "updated_at": "2026-03-10T16:42:26.232009+00:00",
  "metadata": {
    "order": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
    "schema": {
      "type": "object",
      "required": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
      "properties": {
        "EIN": {
          "type": "string",
          "description": "employee identification number"
        },
        "Address": {
          "type": "string",
          "description": "Full Address of organisation"
        },
        "Officers": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["Officers"],
            "properties": {
              "Officers": {
                "type": "string",
                "description": "List of officers"
              }
            },
            "additionalProperties": false
          },
          "description": "List of officers"
        },
        "Organisation": {
          "type": "string",
          "description": "Name of organisation"
        },
        "telephone_number": {
          "type": "string",
          "description": "telephone number"
        }
      },
      "additionalProperties": false
    },
    "page_count": 27
  },
  "result": {
    "EIN": {
      "score": 0.98,
      "value": "02-0624253",
      "bboxes": [
        {
          "bbox": [441, 131, 520, 147],
          "text": "02-0624253",
          "type": "segment",
          "confidence": 0.98,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "Address": {
      "score": 0.97,
      "value": "602 S OGDEN ST DENVER, CO 80209",
      "bboxes": [
        {
          "bbox": [84, 201, 181, 216],
          "text": "602 S OGDEN ST DENVER, CO 80209",
          "type": "segment",
          "confidence": 0.97,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "Officers": {
      "score": 0.98,
      "value": [
        {
          "bboxes": [
            {
              "bbox": [0, 446, 107, 465],
              "type": "segment",
              "confidence": 0.98,
              "page_width": 672.0,
              "page_height": 843.36
            }
          ],
          "page_no": 7,
          "Officers": "KIMBERLY TROGGIO"
        }
      ],
      "page_no": 8
    },
    "Organisation": {
      "score": 0.99,
      "value": "GLOBAL HUMANITARIAN EXPEDITIONS",
      "bboxes": [
        {
          "bbox": [84, 120, 239, 135],
          "text": "GLOBAL HUMANITARIAN EXPEDITIONS",
          "type": "segment",
          "confidence": 0.99,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "telephone_number": {
      "score": 0.98,
      "value": "(303) 858-8857",
      "bboxes": [
        {
          "bbox": [441, 185, 533, 200],
          "text": "(303) 858-8857",
          "type": "segment",
          "confidence": 0.98,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    }
  }
}

Overview

The Get Job Results endpoint retrieves the processed data from a completed job. This endpoint should only be called after confirming the job status is “COMPLETED” using the status endpoint.
Results are only available for completed jobs. Check job status first to ensure processing has finished.

Response

The response structure depends on the job type (extraction, parsing, classification, etc.).

Extraction Job Results

job_id
string
Unique identifier for the extraction job
status
string
Current status of the job (e.g., “completed”, “processing”, “failed”)
file_name
string | null
Original filename of the uploaded document
created_at
string
ISO 8601 timestamp when the job was created
updated_at
string
ISO 8601 timestamp when the job was last updated
metadata
object
Job metadata containing:
  • order: Array of extracted field names in order
  • schema: The JSON schema used for extraction
  • page_count: Number of pages in the document
result
object
The extracted data matching the provided JSON schema. Each field contains:
  • score: Confidence score (0-1) for the extraction
  • value: The extracted value (string for scalar fields, array of objects for array fields)
  • bboxes: Array of bounding box objects containing:
    • bbox: [x1, y1, x2, y2] coordinates
    • text: The extracted text snippet
    • type: Detection type (e.g., "segment")
    • confidence: Confidence score for this specific bounding box
    • page_width: Width of the source page in points
    • page_height: Height of the source page in points
  • page_no: Page number where the value was found (1-indexed)
For array fields, the value is an array of objects, each containing its own bboxes and page_no alongside the extracted data.
curl -X GET "https://prod.visionapi.unsiloed.ai/extract/{job_id}" \
  -H "api-key: your-api-key"
{
  "job_id": "36adb597-3c2c-43e8-a259-410553291f47",
  "status": "completed",
  "file_name": null,
  "created_at": "2026-03-10T16:41:58.407237+00:00",
  "updated_at": "2026-03-10T16:42:26.232009+00:00",
  "metadata": {
    "order": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
    "schema": {
      "type": "object",
      "required": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
      "properties": {
        "EIN": {
          "type": "string",
          "description": "employee identification number"
        },
        "Address": {
          "type": "string",
          "description": "Full Address of organisation"
        },
        "Officers": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["Officers"],
            "properties": {
              "Officers": {
                "type": "string",
                "description": "List of officers"
              }
            },
            "additionalProperties": false
          },
          "description": "List of officers"
        },
        "Organisation": {
          "type": "string",
          "description": "Name of organisation"
        },
        "telephone_number": {
          "type": "string",
          "description": "telephone number"
        }
      },
      "additionalProperties": false
    },
    "page_count": 27
  },
  "result": {
    "EIN": {
      "score": 0.98,
      "value": "02-0624253",
      "bboxes": [
        {
          "bbox": [441, 131, 520, 147],
          "text": "02-0624253",
          "type": "segment",
          "confidence": 0.98,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "Address": {
      "score": 0.97,
      "value": "602 S OGDEN ST DENVER, CO 80209",
      "bboxes": [
        {
          "bbox": [84, 201, 181, 216],
          "text": "602 S OGDEN ST DENVER, CO 80209",
          "type": "segment",
          "confidence": 0.97,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "Officers": {
      "score": 0.98,
      "value": [
        {
          "bboxes": [
            {
              "bbox": [0, 446, 107, 465],
              "type": "segment",
              "confidence": 0.98,
              "page_width": 672.0,
              "page_height": 843.36
            }
          ],
          "page_no": 7,
          "Officers": "KIMBERLY TROGGIO"
        }
      ],
      "page_no": 8
    },
    "Organisation": {
      "score": 0.99,
      "value": "GLOBAL HUMANITARIAN EXPEDITIONS",
      "bboxes": [
        {
          "bbox": [84, 120, 239, 135],
          "text": "GLOBAL HUMANITARIAN EXPEDITIONS",
          "type": "segment",
          "confidence": 0.99,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    },
    "telephone_number": {
      "score": 0.98,
      "value": "(303) 858-8857",
      "bboxes": [
        {
          "bbox": [441, 185, 533, 200],
          "text": "(303) 858-8857",
          "type": "segment",
          "confidence": 0.98,
          "page_width": 672.0,
          "page_height": 1028.88
        }
      ],
      "page_no": 2
    }
  }
}

Complete Workflow Example

Here’s a complete example of submitting a job, monitoring its progress, and retrieving results:
import requests
import time
import json

def process_document_with_results(file_path, schema, api_key):
    """Complete workflow: submit job, wait for completion, get results"""
    
    headers = {"api-key": api_key}
    
    # Step 1: Submit extraction job
    files = {"pdf_file": open(file_path, "rb")}
    data = {"schema_data": json.dumps(schema)}
    
    response = requests.post(
        "https://prod.visionapi.unsiloed.ai/v2/extract",
        files=files,
        data=data,
        headers=headers
    )
    
    if response.status_code != 200:
        raise Exception(f"Failed to submit job: {response.text}")
    
    job_id = response.json()["job_id"]
    print(f"Job submitted: {job_id}")
    
    # Step 2: Poll for completion
    while True:
        status_response = requests.get(
            f"https://prod.visionapi.unsiloed.ai/extract/{job_id}",
            headers=headers
        )
        
        if status_response.status_code != 200:
            raise Exception(f"Failed to check status: {status_response.text}")
            
        job = status_response.json()
        status = job["status"]
        print(f"Job status: {status}")
        
        if status == "COMPLETED" or status == "completed":
            break
        elif status == "FAILED" or status == "failed":
            raise Exception(f"Job failed: {job.get('error', 'Unknown error')}")
        
        time.sleep(5)  # Wait 5 seconds before checking again
    
    # Step 3: Get results
    results_response = requests.get(
        f"https://prod.visionapi.unsiloed.ai/extract/{job_id}",
        headers=headers
    )
    
    if results_response.status_code != 200:
        raise Exception(f"Failed to get results: {results_response.text}")
    
    return results_response.json()

# Usage example
schema = {
    "type": "object",
    "properties": {
        "company_name": {
            "type": "string",
            "description": "Name of the company"
        },
        "total_amount": {
            "type": "number",
            "description": "Total financial amount"
        }
    },
    "required": ["company_name"],
    "additionalProperties": False
}

try:
    results = process_document_with_results("document.pdf", schema, "your-api-key")
    print("Extraction completed!")
    print("Results:", results)
except Exception as e:
    print(f"Error: {e}")

Result Data Structure

Extracted Field Format

Each extracted field in the result object contains:
  • score: A confidence score between 0 and 1 indicating extraction confidence
  • value: The extracted value — a string for scalar fields, or an array of objects for array fields
  • bboxes: Array of bounding box objects indicating where the value was found
  • page_no: The page number where the value was located (1-indexed)
For array fields, the value is an array where each element contains:
  • The extracted data fields (matching the schema’s item properties)
  • bboxes: Bounding boxes specific to that array element
  • page_no: Page number for that array element

Bounding Box Format

Each bounding box object contains:
  • bbox: [x1, y1, x2, y2] coordinates where:
    • x1, y1: Top-left corner coordinates
    • x2, y2: Bottom-right corner coordinates
  • text: The extracted text snippet at that location
  • type: Detection type (e.g., "segment")
  • confidence: Confidence score for this specific bounding box
  • page_width: Width of the source page in points
  • page_height: Height of the source page in points

Confidence Scores

  • 0.9-1.0: Very high confidence, extraction is very likely correct
  • 0.8-0.9: High confidence, extraction is likely correct
  • 0.7-0.8: Good confidence, may warrant review for critical applications
  • 0.6-0.7: Medium confidence, should be reviewed
  • Below 0.6: Low confidence, likely needs manual verification

Error Handling

The job hasn’t completed yet. Wait for the status to change to “COMPLETED” before requesting results.
The job encountered an error during processing. Check the error message for details about what went wrong.
Either the job doesn’t exist, or the results have been cleaned up. Results are typically stored for 7 days.
The job ID is invalid or the job has been deleted. Verify you’re using the correct job ID.

Authorizations

api-key
string
header
required

Path Parameters

job_id
string
required

The unique identifier of the extraction job

Response

200 - application/json

Extraction job status and results retrieved successfully

Extraction job status and results