ISO 6346 Validation: Container OCR API
Extract and perfectly validate international container numbers. Upload your raw images to test our extraction and automatic check-digit calculation for free, ensuring flawless data integrity.

The Complexity of Container Parsing
The ISO 6346 standard is the backbone of global shipping, requiring a precise combination of a 3-letter BIC owner code, an equipment category identifier, a 6-digit serial number, and a mod-11 check digit. Standard OCR tools treat this simply as a string of text, failing to understand the mathematical relationship between these characters. When visual obstructions like rust or shadows cause a single misread character, unstructured OCR passes corrupt data downstream, breaking your logistics database. To see how our engine cuts through these structural challenges, you can upload a test image to explore our core Container OCR capabilities completely free.
Mathematical Verification Built-In
Delivered strictly as a lightweight REST API to ensure seamless integration without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It doesn't just read text; it understands the standard. The engine applies strict ISO 6346 validation on the fly, instantly calculating the check digit against the owner and serial codes to guarantee perfectly accurate output.
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
ISO 6346 Application Scenarios
Global Data Standardization
Normalize inbound container data across your entire software ecosystem. Receive pre-parsed, validated components directly into your database. Ready to scale your operations globally? View flexible pricing to secure maximum API limits, utilizing modern frictionless payment rails like USDT/USDC.
Automated Error Reconstruction
Leverage the ISO 6346 algorithm for error correction. If a single character is obscured by a physical dent or rust, the API uses the check digit math to intelligently deduce and reconstruct the missing alphanumeric value.
Equipment Ownership Audits
Instantly isolate the 3-letter BIC code from the full string to automatically identify the leasing company or shipping line that owns the equipment.
Check Digit Verification
Prevent manual data entry typos at the gate or warehouse by instantly running a background validation check on both OCR-extracted and human-entered container codes.
Technical Specs
- Edge Optimization: Infrastructure is routed through Cloudflare's global edge network, ensuring ultra-low t1/t2 latency for high-frequency algorithmic checks.
- Built-in Logic: Natively executes the mod-11 weighting algorithm specified by the International Container Bureau (BIC) to verify data authenticity.
- Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs—preventing the need to host sensitive images publicly.
- Dependency-Free: Pure REST architecture prevents language or framework lock-in, bypassing the need for complex SDK maintenance.
Key Features
- Free Image Testing: Instantly upload images to test the mathematical validation and structural parsing accuracy before committing to integration.
- Granular Output: Cleanly separates the alphanumeric string into its distinct, meaningful components within a structured JSON object.
- Algorithmic Recovery: Uses the mathematical relationship of the check digit to repair minor OCR confidence gaps automatically.
Integration & AI Prompts
Call the endpoint directly via HTTP. The API is designed for maximum input versatility, natively accepting standard image URLs, direct multipart file uploads, or Base64-encoded strings to suit any local or cloud architecture.
import requests
import base64
# Prepare Base64 Image for ISO 6346 parsing
with open("container_iso_scan.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("Validating ISO 6346 Code...")
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get('success'):
data = result['data']
parsed = data.get('parsed', {})
print("✅ Container Code Extracted & Parsed!")
print(f"Full Number: {data.get('container_number')}")
print(f"Owner Code: {parsed.get('owner_code')}")
print(f"Serial: {parsed.get('serial_number')}")
print(f"Check Digit: {parsed.get('check_digit')} (Valid: {data.get('is_valid')})")
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 precise 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 ISO validation API for free?
Absolutely. You can upload container images directly on our platform to see how the engine extracts the text and performs the mod-11 check digit calculation completely free of charge.
What happens if an image only shows the owner code and serial, but the check digit is cut off?
The API will still extract the available alphanumeric characters, but the `is_valid` flag in the JSON response will be set to false, alerting your system that the standard ISO 6346 criteria could not be met.
Do you provide SDKs for validating these codes?
We focus entirely on providing a lightning-fast, universal REST API to prevent dependency conflicts across your stack. This ensures simple integration via standard HTTP requests whether you use Base64 strings, file uploads, or URLs.
Explore More Container Solutions
Industrial Shipping Container Number Scanner API
Looking for a shipping container number scanner? Turn any mobile device or CCTV camera into an industrial container scanner via our REST API. Upload an image for a free test.
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.
Enterprise Container Code Reader Software API
Integrate industrial container code reader software into your TOS or WMS via a lightweight REST API. Upload your images for a free accuracy test today.
Container OCR API for Canadian Terminals
High-accuracy ISO 6346 container number extraction built for extreme Canadian weather. Overcome snow, ice, and glare. Upload an image for a free test today.
Automated Crane Tally: Container OCR API
Automate crane tally operations with our Container OCR API. Upload STS or RTG crane camera captures to test our ISO 6346 extraction for free. Handles 180-degree rotations effortlessly.
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.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
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.
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.
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.