Intermodal Rail OCR API for North America

Powering rail portals across the continent. Accurately extract ISO 6346 codes from fast-moving freight trains under challenging lighting. Upload your capture for a free accuracy test.

View of a shipping container loaded on an intermodal rail car, showing the extracted EMCU 850473 0 container number successfully scanned during movement.

The Complexity of Rail Portal Scanning

Capturing container codes on North America's vast intermodal rail networks presents extreme technical hurdles. Rail portal cameras must capture data from double-stacked containers on freight trains moving at high speeds, resulting in motion blur, varying vertical angles, and harsh shadows. Traditional systems fail to maintain high throughput and struggle to isolate text from the corrugated ribs of the container. For a deeper dive into overcoming these environmental hurdles, see our core Container OCR capabilities.

StructOCR: Built for High-Speed Rail Infrastructure

Engineered strictly as a high-performance REST API to ensure seamless integration into railway ERP systems without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It natively processes multiple concurrent image streams and handles the varied angles typical of trackside portals. 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
Need more testing? Create a free account to get 200 free credits (equals 200 Container scans).

Core Applications for North American Railways

High-Speed Rail Portals

Process inbound and outbound trains instantly. By identifying the ISO 6346 container code as the train passes the scanning portal, rail operators achieve seamless manifest verification. Ready to scale your operations? View flexible pricing, supporting frictionless international payments via cryptocurrency (USDT/USDC) or fiat through Paddle.

Intermodal Transfer Yards

Automate the handover between rail and truck. The API identifies containers as they are lifted by reach stackers, ensuring accurate tracking during the physical mode switch.

Double-Stack Container Verification

Deploy multi-camera setups to scan top and bottom containers simultaneously. The API's high concurrency capacity easily manages the dual-stream workload.

Automated Damage Inspection Sync

Link the precise container ID extracted by the API with high-resolution rail portal damage inspection images to create an indisputable digital audit trail.

Technical Specs

  • Validation: Built-in ISO 6346 checksum verification eliminates manual typing errors.
  • North American Edge Optimization: Infrastructure is routed through Cloudflare's global edge network (bypassing slow Vercel cold starts), providing ultra-low t1/t2 latency crucial for fast-moving rail applications.
  • Rotation Invariance: Native support for varied angles, ensuring accuracy whether the camera is mounted trackside or overhead.
  • Input Versatility: Fully supports raw Base64 strings and direct multipart file uploads, ideal for closed-circuit rail network security systems.

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 the physical distance required for safe trackside camera mounting.
  • High-Concurrency Scalability: Processes massive bursts of API requests simultaneously as 100+ car freight trains pass through automated scanning portals.

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 high-speed rail portal capture
with open("rail_portal_track4.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 Moving Train Capture...")
    response = requests.post(url, headers=headers, json=payload)
    result = response.json()

    if result.get('success'):
        data = result['data']['parsed']
        print("✅ Rail 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 rail images for free before subscribing?

Yes! You can utilize our free image test directly on the platform to upload your own challenging trackside captures (via direct file upload or URL) and instantly see the accuracy of our extraction engine.

Can we upload images directly from our local rail systems instead of using URLs?

Yes. The API is designed to integrate cleanly with local systems, natively accepting both direct file uploads and Base64-encoded strings, avoiding the need to host sensitive rail images on public networks.

Can international logistics providers pay for the API seamlessly?

Absolutely. Alongside standard fiat options, our payment infrastructure natively accepts cryptocurrency settlements (USDT/USDC) to bypass cross-border friction for global intermodal operations.

Explore More Container Solutions

SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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
SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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.

Container
SOLUTION

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.

Container

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

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.

Instant Access Cancel Anytime 99.9% Uptime