Weighbridge Automation: Container OCR API

Sync physical container weight with digital records instantly. Upload your local weighbridge CCTV captures to test our extraction accuracy for free, ensuring rapid truck processing.

Truck parked on a weighbridge scale with the container number scanned in real-time, accompanied by an upload button for testing.

The Weighbridge Data Bottleneck

Weighbridges are critical chokepoints in logistics yards. When trucks mount the scale, manual data entry of the container number creates unnecessary delays, increases driver dwell time, and introduces human error that corrupts VGM (Verified Gross Mass) records. Standard OCR solutions often fail here due to skewed camera angles from scale-side pillars and heavy shadowing. 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.

Instant Extraction, Zero SDK Bloat

Delivered strictly as a high-performance REST API to ensure seamless integration into any language without heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine[cite: 2]. It processes incoming weighbridge captures in milliseconds across our global Cloudflare infrastructure. The engine applies strict ISO 6346 validation to verify the owner code and calculate the check digit, guaranteeing data integrity before it reaches your scale management software[cite: 2].

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 →

Weighbridge & Scale Scenarios

Automated VGM Compliance

Ensure SOLAS VGM compliance by automatically binding the accurately extracted ISO 6346 code to the measured gross mass weight without human intervention. Ready to scale your operations? View flexible pricing to secure maximum processing limits, supporting modern frictionless payment rails like USDT/USDC.

Fraud & Swap Prevention

Mitigate logistics fraud by visually confirming the container ID on the scale matches the expected manifest, preventing unauthorized container swapping before departure.

Unmanned Scale Kiosks

Enable drivers to process their own loads 24/7. The OCR API verifies the container in the background while the driver scans their paperwork, lifting the exit barrier automatically.

TOS & ERP Synchronization

Push perfectly validated container records directly from the scale software into your Terminal Operating System (TOS) or freight forwarder ERP in real-time.

Technical Specs

  • Validation: Built-in ISO 6346 checksum verification eliminates weight ticket mismatches[cite: 2].
  • Edge Optimization: Deployed purely on Cloudflare's edge network, ensuring ultra-low t1/t2 latency so trucks aren't left waiting on the scale.
  • Input Versatility: Fully supports raw Base64 strings, direct multipart file uploads, and public image URLs—ideal for offline or intranet scale environments[cite: 2].
  • Angle Correction: Algorithms specifically tuned to handle the low-angle, skewed perspectives common to ground-mounted weighbridge cameras.

Key Features

  • Free Image Testing: Instantly upload images from your actual weighbridge 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.
  • Harsh Environment Tolerance: Advanced filtering mitigates deep shadows from corrugated metal, rust, dirt, and intense direct sunlight common in port environments[cite: 2].

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[cite: 2].

import requests
import base64

# Prepare Base64 Image from local weighbridge CCTV capture
with open("scale_lane_2_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 Weighbridge 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 weighbridge camera images for free?

Absolutely. You can upload images directly on our platform to test the OCR engine's performance against your specific scale's camera angles and lighting conditions completely free of charge.

Do we need to expose our scale 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 sensitive cargo images never need to be hosted publicly[cite: 2].

How does the API format the extracted data?

It returns a standard JSON payload containing the complete `container_number` string for immediate use in your weight ticket, alongside a `parsed` object that separates the owner code, serial number, and check digit.

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