GET
/
parse
/
{task_id}
curl -X 'GET' \
  'https://prod.visionapi.unsiloed.ai/parse/e77a5c42-4dc1-44d0-a30e-ed191e8a8908' \
  -H 'accept: application/json' \
  -H 'api-key: your-api-key'
{
  "task_id": "e77a5c42-4dc1-44d0-a30e-ed191e8a8908",
  "status": "Starting",
  "created_at": "2025-07-18T10:42:10.545832Z",
  "message": "Task created successfully. Use GET /parse/{task_id} to check status and retrieve results."
}

Overview

The Get Parse Task Status endpoint allows you to check the current status of parsing tasks and retrieve the complete results when processing is complete. This endpoint is specifically designed for the parsing API and returns comprehensive document analysis including text extraction, image recognition, table parsing, and OCR data.
Parsing tasks are processed asynchronously. Use this endpoint to poll for completion and retrieve results when the task status is “Succeeded”.

Request

task_id
string
required
The unique identifier of the parsing task to check
api-key
string
required
API key for authentication

Response

task_id
string
Unique identifier for the parsing task
status
string
Current task status: “Starting”, “Processing”, “Succeeded”, or “Failed”
created_at
string
Timestamp when the task was created
started_at
string
Timestamp when processing started (only present when status is not “Starting”)
finished_at
string
Timestamp when processing completed (only present when status is “Succeeded” or “Failed”)
message
string
Status message about the task
total_chunks
number
Number of chunks in the document (only present when status is “Succeeded”)
chunks
array
Array of document chunks with detailed analysis (only present when status is “Succeeded”)
curl -X 'GET' \
  'https://prod.visionapi.unsiloed.ai/parse/e77a5c42-4dc1-44d0-a30e-ed191e8a8908' \
  -H 'accept: application/json' \
  -H 'api-key: your-api-key'
{
  "task_id": "e77a5c42-4dc1-44d0-a30e-ed191e8a8908",
  "status": "Starting",
  "created_at": "2025-07-18T10:42:10.545832Z",
  "message": "Task created successfully. Use GET /parse/{task_id} to check status and retrieve results."
}

Task Status Values

Polling Strategy

For long-running parsing tasks, implement a polling strategy to check status periodically:
import requests
import time

def poll_parse_task(task_id, api_key, max_wait_time=300, poll_interval=5):
    """Poll a parsing task until completion or timeout"""
    
    start_time = time.time()
    headers = {"api-key": api_key}
    
    while time.time() - start_time < max_wait_time:
        response = requests.get(
            f"https://prod.visionapi.unsiloed.ai/parse/{task_id}",
            headers=headers
        )
        
        if response.status_code == 200:
            task = response.json()
            
            if task['status'] == 'Succeeded':
                return task
            elif task['status'] == 'Failed':
                raise Exception(f"Task failed: {task.get('message', 'Unknown error')}")
            elif task['status'] in ['Starting', 'Processing']:
                print(f"Task status: {task['status']} - waiting...")
                time.sleep(poll_interval)
            else:
                print(f"Unknown status: {task['status']}")
                time.sleep(poll_interval)
        else:
            print(f"Error checking status: {response.status_code}")
            time.sleep(poll_interval)
    
    raise Exception("Task polling timed out")

# Usage
try:
    result = poll_parse_task("e77a5c42-4dc1-44d0-a30e-ed191e8a8908", "your-api-key")
    print("Task completed successfully!")
    print(f"Total chunks: {result['total_chunks']}")
except Exception as e:
    print(f"Error: {e}")

Segment Types

When a task succeeds, the response includes detailed analysis of different document segments:

Picture

Images and graphics within the document, including logos, charts, and illustrations.

SectionHeader

Document headers and titles that define section boundaries.

Text

Regular text content including paragraphs, sentences, and individual text elements.

Table

Tabular data with structured rows and columns.

Caption

Text captions associated with images or figures. Each segment includes:
  • segment_type: Type of content detected
  • content: Extracted text content
  • image: URL to extracted image (if applicable)
  • page_number: Page where the segment appears
  • confidence: Confidence score for the extraction
  • bbox: Precise coordinates of the segment
  • html: HTML-formatted content
  • markdown: Markdown-formatted content
  • ocr: Detailed OCR data with individual text elements

Error Handling

Common Error Scenarios

  1. Task Not Found: Invalid or expired task ID
  2. Invalid API Key: Authentication failed
  3. Processing Timeout: Task took too long to complete
  4. Server Error: Internal processing error

Best Practices

  • Polling Frequency: Check status every 5-10 seconds for long-running tasks
  • Timeout Handling: Implement reasonable timeouts to prevent infinite polling
  • Error Recovery: Handle failed tasks gracefully with retry logic
  • API Key Security: Keep your API key secure and never expose it in client-side code

Rate Limits

  • Status Checks: Rate limits apply to prevent abuse
  • Concurrent Tasks: Limited number of active parsing tasks per API key
  • Request Frequency: Avoid excessive polling (recommended: 5-10 second intervals)
Check your API plan for specific limits and quotas.