UAE Emirates ID OCR Python SDK

Instantly extract data, bilingual text, and MRZ from UAE Emirates IDs (Front & Back) using our native Python library.

AI extracting data from a UAE Emirates ID card
StructOCR engine analyzing an Emirates ID's Arabic/English fields and reverse-side 3-line MRZ in real-time.

Parsing Emirates ID Challenges

Parsing the UAE Emirates ID presents unique challenges for global businesses. The documents feature complex bilingual layouts containing both Arabic and English text. Additionally, managing dual-sided verification, extracting the 15-digit national identification number, and parsing the 3-line Machine Readable Zone (MRZ) on the reverse side require highly specialized OCR capabilities.

Why StructOCR for the UAE

StructOCR's model is specifically trained on a vast dataset of UAE Emirates IDs, ensuring high accuracy across both Arabic and Latin scripts. This advanced national id ocr capability facilitates efficient information parsing for Gulf region compliance. Fully supports the latest Emirates ID formats, enabling seamless data extraction from both front and back sides, specifically optimized for the 3-line MRZ on the back. Our latest v1.4.0 Python SDK simplifies the integration process, allowing you to extract structured data in seconds.

Common Use Cases in the UAE

  • Fintech & Crypto Onboarding: Verify users for trading apps and digital wallets in Dubai and Abu Dhabi.
  • Real Estate (Ejari): Automate tenant identity verification for property management.
  • Telecom & Utilities: Speed up SIM card registration and utility service applications.

Live Demo: ID card scanner

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
Need more testing? Create a free account to get 200 free credits (equals 100 National ID scans).

Python SDK Integration

Install the SDK via pip: `pip install structocr`. Then use the following code.

Prerequisite: Python 3.6+ and `structocr` v1.4.0+ library installed.

Prefer another stack? Open the Node.js SDK + Express integration.

from structocr import StructOCR

# 💰 Deposit via Crypto (USDT/USDC) for a 10% credit bonus!
# 👉 https://structocr.com/pricing
# Initialize with your API Key
client = StructOCR("YOUR_API_KEY_HERE")

def scan_emirates_id():
    # Note: Supports JPG, PNG, WebP (Max 4.5MB)
    # Target: Emirates ID (Supports front, back, and 3-line MRZ)
    image_path = "uae_emirates_id_back.jpg"

    try:
        print(f"Scanning {image_path}...")
        
        # The SDK handles file upload and API communication
        # It automatically detects that this is a UAE document
        result = client.scan_national_id(image_path)

        # Check success flag
        if result.get('success'):
            data = result['data']
            print("✅ UAE Emirates ID Extraction Successful!")
            
            # Basic Identity
            print(f"Region:      {data.get('country_code')}")
            print(f"Name:        {data.get('given_names')} {data.get('surname')}")
            print(f"Card Number: {data.get('document_number')}")
            
            # Critical Field: UAE Identity Number (15 digits)
            print(f"Personal #:  {data.get('personal_number')}")
            
            # Demographics
            print(f"DOB:         {data.get('date_of_birth')} ({data.get('sex')})")
            print(f"Nationality: {data.get('nationality')}")

            # Machine Readable Zone (MRZ) - Found on the back
            additional = data.get('additional_fields', {})
            if additional.get('mrz_line_1'):
                print("\n--- MRZ Data (Reverse Side) ---")
                print(additional.get('mrz_line_1'))
                print(additional.get('mrz_line_2'))
                if additional.get('mrz_line_3'):
                    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_emirates_id()

Technical Specs

  • Latency: < 3s (Average via Cloudflare edge routing)
  • Uptime: 99.9% SLA
  • Security: AES-256 Encryption & GDPR/PDPL Compliant
  • Input: JPG, PNG, WebP (Max 4.5MB) — Supports Front & Back images
  • Output: JSON (Structured Data with 3-line MRZ support)

