Container OCR API for UK Logistics
Automate terminal gates and rail portals from Felixstowe to Southampton. Accurately extract ISO 6346 codes through heavy rain and overcast conditions. Upload your image for a free instant test.

The Reality of UK Port and Customs Automation
UK ports and logistics parks face a dual challenge: navigating post-Brexit border friction that demands hyper-accurate data logging, and battling unpredictable British weather. Capturing container codes frequently fails when optical scanners are obscured by heavy rain, fog, and low-contrast lighting. Furthermore, complying with strict local data standards means relying on complex, outdated on-premise hardware rather than agile cloud systems. For a deeper dive into overcoming these specific environmental hurdles, see our core Container OCR capabilities.
StructOCR: Agile Infrastructure for Modern UK Trade
Engineered strictly as a high-performance REST API to ensure seamless integration into UK Customs and logistics platforms without heavy SDK dependencies, this endpoint is powered by our resilient Logistics Container OCR engine. It features complete rotation invariance—automatically reading upside-down text. The engine applies strict ISO 6346 validation to mathematically verify the owner code and check digit, guaranteeing absolute data integrity for compliance records.
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 Applications for the UK Market
Post-Brexit Customs Clearance
Accelerate freight clearance. Automatically cross-reference visually extracted container numbers with digital customs manifests (CHIEF/CDS) in real-time. Ready to optimize? View flexible pricing to integrate high-speed processing into your compliance software.
Automated Port Gates (Felixstowe/Southampton)
Process inbound and outbound trucks flawlessly. Identify ISO 6346 codes instantly as HGVs pass through terminal checkpoints, despite adverse weather.
Inland Intermodal Rail
Deploy across extensive inland rail corridors connecting coastal ports to the Midlands. The API natively handles high-speed captures of moving freight trains.
Logistics Park Access Control
Automate security barriers at major distribution centers by matching approaching container codes against expected arrival schedules securely via internal Base64 payloads.
Technical Specs
- Validation: Built-in ISO 6346 checksum verification.
- UK Edge Optimization: Infrastructure is routed through Cloudflare's global edge network, with primary processing nodes in London providing ultra-low latency.
- Rotation Invariance: Native support for 0°, 90°, 180°, and 270° orientations without manual pre-processing.
- Input Versatility: Fully supports raw Base64 strings and direct multipart file uploads to align with strict corporate data handling policies.
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 Weather Tolerance: Advanced filtering mitigates image noise from rain, fog, dirt, and heavy cloud cover common across the UK.
- Zero SDK Overhead: Integration requires no native dependencies, keeping your compliance and logistics applications lightweight.
Integration & AI Prompts
Call the endpoint directly via HTTP. The API securely handles raw Base64 strings and direct multipart file uploads, ensuring sensitive logistics imagery doesn't require public URL hosting.
import requests
import base64
# Prepare Base64 Image from local UK port CCTV capture
with open("uk_customs_lane1.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')}")
else:
print(f"❌ Extraction Failed: {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
Can I test the API with my own images for free before subscribing?
Yes! You can utilize our free image test directly on the platform to upload your own challenging UK captures and instantly verify the extraction accuracy.
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 rotate the image payload first.
Does sending images to the API violate strict data privacy requirements?
The API accepts Base64-encoded strings and direct file uploads, meaning you do not need to host sensitive images publicly. Furthermore, images are processed statelessly in memory and are never retained.
Explore More Container Solutions
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.
Choosing the Right Container OCR System Provider
Evaluating a container OCR system provider? Compare our high-concurrency API infrastructure. Upload your image for a free test to see our extraction accuracy.
Intermodal Rail OCR API for North America
Automate high-speed intermodal rail scanning across North America. Extract container numbers from moving trains natively. Upload your image for a free test.
ISO 6346 Validation: Container OCR API
Parse and validate ISO 6346 container codes with our high-accuracy OCR API. Upload images to test extraction and automatic check-digit calculation for free.
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.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
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.
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.
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.