Container OCR API for European Terminals

Powering automation from Rotterdam to inland rail hubs. Accurately extract ISO 6346 codes through heavy rain, fog, and complex AGV movements. Upload your own image for a free test today.

Top-down view of a shipping container at a European automated terminal, showing the extracted EMCU 850473 0 container number under overcast lighting.

The Reality of Terminal Gate OCR in Europe

European ports lead the world in automation, utilizing Automated Guided Vehicles (AGVs) and dense stacking yards. Capturing container codes in these environments presents unique challenges: high-speed continuous movement, complex top-down crane angles, and frequent rain, fog, or snow that obscures standard optical scanners. Maintaining ultra-high throughput requires an engine that ignores environmental noise. For a deeper dive into overcoming these specific environmental hurdles, see our core Container OCR capabilities.

StructOCR: Built for High-Density Automated Ports

Engineered strictly as a high-performance REST API to ensure seamless integration into European Terminal Operating Systems (TOS) without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It features complete rotation invariance—automatically reading upside-down text from ARMG cranes without pre-processing. The engine applies strict ISO 6346 validation to verify the owner code and calculate the check digit, guaranteeing absolute data integrity.

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 the European Market

Automated Terminals (Rotterdam / Antwerp)

Process inbound and outbound freight flawlessly. By identifying ISO 6346 container codes instantly as AGVs move through the yard, terminal operations achieve seamless automation. Ready to scale your operations? View flexible pricing, featuring modern payment rails like USDC/USDT to bypass traditional cross-border financial friction for international enterprises.

Trans-European Rail Networks

Deploy across extensive inland rail corridors. The API natively handles the extreme vertical angles and high-speed captures required for moving freight trains across European borders.

Inland Waterway Barges

Track container movements at inland river terminals. Ensure accurate logging of containers loading onto barges along the Rhine and Danube without manual intervention.

Post-Brexit Customs Clearance

Accelerate freight clearance by automatically cross-referencing the visually extracted container number with digital customs manifests in real-time, reducing friction at new border checkpoints.

Technical Specs

  • Validation: Built-in ISO 6346 checksum verification.
  • European Edge Optimization: Infrastructure is routed through Cloudflare's global edge network, with primary processing nodes in Frankfurt, London, and Amsterdam for 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, direct multipart file uploads, and public image URLs for secure internal network integration.

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 in Northern Europe.
  • Multi-Camera Redundancy: High-throughput capacity supports concurrent API calls from multiple lane cameras capturing the same target, allowing your system to deduplicate based on timestamp and physical lane ID.

Integration & AI Prompts

Call the endpoint directly via HTTP. The API flexibly accepts standard image URLs, direct multipart file uploads, or Base64-encoded strings to minimize network latency on edge networks.

import requests
import base64

# Prepare Base64 Image from local CCTV capture
with open("ccr_rotterdam_gate3.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')}")
        print(f"Valid ISO:    {data.get('is_valid')}")
        print(f"Confidence:   {result['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 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 captures (via direct file upload or URL) and instantly verify the extraction accuracy.

How does the API ensure low latency for European operations?

Our core architecture is deployed on Cloudflare, meaning API requests from European terminals are routed through local edge nodes (such as Amsterdam and Frankfurt), minimizing t1 and t2 latency for mission-critical gate automation.

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 in memory for extraction and are not stored, adhering to strict data processing standards.

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