IDMRZ API
IDMRZ
The MRZ Reader API offers a service to detect and recognize the information contained in the Machine Readable Zone (MRZ) from standard passports and European ID cards. The process is quite straightforward. You just create a POST request that sends a back image from the document, and the API returns the information read in JSON format. To maximize the chances of success, the document should fill most of the image area, and the MRZ lines should be clear and well-illuminated.
POST request in Python
import requests
key = "{key}"
# ask for your personal key
url = 'http://idsolverdev.solverml.com/mrzreader'
image =open('id_back.jpg', 'rb')
r =requests.post(url, data={"key": key}, files={"image": image})
print(r.text)
JSON response
{
"control1": "7",
"control2": "5",
"control3": "0",
"control4": "0",
"country": "GBR",
"date_birth_raw": "751002",
"exp_date_raw": "200707",
"field1": "",
"gender": "M",
"imgtype": "pass", # id card or passport
"name": "FELLMAN JOSEPH PEREGRINE GRENVILLE",
"nationality": "GBR",
"number": "80123456",
"status": true # check according to control digits
}
