Yard Management Systems: Container OCR API

Synchronize physical yard inventory with digital records in real-time. Upload your local reach stacker or yard camera captures to test our extraction accuracy for free, eliminating lost containers and manual checks.

A reach stacker lifting a shipping container in a logistics yard, with the extracted ISO 6346 code synced to a YMS dashboard, and a free test upload button.

The Chaos of Yard Inventory Management

A Yard Management System (YMS) relies on perfect location tracking, but maintaining accuracy in a dynamic stacking yard is incredibly difficult. When reach stackers, empty handlers, and RTGs move containers, manual spotters or basic optical character recognition systems often misread IDs due to harsh sunlight, deep shadows between stacks, and skewed camera angles. This leads to "lost" containers and massive operational delays. To see how our engine cuts through these extreme visual challenges, you can upload a test image to explore our core Container OCR capabilities completely free.

A Universal API Engineered for the Yard

Delivered strictly as a lightweight REST API to ensure seamless integration into your YMS architecture without the bloat and dependency conflicts of traditional SDKs, this endpoint is powered by our Logistics Container OCR engine. It excels in complex, multi-layered visual environments. The engine applies strict ISO 6346 validation on the fly, instantly calculating check digits to guarantee that only perfectly accurate Container Codes update your digital yard map.

Live Demo: Container OCR

No registration required. Upload a file to test the extraction.

1
Upload
2
Results

Drop files here or click to browse

JPG · PNG · WebP  ·  up to 500 files · max 4.5 MB each

No files selected

Ready to use this in production? Get 20 free API calls — no credit card needed.

Get 20 Free API Calls →

Yard Management Workflows

Reach Stacker Automation

Equip your reach stackers with cameras that automatically verify the container ID upon lifting, updating the YMS with its new block and tier position automatically. Ready to scale your yard infrastructure? View flexible pricing to secure maximum API processing limits.

Automated Inventory Audits

Deploy mobile yard vehicles or drones equipped with cameras to sweep the yard blocks. The API rapidly extracts and validates ISO codes to reconcile physical inventory against the YMS database.

Empty Depot Stacking

Streamline empty container operations. Automatically track the movement and status of empty units as they are stacked, ensuring rapid dispatch when called by shipping lines.

Gate-to-Yard Handover

Create a seamless data handshake between the automated gate system and the yard. The YMS automatically directs incoming trucks to the correct block based on pre-validated OCR data.

Technical Specs

  • Edge Optimization: Deployed on Cloudflare's global edge network, ensuring ultra-low latency for time-critical equipment operations deep within the logistics yard.
  • Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs—ideal for intranet-connected yard tablets and IoT devices.
  • Validation: Built-in ISO 6346 checksum verification mathematically eliminates downstream database corruption in your YMS.
  • Skew & Angle Correction: Advanced algorithms natively handle skewed captures from ground-level spotters or high-angle reach stacker cameras.

Key Features

  • Free Image Testing: Instantly upload highly obscured images from your actual yard environment to test extraction accuracy before committing to integration.
  • Standardized Output: Returns a unified `container_number` string ready for database ingestion, while isolating the Owner Code, Category, Serial, and Check Digit in a parsed object.
  • Universal Compatibility: Pure REST API architecture ensures zero dependency conflicts, integrating smoothly with custom YMS platforms or enterprise software.

Integration & AI Prompts

Call the endpoint directly via HTTP from your YMS middleware or mobile yard devices. To maintain maximum security within port networks, the API flexibly accepts direct multipart file uploads or Base64-encoded strings, avoiding the need to expose local operations via public URLs.

import requests
import base64

# Prepare Base64 Image from reach stacker cabin camera
with open("yms_reach_stacker_cam.jpg", "rb") as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

url = "https://api.structocr.com/v1/container"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "img": base64_image
}

try:
    print("Scanning Yard Capture...")
    response = requests.post(url, headers=headers, json=payload)
    result = response.json()

    if result.get('success'):
        data = result['data']
        print("✅ Container Code Extracted!")
        print(f"Full Number:  {data.get('container_number')}")
        print(f"Valid ISO:    {data.get('is_valid')}")
        print(f"Confidence:   {data.get('confidence')}")
    else:
        print(f"❌ Extraction Failed: {result.get('error')} - {result.get('message')}")

except Exception as e:
    print(f"An error occurred: {e}")

Standardized JSON Output

The API returns a cleanly parsed payload providing the full consolidated container number, validating the check digit, and breaking down the ISO 6346 components for your YMS database.

{
  "success": true,
  "data": {
    "container_number": "ZCSU8921655",
    "is_valid": true,
    "confidence": "High",
    "parsed": {
      "owner_code": "ZCS",
      "category": "U",
      "serial_number": "892165",
      "check_digit": "5"
    }
  }
}

Frequently Asked Questions

Can I test the API with images from our yard equipment before integrating it into our YMS?

Absolutely. You can upload images directly on our platform to test how the OCR engine handles your specific camera angles, shadows, and yard conditions completely free of charge.

Do our mobile yard tablets need to expose images to public URLs?

No. The API is designed for secure, local integration, natively accepting direct file uploads and Base64-encoded strings directly from your tablets so your operations remain completely private.

Will this integrate with our custom-built Yard Management System?

Yes. Because we provide a standard HTTP REST API that returns structured JSON, it acts as a universal building block that can be easily consumed by any custom or commercial YMS stack.

Explore More Container Solutions

Precise Data Extraction and Seamless Integration with AI-powered OCR API.

Empower your solutions with automated data extraction by integrating best-in class StructOCR via API seamlessly.

No credit card required • Full API access included