Intermodal Rail: Container OCR API
Seamlessly track containers transferring between trains and trucks. Upload your local rail terminal captures to test our extraction accuracy for free, perfectly handling double-stacked well cars and moving freight.

The Friction at the Rail-Road Handover
Intermodal terminals are fast-paced hubs where supply chain velocity is critical. Moving containers from trains to trucks involves high-speed gantry cranes and reach stackers. When terminal operators rely on manual spotters to read container numbers, it creates dangerous bottlenecks and delays train departures. Furthermore, extreme outdoor lighting, motion blur from passing railcars, and complex double-stacked configurations cause standard OCR systems to fail entirely. To see how our engine cuts through these extreme dynamic challenges, you can upload a test image to explore our core Container OCR capabilities completely free.
A High-Speed API for Rail Operations
Delivered strictly as a lightweight REST API to ensure seamless integration into any Intermodal Terminal Operating System (ITOS) without the bloat of heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It provides instant, automated verification across the rail yard. 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 train manifests and truck dispatch logs.
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
Intermodal Terminal Scenarios
Rail-to-Truck Transfer Automation
Instantly verify containers as they are lifted from railcars to chassis, completely preventing incorrect loading and misrouted freight. Ready to scale your intermodal network globally? View flexible pricing to secure maximum processing limits using modern payment rails like USDT/USDC.
Double-Stack Well Car Parsing
Natively handle complex train configurations. The API accurately separates and reads ISO codes from both top and bottom containers on double-stack trains without confusing the sequence.
Trackside Arrival Gateways
Scan inbound and outbound trains at track speed as they pass through the terminal gateway, automatically reconciling the physical consist against electronic data interchange (EDI) records.
Gantry Crane Synchronization
Deploy automated cameras directly on rail-mounted gantry (RMG) cranes to continuously track the exact track and spot position of every container lifted.
Technical Specs
- Edge Optimization: Deployed purely on Cloudflare's global edge network, ensuring ultra-low t1/t2 latency to process fast-moving trains without throttling.
- Input Versatility: Fully supports raw Base64 strings and direct multipart file uploads—ideal for edge gateways and IoT devices installed directly at the rail yard.
- Validation: Built-in ISO 6346 checksum verification mathematically guarantees data accuracy before matching it to the rail EDI manifest.
- Stack & Blur Tolerance: Advanced algorithms natively isolate characters from stacked containers and mitigate the motion blur of continuous rail movement.
Key Features
- Free Image Testing: Instantly upload highly obscured images from your actual intermodal facility to test extraction accuracy before deploying the API across your tracks.
- 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 legacy rail tracking systems and modern ITOS.
Integration & AI Prompts
Call the endpoint directly via HTTP from your intermodal management software or trackside edge devices. To maintain strict operational security, the API flexibly accepts direct multipart file uploads or Base64-encoded strings, avoiding the need to expose local rail cameras to public URLs.
import requests
import base64
# Prepare Base64 Image from an intermodal trackside camera
with open("intermodal_transfer_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 Intermodal 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 intermodal software.
{
"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 we test the API with images from our intermodal rail yard before integrating it?
Absolutely. You can upload images directly on our platform to test how the OCR engine handles your specific camera angles, double-stacked cars, and train speeds completely free of charge.
How does the API handle double-stacked containers on well cars?
Our visual parsing algorithms are trained on complex rail configurations, cleanly separating text from both the top and bottom containers to ensure they are read distinctly and accurately.
Do we need to expose sensitive trackside camera feeds to public URLs?
No. The API natively accepts direct file uploads and Base64-encoded strings directly from your secure network or edge devices, ensuring full operational privacy.
Explore More Container Solutions
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.
Container OCR API for Australian Logistics
High-accuracy ISO 6346 container number extraction for Australian ports and intermodal yards. Upload your image for a free test today to see instant results.
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.
Industrial Container Code Recognition (CCR)
Extract ISO 6346 container numbers from challenging terminal environments. High-accuracy OCR featuring 180-degree rotation invariance and shadow mitigation.
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.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
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.
Manual TOS Entry vs. Container OCR Automation API
Analyzing the ROI and operational efficiency of replacing manual gate checkers with an automated Container OCR API in logistics yards.
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.
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.