Extract passport data
Reads one passport from its photo/data page (`front_page`, required) and, optionally, its last page (`last_page`, the address page), sent as multipart/form-data with one file per field. Each page is read separately and the results are combined: names, date and place of birth, nationality, passport number, issue and expiry dates, place of issue, issuing country, sex and the machine readable zone (MRZ) with its check digits verified by the API; from the last page, parents' and spouse's names, address, file number and previous passport. Accepted: PDF (with selectable text), JPEG, PNG and WebP, up to 8 MB per file and 16 MB in total; the file type is detected from the content. Missing or unreadable values are null, never guessed. Uploaded files and extracted data are not stored.
Subscribe on RapidAPIReads one passport from its photo/data page (front_page, required) and, optionally, its last page (last_page, the address page), sent as multipart/form-data with one file per field. Each page is read separately and the results are combined: names, date and place of birth, nationality, passport number, issue and expiry dates, place of issue, issuing country, sex and the machine readable zone (MRZ) with its check digits verified by the API; from the last page, parents' and spouse's names, address, file number and previous passport. Accepted: PDF (with selectable text), JPEG, PNG and WebP, up to 8 MB per file and 16 MB in total; the file type is detected from the content. Missing or unreadable values are null, never guessed. Uploaded files and extracted data are not stored.
multipart/form-data- body
front_page*unknownThe passport's photo/data page (required): the page with the holder's photo, personal details and the machine readable zone.
last_page?unknownThe passport's last page (optional): the address page some passports have (for example Indian passports). Adds parents' and spouse's names, address, file number and previous passport.
Passport data extracted.
application/json- response
success*truetruedata*Passport data. Every field is null when it is missing or unreadable; values are never guessed. Last-page fields are null when last_page was not uploaded.
meta*curl -X POST 'https://passport-data-extraction-ai-ocr.p.rapidapi.com/passport-extractor/v1/extract'{ "success": true, "data": { "full_name": "JANE MARIE DOE", "given_name": "JANE MARIE", "surname": "DOE", "date_of_birth": "1988-03-14", "nationality": "UTO", "passport_number": "X4821937", "issue_date": "2023-07-22", "expiry_date": "2033-07-21", "issuing_country": "UTO", "sex": "F", "place_of_birth": "UTOPIA CITY", "place_of_issue": "UTOPIA CITY", "father_name": "JOHN DOE", "mother_name": "MARY DOE", "spouse_name": null, "address": "12 EXAMPLE STREET, OLD TOWN, UTOPIA CITY 100001", "file_number": "UT1067123456789", "previous_passport": null, "mrz": { "line1": "P<UTODOE<<JANE<MARIE<<<<<<<<<<<<<<<<<<<<<<<<", "line2": "X4821937<9UTO8803148F3307216<<<<<<<<<<<<<<00", "check_digits_valid": true } }, "meta": { "document_type": "passport", "request_id": "req_3f2a9c1e7b4d4e0a", "pages": [ { "label": "front_page", "file_type": "image/jpeg" }, { "label": "last_page", "file_type": "image/jpeg" } ] }}