Automated Gate Systems: Container OCR API
Eliminate truck queues and manual logging at the gate. Upload your local CCTV captures to test our extraction accuracy for free, handling motion blur and difficult lighting with ease.

The Bottleneck at the Gate
Managing high-throughput automated gate systems (AGS) requires zero bottlenecks. When trucks arrive, traditional optical character recognition often struggles with motion blur, angled captures from gate pillars, and variable outdoor lighting. These failures lead to manual exception handling and severe terminal congestion. To see how our engine cuts through these baseline visual challenges, you can upload a test image to explore our core Container OCR capabilities completely free.
Streamlined API, Zero SDK Bloat
Delivered strictly as a lightweight REST API rather than a heavy SDK, this endpoint integrates directly into your gate logic regardless of your backend language. Powered by our Logistics Container OCR engine, it processes incoming captures in milliseconds. The system natively performs ISO 6346 validation on the fly, instantly calculating check digits to ensure the Container Code is perfectly accurate before triggering the automated barrier.
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 →Gate Automation Scenarios
Unmanned Gate Checkpoints
Process inbound and outbound trucks without human intervention. By matching OCR data with expected manifests automatically, barriers lift instantly. Ready to scale your gate operations? View flexible pricing to secure maximum processing limits for high-traffic nodes.
Weighbridge Synchronization
Capture the container ID simultaneously as the truck triggers the weighbridge sensor, tying the physical container weight to the correct ISO 6346 code in one consolidated database record.
Damage Inspection Portals
Index high-resolution images of container damage taken at the gate directly to the extracted container number, creating an automated, searchable audit trail for liability purposes.
Fleet & Dispatch Management
Log exactly when specific containers enter or leave the depot. Empower your dispatchers with real-time visibility into yard inventory and truck turnaround times.
Technical Specs
- Edge Optimization: Our infrastructure is deployed globally on Cloudflare's edge network, ensuring ultra-low t1/t2 latency for rapid gate barrier responses.
- Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs—ideal for secure intranet gate systems.
- Validation: Built-in ISO 6346 checksum verification eliminates downstream data corruption in your TOS.
- Motion Tolerance: Algorithms specifically tuned to mitigate motion blur from trucks passing checkpoints at moderate speeds.
Key Features
- Free Image Testing: Instantly upload images from your actual yard cameras to test extraction accuracy before writing any integration code.
- Standardized Output: Returns a unified `container_number` string while perfectly isolating the 3-letter Owner Code, 1-letter Category, 6-digit Serial, and Check Digit in a parsed object.
- High-Throughput Concurrency: Robust architecture supports simultaneous API calls across dozens of gate lanes without throttling.
Integration & AI Prompts
Call the endpoint directly via HTTP. To maintain maximum security and reduce latency at edge nodes, the API flexibly accepts direct multipart file uploads or Base64-encoded strings, avoiding the need to expose gate camera feeds via public URLs.
import requests
import base64
# Prepare Base64 Image from local gate CCTV capture
with open("gate_lane_1_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']
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.
{
"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 gate camera images for free?
Absolutely. You can upload images directly on our platform to test the OCR engine's performance against your specific camera angles and lighting conditions completely free of charge.
Do we need to expose our gate CCTV images to public URLs to use this API?
No. The API is designed for secure, local integration, natively accepting direct file uploads and Base64-encoded strings so your images never need to be hosted publicly.
How does the API format the extracted data?
It returns a standard JSON payload containing the complete `container_number` string for immediate use, alongside a `parsed` object that separates the owner code, serial number, and check digit.
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