Automated Crane Tally: Container OCR API
Instantly verify container numbers directly from Ship-to-Shore (STS) or RTG cranes. Upload your top-down camera captures to test our extraction accuracy completely free, seamlessly handling 180-degree inversions and extreme vertical angles.

The Challenge of Top-Down Tallying
Tallying containers as they are lifted by Ship-to-Shore (STS) or Rubber-Tired Gantry (RTG) cranes introduces extreme visual complexities. Cameras mounted high on spreader beams capture images at steep, shifting angles. As containers sway and rotate in mid-air, the ISO 6346 text often appears completely upside-down. Traditional OCR systems fail under these dynamic conditions, forcing ports to rely on slow, manual spotters. To see how our engine cuts through these baseline visual challenges, you can upload a test image to explore our core Container OCR capabilities completely free.
Rotation-Invariant OCR API
Delivered strictly as a lightweight REST API to ensure seamless integration into any terminal architecture without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It features complete rotation invariance—automatically reading 180-degree inverted text from top-down cranes without pre-processing. The engine applies strict ISO 6346 validation on the fly, instantly calculating check digits to guarantee perfect data integrity before it reaches your TOS.
Live Demo: Container OCR
No registration required. Upload a file to test the extraction.
Drop files here or click to browse
JPG · PNG · WebP · up to 500 files · max 4.5 MB each
Crane Automation Scenarios
Ship-to-Shore (STS) Discharge
Process inbound vessel discharge automatically. Identify the ISO 6346 container code as the spreader locks on, eliminating manual deck tally clerks. Ready to scale your terminal? View flexible pricing to secure maximum processing limits for high-traffic nodes.
RTG Yard Stacking
Track exact yard inventory dynamically. The OCR API verifies the container ID as the RTG crane places it into the block, ensuring the physical location perfectly matches your Yard Management System (YMS).
Spreader Beam Integration
Process feeds from multiple cameras mounted on the spreader frame. Our system handles overlapping inputs, deduplicating the reads to output one highly confident container number per lift.
Roof Damage Inspection
Index high-resolution images of the container roof and structural integrity taken during the lift directly to the extracted container number, creating an automated, searchable audit trail.
Technical Specs
- Rotation Invariance: Native support for 0°, 90°, 180°, and 270° orientations, automatically solving the upside-down text problem caused by swinging crane spreaders.
- Edge Optimization: Our infrastructure is deployed globally on Cloudflare's edge network, ensuring ultra-low t1/t2 latency for rapid tally responses.
- Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs—ideal for secure port intranet systems.
- Validation: Built-in ISO 6346 checksum verification eliminates downstream data corruption in your Terminal Operating System (TOS).
Key Features
- Free Image Testing: Instantly upload images from your actual STS or RTG cameras to test extraction accuracy and rotation handling before writing any integration code.
- Standardized Output: Returns a unified `container_number` string while perfectly isolating the 3-letter Owner Code, 1-letter Category, 6-digit Serial, and Check Digit in a parsed object.
- Harsh Environment Tolerance: Advanced filtering mitigates deep shadows from corrugated metal roofs, rust, dirt, and glare from ocean reflections.
Integration & AI Prompts
Call the endpoint directly via HTTP. To maintain maximum security and reduce latency at edge nodes, the API flexibly accepts direct multipart file uploads or Base64-encoded strings, avoiding the need to expose live crane camera feeds via public URLs.
import requests
import base64
# Prepare Base64 Image from local crane spreader capture
with open("crane_sts_4_capture.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 Crane 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.
{
"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 my own crane camera images for free?
Absolutely. You can upload images directly on our platform to test the OCR engine's performance against your specific crane's camera angles and 180-degree rotations completely free of charge.
How does the API handle upside-down text from top-down crane cameras?
The engine features complete rotation invariance. It will automatically detect, rotate, and read text that is 180-degrees inverted without requiring you to manually rotate the image payload prior to calling the API.
Do we need to expose our crane CCTV images to public URLs to use this API?
No. The API is designed for secure, local integration, natively accepting direct file uploads and Base64-encoded strings so your operational images never need to be hosted publicly.
Explore More Container Solutions
Customs Clearance: Container OCR API
Accelerate cross-border freight clearance with our Container OCR API. Upload border checkpoint images to test our ISO 6346 extraction for free. Eliminate manual customs delays.
Damage Inspection: Container OCR API
Automate container damage inspection with our high-accuracy OCR API. Upload photos of dented or rusted containers to test ISO 6346 extraction for free.
Empty Depot Management: Container OCR API
Streamline your empty container depot operations with our high-accuracy OCR API. Upload yard captures to test our ISO 6346 extraction for free and eliminate lost units.
Container OCR API for European Terminals
High-accuracy ISO 6346 container number extraction for European automated ports and rail networks. Upload your image for a free test to verify accuracy instantly.
Intermodal Rail: Container OCR API
Automate intermodal rail operations with our high-accuracy Container OCR API. Upload rail yard captures to test our ISO 6346 extraction for free. Built for high-speed logistics.
ERP Integration: Container OCR API
Integrate container OCR data directly into your ERP system. Upload logistics photos to test our ISO 6346 extraction for free and eliminate manual data entry.
TOS Integration: Container OCR API
Integrate high-accuracy Container OCR directly into your Terminal Operating System (TOS). Upload terminal CCTV captures to test our ISO 6346 extraction for free.
Warehouse Management Systems: Container OCR API
Automate your Warehouse Management System (WMS) receiving process. Upload loading dock captures to test our high-accuracy Container OCR API for free.
Yard Management Systems: Container OCR API
Automate your Yard Management System (YMS) with our high-accuracy Container OCR API. Upload yard captures to test our ISO 6346 extraction for free.
Automated Gate Systems: Container OCR API
Automate terminal gates with our high-accuracy Container OCR API. Upload your own CCTV images to test our ISO 6346 extraction for free. Built for moving vehicles.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Tesseract OCR vs. StructOCR API for ISO 6346 Container Numbers
A technical comparison for developers evaluating open-source Tesseract vs. a dedicated cloud API for extracting shipping container numbers.
Add Container OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a v0 by Vercel app. Build logistics and yard management tools with zero backend.
Add Container OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Bolt.new app. Build logistics and yard management tools right in your browser.
Add Container OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API using the Cursor AI code editor. Build logistics and yard management tools rapidly.
Google Cloud Vision vs. StructOCR API for Shipping Containers
Comparing generic enterprise OCR solutions like Google Cloud Vision against StructOCR's purpose-built API for ISO 6346 shipping container recognition.
Add Container OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Lovable.dev app. Build logistics and yard management tools with zero backend.
From tutorial to production in 5 minutes.
You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.