Industrial Container Code Recognition (CCR)
Automate terminal gates and logistics yards. Accurately extract ISO 6346 container numbers under extreme angles, harsh outdoor sunlight, and moving vehicle conditions.

The Reality of Terminal Gate OCR
Capturing container codes at active terminal gates presents extreme physical challenges. Cameras are often mounted high (CCR perspectives), resulting in 180-degree inverted text. Combined with harsh outdoor sunlight, deep structural shadows on corrugated metal, and multi-lane sequential checkpoints, standard OCR fails to maintain high throughput. For a deeper dive into overcoming these environmental hurdles, see our core Container OCR capabilities.
StructOCR: Built for the Yard and Gate
Engineered strictly as a high-performance REST API to ensure seamless integration into any language without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It features complete rotation invariance—automatically reading upside-down text from top-down cranes without pre-processing. The engine applies strict ISO 6346 validation to verify the owner code and calculate the check digit, guaranteeing data integrity before it reaches your Terminal Operating System (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
Ready to use this in production? Get 20 free API calls — no credit card needed.
Get 20 Free API Calls →Core Industry Applications
Automated Gate Systems (AGS)
Process inbound and outbound trucks instantly. By identifying the ISO 6346 container code as the truck crosses the weighbridge, gates can automatically lift without manual data entry. Ready to scale your operations? View flexible pricing to secure maximum processing limits for high-traffic nodes.
Crane Character Recognition (CCR)
Mount cameras directly on Ship-to-Shore (STS) cranes or Rubber-Tired Gantry (RTG) cranes. The API natively handles the extreme vertical angles and 180-degree rotations typical of top-down rigging capture.
Logistics Park Tracking
Monitor container movement across multi-checkpoint logistics parks. Track dwell times accurately from the initial gate-in scan to the warehouse docking bay.
Cross-Border Customs Checkpoints
Accelerate freight clearance by automatically cross-referencing the visually extracted container number with digital customs manifests in real-time.
Technical Specs
- Validation: Built-in ISO 6346 checksum verification.
- Edge Optimization: Infrastructure is routed through Cloudflare's global edge network, ensuring ultra-low t1/t2 latency for time-critical gate operations across Southeast Asia and globally.
- Rotation Invariance: Native support for 0°, 90°, 180°, and 270° orientations without manual pre-processing.
- Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs.
Key Features
- ISO 6346 Parsing: Perfectly isolates the 3-letter Owner Code (BIC), 1-letter Equipment Category, 6-digit Serial Number, and 1-digit Check Digit.
- Harsh Environment Tolerance: Advanced filtering mitigates deep shadows from corrugated metal, rust, dirt, and intense direct sunlight common in port environments.
- Multi-Camera Redundancy: High-throughput capacity supports concurrent API calls from multiple lane cameras capturing the same target, allowing your system to deduplicate based on timestamp and physical lane ID.
Integration & AI Prompts
Call the endpoint directly via HTTP. The API flexibly accepts standard image URLs, direct multipart file uploads, or Base64-encoded strings to minimize network latency on edge networks.
import requests
import base64
# Prepare Base64 Image from local CCTV capture
with open("ccr_lane22_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 Gate Capture...")
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get('success'):
data = result['data']['parsed']
print("✅ Container Code Extracted!")
print(f"Full Number: {data.get('owner_code')}{data.get('category')}{data.get('serial_number')}-{data.get('check_digit')}")
print(f"Valid ISO: {data.get('is_valid')}")
print(f"Confidence: {result['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 breaking down the ISO 6346 components, validating the check digit, and providing a structural confidence score.
{
"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
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 (such as 'EMCU' appearing upside down) without requiring you to rotate the image payload prior to calling the API.
Can we upload images directly from our local DVR instead of using URLs?
Yes. The API is designed to integrate cleanly with local systems, natively accepting both direct file uploads and Base64-encoded strings, avoiding the need to host sensitive gate images on public URLs.
What happens if a character is obscured by rust or a shadow?
Because the API enforces ISO 6346 logic, if a single digit in the serial number is obscured but the rest of the code is legible, the engine utilizes the calculated check digit to intelligently verify and reconstruct the missing alphanumeric character.
Explore More Container Solutions
BIC Code Extraction: Container OCR API
Extract BIC Owner Codes from shipping containers instantly. Upload your images to test our high-accuracy BIC Code OCR API for free and automate equipment tracking.
How to Build a Container Recognition Scanner App
Step-by-step developer guide on how to build a custom container recognition scanner using a lightweight API. Test your image payloads for free today.
Check Digit Calculator: Container OCR API
Automate container check digit calculation with our high-accuracy OCR API. Upload images to test ISO 6346 validation for free and prevent manual data entry errors.
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