Uzbekistan ID Karta OCR Python SDK
Instantly extract data and MRZ from Uzbek IDs using our native Python library.
Parsing ID Karta Challenges
Uzbekistan ID Kartas present unique OCR challenges. Firstly, the mix of Latin and Cyrillic scripts within the same document requires specialized language models. Secondly, varying print quality and inconsistent lighting conditions often degrade image quality, leading to inaccurate data extraction.
Why StructOCR for Uzbekistan
Our model is specifically trained on a large dataset of Uzbekistan ID Kartas, accounting for script variations and image quality issues. The Python SDK provides a simple, streamlined interface for developers, abstracting away the complexities of OCR and delivering structured data with minimal coding effort. This ensures accurate extraction of the 14 digits structure and full Machine Readable Zone (MRZ) from ID cards, making it ideal for kyc automation workflows. Leverage our id parsing api to integrate Uzbekistan ID data extraction seamlessly into your applications.
Common Use Cases in Uzbekistan
- Digital Onboarding: Verify users for Fintech apps in Uzbekistan.
- Telecom Registration: Automate SIM card registration with ID Karta and MRZ cross-check.
- Hotel Check-in: Speed up guest registration workflows.
Python SDK Integration
Install the SDK via pip: `pip install structocr`. Then use the following code.
Prerequisite: Python 3.6+ and `structocr` library installed.
from structocr import StructOCR
# Get 200 free credits:
# 👉 https://structocr.com/register
# Initialize with your API Key
client = StructOCR("YOUR_API_KEY_HERE")
def scan_uzbekistan_id():
# Note: Supports JPG, PNG, WebP (Max 4.5MB)
# Target: ID Karta
image_path = "uzbekistan_national_id.jpg"
try:
print(f"Scanning {image_path}...")
# The SDK handles file upload and API communication
# It automatically detects that this is a Uzbek document
result = client.scan_national_id(image_path)
# Check success flag (SDK returns a dict matching the JSON response)
if result.get('success'):
data = result['data']
print("✅ Uzbekistan Extraction Successful!\n")
# Basic Identity
print(f"Region: {data.get('country_code')} (Series: {data.get('card_series')})")
print(f"Name: {data.get('given_names')} {data.get('surname')}")
print(f"ID Number: {data.get('document_number')}")
# Critical Field: Personal Identity Number (CNP/CPF/NIN)
print(f"Personal #: {data.get('personal_number')}")
# Demographics
print(f"DOB: {data.get('date_of_birth')} ({data.get('sex')})")
print(f"Address: {data.get('address')}")
# Extract MRZ from additional_fields
additional = data.get('additional_fields', {})
if additional.get('mrz_line_1'):
print("\n--- MRZ Data ---")
print(additional.get('mrz_line_1'))
print(additional.get('mrz_line_2'))
print(additional.get('mrz_line_3'))
else:
print(f"❌ Extraction Failed: {result.get('error')}")
except Exception as e:
# Handle SDK or Network errors
print(f"An error occurred: {e}")
if __name__ == "__main__":
scan_uzbekistan_id()Technical Specs
- •Latency: < 4s (Average)
- •Availability: Served from Cloudflare's global edge network
- •Security: AES-256 Encryption & SOC2 Compliant
- •Input: JPG, PNG, WebP (Max 4.5MB)
- •Output: JSON (Structured Data with MRZ)
Key Features
- •Native Script Support: Reads English and local characters.
- •MRZ Extraction: Seamlessly parses the 3-line Machine Readable Zone (MRZ) for automated cross-verification.
- •Blur Detection: Automatically rejects blurry images.
- •Fraud Check: Validates ID Karta number format.
- •Smart Crop: Removes background noise automatically.
JSON Response Example
The SDK returns a Python dictionary matching this JSON structure, including the full MRZ data.
{
"success": true,
"data": {
"type": "national_id",
"country_code": "UZB",
"nationality": "UZBEKISTAN",
"document_number": "AA1234567",
"card_series": "",
"personal_number": "30101901234567",
"surname": "ABDULLAYEV",
"given_names": "JAMSHID",
"sex": "M",
"date_of_birth": "1990-05-15",
"place_of_birth": "TASHKENT",
"address": "Amir Temur ko'chasi, 10-uy, Toshkent",
"date_of_issue": "2020-01-01",
"date_of_expiry": "2030-01-01",
"issuing_authority": "IIB",
"additional_fields": {
"phone_number": null,
"tramite_number": null,
"ejemplar": null,
"mrz_line_1": "I<UZBAA12345674<<<<<<<<<<<<<<<",
"mrz_line_2": "9005156M3001018UZB<<<<<<<<<<<4",
"mrz_line_3": "ABDULLAYEV<<JAMSHID<<<<<<<<<<<"
}
}
}Frequently Asked Questions
Does the Python SDK handle image uploads?
Yes, the SDK automatically handles base64 encoding and file uploads.
Can it read the MRZ on the back of the ID Karta?
Yes, our API automatically extracts all three MRZ lines if the back of the card is provided.
Is data stored?
Only briefly. Uploaded images and results are kept for at most 24 hours for quality spot-checks, then deleted.
How to handle errors?
The SDK result dictionary contains a 'success' boolean and an 'error' message if failed.
You May Also Like
Related tutorials, platform guides, and comparisons
Uzbekistan Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Uzbekistan passports with a server-side integration.
Ethiopia Fayda ID OCR Python SDK
Python Tutorial: Automate KYC in Ethiopia. Extract data from Fayda ID using StructOCR Python SDK. Supports native text.
South Africa Smart ID Card OCR Python SDK
Python Tutorial: Automate KYC in South Africa. Extract data from Smart ID Card using StructOCR Python SDK. Supports native text and MRZ extraction.
Chile Cédula OCR Python SDK
Python Tutorial: Automate KYC in Chile. Extract data from the Chilean Cédula de Identidad using StructOCR Python SDK. Supports RUN/RUT extraction and native Spanish text parsing.
Tanzania NIDA Card OCR Python SDK
Python Tutorial: Automate KYC in Tanzania. Extract data from NIDA Card using StructOCR Python SDK. Supports native text and MRZ extraction.
Malaysia MyKad OCR Python SDK
Python Tutorial: Automate KYC in Malaysia. Extract data from the Malaysian Identity Card (MyKad) using StructOCR Python SDK. Supports NRIC extraction and multi-line address parsing.
Python Receipt OCR API SDK
Tutorial: Extract merchants, line items, and totals from receipts using the StructOCR Python SDK. Upload an image for a free test! Ideal for fintech ETL pipelines, AI accounting, and Pandas dataframes.
Python Weighbridge Ticket OCR API Tutorial
Build a Python weighbridge ticket OCR workflow. Extract ticket, vehicle, material, gross, tare, and net weights into validated JSON with the StructOCR SDK.
C# Weighbridge Ticket OCR API Tutorial
Integrate weighbridge ticket OCR in C# and .NET. Send a Base64 image and extract vehicle, material, gross, tare, net, and validation fields as JSON.
C# Receipt OCR API
Upload an image for a free test! Integrate a robust Receipt OCR API into your C# .NET app. Accurately extract merchants, line items, taxes, and totals from crumpled thermal receipts.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Passport OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a v0 by Vercel app through a secure Next.js server route.
Add Receipt OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR receipt API into a v0 by Vercel app. Build expense tracking and receipt scanning tools right in your browser.
Add VIN OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR VIN scanner API into a v0 by Vercel app. Build automotive and fleet tools with zero backend.
VIN Barcode Scanner vs. VIN OCR API: Which is Better for Mobile Apps?
Deciding between local VIN barcode scanners and cloud-based VIN OCR API for your mobile app? Learn why OCR is the required fallback for damaged or chassis-stamped VINs.
Apple Vision Framework / ML Kit vs. StructOCR VIN API
Why generic on-device text recognition frameworks fail at decoding VINs, and when to switch to a specialized automotive API.
AWS Textract vs. StructOCR API for Indian Passport Back Page Extraction
Why generic OCR fails at parsing the back page of Indian passports, and how a dedicated KYC API instantly extracts structured addresses, PIN codes, and family details.
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.