Use case · UAE identity card
Emirates ID OCR API
Emirates ID OCR with Mahad OCR reads the UAE identity card and returns the 15-digit ID number, name, nationality, date of birth and expiry date as JSON. The ID number’s structure (784 prefix), its Luhn check digit and its encoded birth year are checked on the server as evidence, and the card’s three-line MRZ, when uploaded, can prove the date of birth and expiry date.
Fields returned
| Key | What it holds |
|---|---|
| id_number | The 15-digit Emirates ID number (784-YYYY-NNNNNNN-C) |
| full_name, name_arabic | English name, with the Arabic name beside it where printed |
| nationality, sex | As printed |
| date_of_birth, expiry_date, issue_date | ISO dates |
| occupation, employer, place_of_issue | Where printed |
id_number, full_name, date_of_birth and expiry_date must be settled before a card can be verified.
How ✓ and ⚠ work here
- Structure: 15 digits starting with 784 (emirates_id_structure).
- Check digit: the 15th digit by the Luhn algorithm (emirates_id_check_digit).
- Cross-check: digits 4–7 (birth year) against date_of_birth.
- ✓ MRZ (TD1, back of card): check digits can prove date_of_birth and expiry_date. The MRZ number is the card number and is not used to prove id_number.
- ⚠ Single-reader or disputed values are marked for a person to check.
Example request and response
Fictional data, real response shape (trimmed to the keys that matter here). Full field list in the API reference.
curl -X POST https://api.mahadocr.com/v1/documents/upload \
-H "X-MahadDoc-API-Key: mk_live_YOUR_KEY" \
-F "[email protected]" \
-F "doc_type=emirates_id"
# 202 Accepted
# { "id": "DOC_3f9a1c7e2b40", "status": "processing", ... }
curl https://api.mahadocr.com/v1/documents/DOC_3f9a1c7e2b40 \
-H "X-MahadDoc-API-Key: mk_live_YOUR_KEY"{
"id": "DOC_3f9a1c7e2b40",
"status": "verified",
"result": {
"status": "verified",
"decision": "verified",
"document_type": "emirates_id",
"values": {
"id_number": "784-1990-1234567-1", "full_name": "RAVI SPECIMEN TESTKUMAR",
"nationality": "India", "date_of_birth": "1990-04-15", "expiry_date": "2027-11-03"
},
"field_evidence": { "full_name": "corroborated", "date_of_birth": "corroborated" },
"review_reasons": [],
"verification": {
"evidence": [
{ "level": "L1", "rule": "emirates_id_structure", "result": "passed", "fields": ["id_number"] },
{ "level": "L1", "rule": "emirates_id_check_digit", "result": "passed", "fields": ["id_number"] },
{ "level": "L2", "rule": "emirates_id_birth_year_matches_dob", "result": "passed",
"fields": ["id_number", "date_of_birth"], "detail": "number says 1990" }
]
}
}
}Limits
- A passing check digit shows the number was read consistently; it does not show the card was issued by the UAE authorities. There is no ICP or government lookup.
- Front and back are separate images; upload the side with the fields you need (the MRZ is on the back).
- Files: PNG, JPG, PDF or Word, up to 10 MB.
How to do it
- 1Create an API key at app.mahadocr.com.
- 2POST the card image to /v1/documents/upload.
- 3Poll GET /v1/documents/{id} and read result.values and result.verification.evidence.
- 4Send documents with result.decision = review to a person.
Frequently asked questions
How is the Emirates ID number structured?
784 (the UAE country code), then the four-digit birth year, a seven-digit serial, and a final check digit calculated with the Luhn algorithm.
Does Mahad OCR validate the Emirates ID check digit?
Yes, on the server. The result is reported as evidence (emirates_id_check_digit: passed or failed). A failure sends the card to review.
Does it read the MRZ on the back?
Yes. The three-line TD1 MRZ is parsed and its check digits can prove the date of birth and expiry date.
Is the card checked against a UAE government system?
No. All checks are on what is printed on the card.
Is the Arabic name returned?
Where printed, as name_arabic beside the English full_name.