Key Features

  • Bilingual Arabic & English: Native support for rendering and extracting dual-language fields accurately.
  • 15-Digit ID Formatting: Automatically validates and formats the 784-YYYY-XXXXXXX-X personal number pattern.
  • 3-Line MRZ Parsing: Accurately extracts and validates the Machine Readable Zone lines standard on Emirates IDs.
  • Blur & Glare Detection: Automatically identifies unreadable images caused by smart card holograms.
  • Smart Crop & Deskew: Automatically aligns and crops the document from complex backgrounds.

JSON Response Example

The SDK returns a Python dictionary matching this JSON structure.

{
  "success": true,
  "data": {
    "type": "national_id",
    "country_code": "ARE",
    "nationality": "ARE",
    "document_number": "123456789",
    "card_series": null,
    "personal_number": "784-1990-1234567-1",
    "surname": "AL MANSOORI",
    "given_names": "AHMED MOHAMMED",
    "sex": "M",
    "date_of_birth": "1990-05-15",
    "place_of_birth": "DUBAI",
    "address": "Downtown Dubai, Sheikh Mohammed bin Rashid Blvd",
    "date_of_issue": "2021-08-20",
    "date_of_expiry": "2031-08-19",
    "issuing_authority": "Federal Authority for Identity and Citizenship",
    "additional_fields": {
      "phone_number": null,
      "tramite_number": null,
      "ejemplar": null,
      "mrz_line_1": "IDARE1234567894<<<<<<<<<<<<<<<",
      "mrz_line_2": "9005155M3108198ARE<<<<<<<<<<<4",
      "mrz_line_3": "AL<MANSOORI<<AHMED<MOHAMMED<<<"
    }
  }
}

Frequently Asked Questions

Does the API support Arabic text extraction?

Yes, our engine is natively trained to handle the Arabic scripts present on the Emirates ID.

Are the ID images stored on your servers?

No. All images are processed securely in-memory and are discarded immediately after the JSON response is generated.

Can I pay for API credits using Cryptocurrency?

Yes! StructOCR supports USDT/USDC deposits. You also get an automatic 10% credit bonus when topping up with crypto.

You May Also Like

Related tutorials, platform guides, and comparisons

Country Tutorial

UAE Passport OCR with Python SDK

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

Python · Passport
Country Tutorial

UAE Emirates ID OCR with Node.js SDK

Extract Emirates ID number, names, dates and other visible fields from Emirates ID with the StructOCR Node.js SDK and Express.

Node.js · National ID
Country Tutorial

Bangladesh Passport OCR with Python SDK

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

Python · Passport
Country Tutorial

France Carte Nationale d'Identité OCR Python SDK

Python Tutorial: Automate KYC in France. Extract data from Carte Nationale d'Identité and validate TD1/TD2 MRZ using StructOCR Python SDK. Supports native text.

Python · National ID
Country Tutorial

Saudi Arabia National ID & Iqama OCR Python SDK

Python Tutorial: Automate KYC in Saudi Arabia. Extract data from National IDs and Iqamas using the StructOCR Python SDK. Supports bilingual (Arabic/English) text, 10-digit ID numbers, and 3-line MRZ extraction.

Python · National ID
Country Tutorial

Pakistan CNIC OCR Python SDK

Python Tutorial: Automate KYC in Pakistan. Extract data from CNIC using StructOCR Python SDK. Supports native text.

Python · cnic
Tutorial

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 · Receipt
Tutorial

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 tips from crumpled thermal receipts.

C# · Receipt
Tutorial

PHP Receipt OCR API

Tutorial: Integrate the StructOCR Receipt API into your PHP web applications. Upload an image for a free test! Extract merchants, totals, and line items from POS receipts using raw cURL or Guzzle.

PHP · Receipt
Tutorial

Go Receipt OCR API

Upload an image for a free test! Tutorial: Build scalable expense reporting apps in Go. Learn how to extract merchants, line items, and totals from POS receipts using our Golang OCR integration.

Go · Receipt

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 99.9% Uptime