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
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
Container OCR API for Malaysian Logistics
Automate Port Klang and local logistics yards with our robust Container OCR API. Upload a challenging container image for a free accuracy test today.
Container OCR API for Netherlands Logistics
Automate Rotterdam and Dutch inland terminals with our high-accuracy ISO 6346 Container OCR API. Upload your image for a free test today to verify accuracy.
Container OCR API for Saudi Arabia Supply Chains
Scale Saudi logistics and Vision 2030 smart ports with our high-throughput Container OCR API. Upload a challenging image for a free accuracy test today.
Container OCR API for Singapore Terminals
High-throughput ISO 6346 container extraction for Singapore's automated transshipment hubs. Upload an image for a free real-time accuracy test.
Container OCR API for Southeast Asia Logistics
Scale your ASEAN logistics software with our high-accuracy Container OCR API. Upload challenging yard images for a free extraction test.
Railway Portals: Container OCR API
Extract ISO 6346 codes from moving freight trains. Upload your railway portal camera captures to test our Container OCR API for free. Built for high-speed intermodal logistics.
Container OCR API for UAE Ports & Logistics
High-accuracy ISO 6346 container extraction for Dubai and UAE ports. Overcome extreme sun glare and sandstorms. Upload an image for a free test today.
Container OCR API for UK Logistics
High-accuracy container number extraction for UK ports and rail hubs. Overcome heavy rain and automate customs clearance. Upload an image for a free test.
Container OCR API for United States Logistics
Automate US port gates and intermodal yards with our high-throughput Container OCR API. Upload a challenging image for a free accuracy test today.
Weighbridge Automation: Container OCR API
Automate weighbridge data entry with our Container OCR API. Upload scale camera captures to test our ISO 6346 extraction for free. Eliminate manual logging and truck delays.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Container OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Replit application. Build logistics and yard management tools using Replit Agent and Secrets.
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.
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.