The RPACPC Passport OCR API extracts key information from passport images using Optical Character Recognition (OCR). Automate passport document data extraction and integrate it into your applications through a simple API request.
The RPACPC Passport OCR API enables businesses and developers to extract structured information from passport images without manually entering document details.
The API processes the submitted passport images and returns the extracted information in JSON format. Depending on the document and image quality, available fields may include passport number, holder’s name, gender, date of birth, nationality, country code, place of birth, place of issue, date of issue, date of expiry and other passport-related information.
The API response may include the following information, depending on the response received:
Passport number, document type and issuing country
Full name, gender, date of birth and nationality
Place of birth, place of issue and passport validity dates
File number, previous passport number, family details and MRZ name
Step 01
Submit the front image, back image, or both using the front and back multipart form-data fields.
Step 02
The API analyzes the uploaded passport images and extracts available identity information, including MRZ details when supported.
Step 03
Retrieve the extracted passport details in a JSON response containing processing status, output fields and request metadata.
Step 04
Use the extracted fields to prefill forms, automate document processing and support authorized onboarding workflows.
| Parameter | Type | Required | Description |
|---|---|---|---|
| front | File | No, if another image is supplied | Front image of the passport. |
| back | File | No, if another image is supplied | Back image of the passport, if applicable. |
headers = {
"Authorization": "prod-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
files = [
("front", ("1.jpg", open("1.jpg", "rb"), "image/jpeg")),
("back", ("2.jpg", open("2.jpg", "rb"), "image/jpeg"))
]
| Field | Description |
|---|---|
| country | Country associated with the document. |
| billable | Indicates whether the request is billable. |
| output | Object containing extracted passport information. |
| output.id_type | Identified document type, such as Passport. |
| output.id_number | Passport number extracted from the document. |
| output.id_gender | Gender value extracted from the passport. |
| output.id_name | Name of the passport holder. |
| output.id_dob | Date of birth. |
| output.id_address | Address, if available. |
| output.id_caretaker_name | Caretaker or related-person name, if available. |
| output.id_country_code | Country code associated with the passport. |
| output.id_nationality | Nationality printed on the passport. |
| output.id_place_of_birth | Place of birth. |
| output.id_place_of_issue | Place where the passport was issued. |
| output.id_doi | Date of issue. |
| output.id_doe | Date of expiry. |
| output.id_passport_type | Passport type code extracted from the document. |
| output.id_file_num | Passport application or file number, if available. |
| output.id_old_doi | Issue date of the previous passport, if available. |
| output.id_old_passport_num | Previous passport number, if available. |
| output.id_old_place_of_issue | Previous passport’s place of issue, if available. |
| output.id_father_name | Father’s name, if available. |
| output.id_mother_name | Mother’s name, if available. |
| output.id_spouse_name | Spouse’s name, if available. |
| output.id_name_from_mrz | Boolean indicating whether the name was identified from the Machine Readable Zone (MRZ). |
{
"status": "Success",
"country": "India",
"billable": "Yes",
"message": "Details extraction completed successfully.",
"output": {
"id_type": "Passport",
"id_number": "N7392846",
"id_gender": "F",
"id_name": "PRIYA ANIL DESHMUKH",
"id_dob": "14/05/1992",
"id_address": "",
"id_caretaker_name": "",
"id_country_code": "IND",
"id_nationality": "INDIAN",
"id_place_of_birth": "PUNE, MAHARASHTRA",
"id_place_of_issue": "PUNE",
"id_doi": "12/06/2023",
"id_doe": "11/06/2033",
"id_passport_type": "P",
"id_file_num": "",
"id_old_doi": "",
"id_old_passport_num": "",
"id_old_place_of_issue": "",
"id_father_name": "ANIL RAJARAM DESHMUKH",
"id_mother_name": "SUNITA ANIL DESHMUKH",
"id_spouse_name": "",
"id_name_from_mrz": true
}
}
Illustrative response using dummy data. The API may return additional fields such as request ID, sequence ID and timestamps. Field availability and values may vary.
Automate passport information capture for authorized travel booking, passenger verification and customer registration workflows.
Streamline passport data entry for authorized hotel guest registration and document processing.
Extract available identity details to prefill forms and reduce manual data entry.
Support identity verification and KYC workflows using extracted passport information.
Integrate passport OCR into enterprise applications and authorized document processing systems.
Common questions about the Passport OCR API — what it returns, how fast it is, and how to integrate
Discover the fastest identity solution for startups to streamline customer verification, speed up onboarding, and support business growth.
Read More
Empower your applications with India's Enterprise Verification Intelligence Platform for faster, more reliable verification.