How to Choose a Container Number OCR API in 2026

A practical checklist for evaluating container number OCR APIs: coverage, accuracy on real photos, error handling, privacy, and cost per successful result.

Why Demos Mislead

Most container number OCR demos use clean, flat images. Production traffic includes glare, blur, cropped edges, and unusual issuers, and those images decide your real success rate and cost.

Evaluate on Your Own Images

Collect a consented sample of real customer images, run each candidate API on the same set, and compare field-level accuracy and failure behaviour. StructOCR offers 200 free credits for this; see the API docs and the free scanner.

Where This Fits

  • Accuracy: Measure per-field accuracy, not just “document read”, and check how often the API returns plausible but wrong values.
  • Failure handling: Prefer APIs that return clear errors you can turn into retake prompts over ones that return partial guesses.
  • Cost per success: Compare cost per successful result, including whether failed requests are billed.
Need more testing? Create a free account to get 200 free credits (equals 200 Container scans).

Benchmark Script Starting Point

Call the API for each test image and store the JSON for side-by-side comparison.

Prerequisite: Python 3.9+, `pip install requests`, and a STRUCTOCR_API_KEY

PYTHON EXAMPLE
import base64
import os
import requests

with open("container.jpg", "rb") as image_file:
    image = base64.b64encode(image_file.read()).decode("ascii")

response = requests.post(
    "https://api.structocr.com/v1/container",
    headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
    json={"img": image},
    timeout=30,
)
response.raise_for_status()
data = response.json()["data"]
print("container_number:", data.get("container_number"))
print("is_valid:", data.get("is_valid"))
print("confidence:", data.get("confidence"))

Technical Specs

  • •Endpoint: POST https://api.structocr.com/v1/container
  • •Authentication: x-api-key request header
  • •Inputs: JPG, PNG, or WebP as Base64 JSON; maximum 4.5MB
  • •Price: 1 credit per successful request; failed requests are not billed
  • •Free trial: 200 free credits on sign-up, no credit card required

Key Features

  • •Check: Returns owner code, category, serial, and check digit separately.
  • •Check: Validates the ISO 6346 check digit.
  • •Check: Reads vertical and horizontal markings.
  • •Check: Works from gate cameras and handheld photos.
  • •Check: Low per-image cost for high-volume gates.

What a Structured Response Looks Like

Illustrative field names from the StructOCR response for this document type.

{
  "success": true,
  "data": {
    "container_number": "…",
    "is_valid": "…",
    "confidence": "…"
  }
}

Frequently Asked Questions

How many test images do I need?

Enough to cover your real mix: a few hundred consented images across your main countries, devices, and lighting conditions is a practical start.

Should I pay for failed requests?

Ideally not. StructOCR bills only successful extractions, which keeps cost proportional to usable data.

Is accuracy the only metric?

No. Latency, failure clarity, privacy terms, and integration effort matter as much in production.

You May Also Like

Related tutorials, platform guides, and comparisons

Tutorial

PHP Shipping Container OCR API

Tutorial: Learn how to use the StructOCR PHP Client via cURL for shipping container OCR. Upload an image for a free test! Extract ISO 6346 container numbers and check them against the ISO check digit. Includes code samples and JSON schemas.

PHP · Container
Tutorial

Container Number OCR API Pricing and Cost per Scan

What container number OCR costs with StructOCR: 1 credit per successful scan, prepaid credits that never expire, and no charge for failed requests.

Container
Tutorial

Go Shipping Container OCR API

Upload an image for a free test! Tutorial: Learn how to use the StructOCR Go Client to extract data from Shipping Containers. Extract ISO 6346 container numbers and check them against the ISO check digit. Includes code samples and JSON schema.

Go · Container
Tutorial

Container Size and Type Codes (22G1, 45G1, 45R1)

Read ISO 6346 size and type codes such as 22G1, 42G1, 45G1, and 45R1 to tell container length, height, and type apart.

Container
Tutorial

ISO 6346 Container Check Digit Calculation

Calculate and validate a shipping container check digit: letter values that skip multiples of 11, powers of two, and Python code.

Container
Tutorial

How to Choose a Driver License OCR API in 2026

A practical checklist for evaluating driver license OCR APIs: coverage, accuracy on real photos, error handling, privacy, and cost per successful result.

Driver License
Country Tutorial

Italy Passport OCR with Node.js SDK

Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Italy passports.

Node.js · Passport
Country Tutorial

Italy Carta di Identità OCR Python SDK

Python Tutorial: Automate KYC in Italy. Extract data from Carta di Identità Elettronica (CIE) using StructOCR Python SDK. Supports native text, Codice Fiscale, and MRZ extraction.

Python · carta di identità
Country Tutorial

Irish Passport OCR with Python SDK

Use the StructOCR Python SDK and FastAPI to extract visible identity, validity and MRZ fields from Irish passports.

Python · Passport
Country Tutorial

Italy Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Italy passports with a server-side integration.

Python · Passport

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 No Credit Card