Vehicle Registration OCR API

Automate data extraction from global vehicle registration documents (e.g., Saudi Istimara, UAE Mulkiya, German Zulassungsbescheinigung). Our engine features a robust Standardized + Localized structure. It unifies essential information like VIN, Make, Model, and Year across all regions, while preserving native scripts in _raw fields. Furthermore, it dynamically mounts region-specific data nodes to capture unique local fields, ensuring zero token waste and perfect schema validation.


Endpoint

POSThttps://api.structocr.com/v1/vehicle-registration

Request Parameters

Important: This endpoint requires application/json Content-Type. Images must be sent as Base64 strings.

ParameterInRequiredDescription
x-api-keyHeaderRequiredYour unique API key generated from the dashboard.
Content-TypeHeaderRequiredMust be set to application/json.
imgBodyRequiredThe Base64 encoded string of the document image.
  • Supports standard Data URI (e.g., data:image/jpeg;base64,...)
  • Supports raw Base64 strings
  • Max file size: 4.5MB
  • Formats: JPG, PNG, WebP, PDF
  • Other decoded formats return 415 UNSUPPORTED_FILE_FORMAT.
  • For best response time, compress to under 500 KB.

Response Schema

The parsed data is categorized into three main nodes: document (metadata), standardized (universal vehicle specs), and localized (dynamically injected region-specific details based on the detected country). Use snake_case for all keys.

FieldTypeDescription
document
↳ country_codestringISO 3166-1 alpha-2 code (e.g., 'SA', 'AE') or 'UNKNOWN'.
↳ document_typestringAlways returns 'VEHICLE_REGISTRATION'.
↳ confidence_scorenumberFloat number between 0.0 and 1.0 indicating overall extraction confidence.
standardized
↳ vinstring | nullStrictly 17-character ISO 3779 standard VIN. Null if unreadable.
↳ plateobjectContains 'number', 'letters_normalized', and 'formatted' variations.
↳ make_rawstring | nullVehicle make in native language.
↳ make_normalizedstring | nullVehicle make mapped to English standard.
↳ model_rawstring | nullVehicle model in native language.
↳ model_normalizedstring | nullVehicle model mapped to English standard.
↳ yearnumber | nullVehicle manufacturing year.
↳ color_rawstring | nullVehicle color in native language.
↳ color_normalizedstring | nullVehicle color mapped to English standard.
localized (Dynamically rendered based on country_code)
↳ saudi.tga_plate_detailsobjectIncluded ONLY if country_code is SA. Contains sequence_number, letter details, etc.
↳ uaeobjectIncluded ONLY if country_code is AE. Contains engine_number, origin, vehicle_class, gross_vehicle_weight, empty_weight, number_of_passengers.
↳ vietnamobjectIncluded ONLY if country_code is VN. Contains owner_name, address, engine_number.
↳ germanyobjectIncluded ONLY if country_code is DE. Contains standardized codes like hsn_2_1, tsn_2_2, vehicle_class_j, etc.
↳ genericobjectIncluded ONLY if country_code is NOT explicitly mapped above. Returns 'unmapped_fields' dictionary.

Code Examples

Request Implementation

curl -X POST https://api.structocr.com/v1/vehicle-registration \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "img": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
  }'

Success Response (200 OK)

JSON EXAMPLE
{
  "success": true,
  "data": {
    "document": {
      "country_code": "SA",
      "document_type": "VEHICLE_REGISTRATION",
      "confidence_score": 0.99
    },
    "standardized": {
      "vin": "FAKE0000000000123",
      "plate": {
        "number": "9999",
        "letters_normalized": "A B C",
        "formatted": "9999 ABC"
      },
      "make_raw": "مكوك فضاء",
      "make_normalized": "Space Cruiser",
      "model_raw": "طراز ألفا",
      "model_normalized": "Model Alpha",
      "year": 2042,
      "color_raw": "قرمزي",
      "color_normalized": "Crimson"
    },
    "localized": {
      "saudi": {
        "tga_plate_details": {
          "sequence_number": "123456789",
          "letter_right": "أ",
          "letter_middle": "ب",
          "letter_left": "ج",
          "number": "9999",
          "plate_type_raw": "مركبة فضائية",
          "plate_type_normalized": "Spaceship"
        }
      }
    }
  }
}

Live API Test

Live Demo: Vehicle Registration 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

Error Responses

400 Bad Request - Invalid Input

{
  "status": 400,
  "code": "INVALID_REQUEST_FORMAT",  
  "message":"The image data in 'img' field is malformed. Please check for illegal characters or incorrect Base64 encoding."
}

402 Payment Required - Insufficient Credits

{
  "status": 402,
  "code": "INSUFFICIENT_CREDITS",
  "message": "Your account balance is insufficient to complete this operation."
}

413 Payload Too Large

The Base64 decoded image size exceeds 4.5MB.

{
  "error": "FILE_TOO_LARGE"
}

415 Unsupported Media Type

{
  "error": "INVALID_CONTENT_TYPE_USE_JSON"
}

422 Unprocessable Entity - Policy Violation

{
  "status": 422,
  "code": "CONTENT_POLICY_VIOLATION",
  "message": "The document content could not be processed due to safety policies."
}

500 Internal Server Error

{
  "status": 500,
  "code": "PROCESSING_ERROR",
  "message": "An internal error occurred while processing the document..."
}

503 Service Unavailable - System Busy

{
  "status": 503,
  "code": "SYSTEM_BUSY",
  "message": "StructOCR is currently processing a high volume of requests..."
}

Status Code Definitions

CodeError CodeDescription
200SUCCESSRecognition success
400INVALID_REQUEST_FORMATInvalid payload or corrupted Base64 structure.
402INSUFFICIENT_CREDITSAccount balance too low
413FILE_TOO_LARGEDecoded image exceeds 4.5MB
415INVALID_CONTENT_TYPENot using application/json
422CONTENT_POLICY_VIOLATIONAI safety/policy block
500PROCESSING_ERRORDownstream processing fault
503SYSTEM_BUSYAPI Rate limit reached