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-registrationRequest Parameters
Important: This endpoint requires application/json Content-Type. Images must be sent as Base64 strings.
| Parameter | In | Required | Description |
|---|---|---|---|
| x-api-key | Header | Required | Your unique API key generated from the dashboard. |
| Content-Type | Header | Required | Must be set to application/json. |
| img | Body | Required | The Base64 encoded string of the document image.
|
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.
| Field | Type | Description |
|---|---|---|
| document | ||
| ↳ country_code | string | ISO 3166-1 alpha-2 code (e.g., 'SA', 'AE') or 'UNKNOWN'. |
| ↳ document_type | string | Always returns 'VEHICLE_REGISTRATION'. |
| ↳ confidence_score | number | Float number between 0.0 and 1.0 indicating overall extraction confidence. |
| standardized | ||
| ↳ vin | string | null | Strictly 17-character ISO 3779 standard VIN. Null if unreadable. |
| ↳ plate | object | Contains 'number', 'letters_normalized', and 'formatted' variations. |
| ↳ make_raw | string | null | Vehicle make in native language. |
| ↳ make_normalized | string | null | Vehicle make mapped to English standard. |
| ↳ model_raw | string | null | Vehicle model in native language. |
| ↳ model_normalized | string | null | Vehicle model mapped to English standard. |
| ↳ year | number | null | Vehicle manufacturing year. |
| ↳ color_raw | string | null | Vehicle color in native language. |
| ↳ color_normalized | string | null | Vehicle color mapped to English standard. |
| localized (Dynamically rendered based on country_code) | ||
| ↳ saudi.tga_plate_details | object | Included ONLY if country_code is SA. Contains sequence_number, letter details, etc. |
| ↳ uae | object | Included ONLY if country_code is AE. Contains engine_number, origin, vehicle_class, gross_vehicle_weight, empty_weight, number_of_passengers. |
| ↳ vietnam | object | Included ONLY if country_code is VN. Contains owner_name, address, engine_number. |
| ↳ germany | object | Included ONLY if country_code is DE. Contains standardized codes like hsn_2_1, tsn_2_2, vehicle_class_j, etc. |
| ↳ generic | object | Included 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)
{
"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.
Drop files here or click to browse
JPG · PNG · WebP · up to 500 files · max 4.5 MB each
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
| Code | Error Code | Description |
|---|---|---|
| 200 | SUCCESS | Recognition success |
| 400 | INVALID_REQUEST_FORMAT | Invalid payload or corrupted Base64 structure. |
| 402 | INSUFFICIENT_CREDITS | Account balance too low |
| 413 | FILE_TOO_LARGE | Decoded image exceeds 4.5MB |
| 415 | INVALID_CONTENT_TYPE | Not using application/json |
| 422 | CONTENT_POLICY_VIOLATION | AI safety/policy block |
| 500 | PROCESSING_ERROR | Downstream processing fault |
| 503 | SYSTEM_BUSY | API Rate limit reached |