Container OCR API for United States Logistics

Eliminate gate congestion from Long Beach to Newark. Accurately extract ISO 6346 codes under harsh coastal glare and high-traffic conditions. Upload your own image for a free instant test.

Top-down view of a shipping container at a bustling US terminal gate, showing the extracted EMCU 850473 0 container number.

Tackling Congestion at US Terminal Gates

US ports and inland logistics hubs face unprecedented cargo volumes and severe labor shortages. Relying on manual gate checks or legacy on-premise hardware creates massive trucking bottlenecks. Cameras must endure harsh sunlight, and capture systems frequently fail when reading inverted text from overhead cranes or worn-out container markings. Modernizing US supply chains requires agile, high-concurrency cloud infrastructure. For a deeper dive into overcoming these environmental hurdles, see our core Container OCR capabilities.

StructOCR: Scalable Cloud Infrastructure for the US Market

Engineered purely as a high-performance REST API to bypass the integration friction of bulky software SDKs, this endpoint is powered by our Logistics Container OCR engine. It features complete rotation invariance—automatically reading upside-down text from automated yard cranes without pre-processing. The system applies strict ISO 6346 validation algorithms to calculate the check digit, ensuring bad data never bottlenecks your Terminal Operating System (TOS).

Live Demo: Container OCR

No registration required. Upload a file to test the extraction.

1
Upload
2
Results

Drop files here or click to browse

JPG · PNG · WebP  ·  up to 500 files · max 4.5 MB each

No files selected

Ready to use this in production? Get 20 free API calls — no credit card needed.

Get 20 Free API Calls →

Core Applications for American Supply Chains

High-Volume Gate Automation

Process inbound and outbound trucks instantly across multi-lane US ports. By identifying ISO 6346 codes instantly, gates lift automatically. Ready to scale? View flexible pricing to secure maximum API rate limits for peak American port traffic hours.

Chassis & Container Matching

Cross-reference extracted container IDs with chassis registries in real-time, solving common asset tracking disputes in sprawling North American yards.

Warehouse Distribution Centers

Automate receiving at massive inland fulfillment centers. Mobile staff can upload images directly from the dock doors using our API's file upload support.

Customs-Trade Partnership Against Terrorism (CTPAT)

Enhance security compliance by providing accurate, digitized, and timestamped logs of every container entering or exiting a secured US facility.

Technical Specs

  • Validation: Built-in ISO 6346 checksum verification.
  • North American Edge Optimization: Our infrastructure is deployed globally on Cloudflare (avoiding Vercel routing bottlenecks), providing ultra-low t1/t2 latency for API requests originating from the East and West Coasts.
  • 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, and intense direct sunlight common in Southern US ports.
  • Zero SDK Friction: Connect your existing US logistics platforms immediately using standard API calls without maintaining proprietary software libraries.

Integration & AI Prompts

Call the endpoint directly via standard HTTP protocols. The API natively supports raw Base64 strings, direct multipart file uploads, or image URLs to minimize latency on edge networks.

import requests
import base64

# Prepare Base64 Image from local US port CCTV capture
with open("gate_capture_lane7.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 US 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, ready for immediate injection into your local WMS or ERP.

{
  "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 US terminal captures (via direct file upload or URL) and instantly see the accuracy of our extraction engine.

Is the latency high for East Coast or West Coast operations?

No. Because our infrastructure operates on Cloudflare's edge network, API requests are routed through local North American nodes, ensuring lightning-fast response times crucial for weighbridge and gate automation.

Do we have to host our sensitive gate images on public URLs to use the API?

Absolutely not. The API natively supports direct file uploads and Base64-encoded strings, keeping your security feeds entirely private and within your local corporate network perimeter.

Explore More Container Solutions

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