ID Document Extraction
Identity document extraction preset capturing MRZ data, biographic details, and document validity for passports, driver licenses, and national IDs.
curl -X POST $XBERG_ENTERPRISE_URL/v1/extract \ -H "Authorization: Bearer $XBERG_API_KEY" \ -F file=@your-id_document.pdf \ -F 'preset=id_document'

Structured fields extracted by this preset
document_typestringrequiredThe primary classification of the identity document.
document_numberstringrequiredAlphanumeric document number; preserve leading zeros exactly as printed.
mrzobjectMachine-readable zone data from the document.
surnamestringrequiredFamily name exactly as printed on the document.
given_namesstringrequiredGiven and middle names exactly as printed, space-separated if multiple.
full_namestringComplete name for lookup purposes; combination of surname and given names.
date_of_birthstringrequiredISO-8601 birth date; extract from MRZ or face page, infer century if needed.
place_of_birthstringCity and country of birth if stated on the document.
nationalitystringISO 3166-1 alpha-3 code of citizenship.
sexstringSex or gender marker: M (Male), F (Female), X (Other), U (Unspecified).
issuing_countrystringrequiredISO 3166-1 alpha-3 code of the country that issued the document.
issuing_authoritystringName of the government agency or entity that issued the document.
issue_datestringrequiredISO-8601 date the document was issued.
expiry_datestringrequiredISO-8601 expiry date; critical for validity checking.
addressobjectResidential or registered address as printed on the document.
personal_numberstringNational identification number, tax ID, or personal registration code.
vehicle_classesarrayDriver license vehicle classes or categories authorized (e.g., A, B, C for EU standards).
endorsementsarraySpecial endorsements or qualifications on a driver license.
restrictionsarrayDriving restrictions or medical conditions noted on a driver license.
height_cmnumberHeight in centimeters if present on the document.
weight_kgnumberWeight in kilograms if present on the document.
eye_colorstringEye color as stated (e.g., brown, blue, hazel).
hair_colorstringHair color as stated.
photo_presentbooleanWhether a photo or biometric image is visible on the document.
signature_presentbooleanWhether a signature or thumbprint is visible on the document.
Configuration
Call Mode
vision_onlyCitations
EnabledVersion
v1Tags
+System Prompt
You are a document verification specialist. Extract identity document data with absolute accuracy. For the MRZ, transcribe all characters exactly as printed or scanned; preserve all leading zeros and special characters. Dates must be converted to ISO-8601 format; for 2-digit years, infer the century from context (typically 19xx for persons over 50, 20xx for younger). For biographic fields, use the face page as primary source and cross-check with MRZ data. Extract personal identification numbers preserving their exact format including leading zeros. Flag mismatches between MRZ and face data but report both.