Passport - India OCR

Mindee’s Passport - Indian OCR API uses deep learning to automatically, accurately, and instantaneously parse your documents details. In a few seconds, the API extracts a set of data from your PDFs or photos of indian passport, including:

  • Page Number

  • Country Code

  • Identity Number

  • Given Name(s)

  • Surname

  • Date of Birth

  • Place of Birth

  • Place of Issue

  • Gender

  • Issuance Date

  • Expiry Date

  • MRZ Row #1

  • MRZ Row #2

  • Name of legal guardian

  • Name of spouse

  • Name of mother

  • Old passport date of issue

  • Old passport number

  • Address line #1

  • Address line #2

  • Address line #3

  • Old passport place of issue

  • File number

The Passport - Indian OCR API only supports two pages of Indian passports. The passports from other nationalities and states are not supported with this model, you can use International Passport API instead.

Set up the API

Create an API key

To begin using the Mindee V1 OCR API, your first step is to create your V1 API key.

  1. To test your API, you can use the sample document provided below.

  2. Access your Passport - Indian API by clicking on the corresponding product card in the Document Catalog

  3. From the left navigation, go to documentation > API Reference, you'll find sample code in popular languages and command line.

  • Replace my-api-key-here with your new API key, or use the "select an API key" feature and it will be filled automatically.

  • Copy and paste the sample code of your desired choice in your application, code environment or terminal.

  • Replace /path/to/my/file with the path to your document.

  • Replace my-api-key-here with your new API key, or use the select an API key feature and it will be filled automatically.

  • Copy and paste the sample code of your desired choice in your application, code environment, terminal etc.

  • Replace /path/to/the/file.ext with the path to your input document.

  1. Run your code. You will receive a JSON response with your document details.

API Response

Here is the full JSON response you get when you call the API:

You can find the prediction within the prediction key found in document > inference > prediction for document-level predictions: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single object using all the pages.

Each predicted field may contain one or several values including:

  • a polygon highlighting the information location

  • a page_id where the information was found (document level only)

Detailed Field Information

Using the above document example the following are the basic fields that can be extracted.

Page Number

  • page_number: The page number of the passport document.

Country

  • country: ISO 3166-1 alpha-3 country code (3 letters format).

Id Number

  • id_number: The identification number of the passport document.

Given Names

  • given_names: The given names of the passport holder.

Surname

  • surname: The surname of the passport holder.

Birth Date

  • birth_date: The birth date of the passport holder, ISO format: YYYY-MM-DD.

Birth Place

  • birth_place: The birth place of the passport holder.

Issuance Place

  • issuance_place: The place where the passport was issued.

Gender

  • gender: The gender of the passport holder.

Issuance Date

  • issuance_date: The date when the passport was issued, ISO format: YYYY-MM-DD.

Expiry Date

  • expiry_date: The date when the passport will expire, ISO format: YYYY-MM-DD.

MRZ Line 1

  • mrz1: The first line of the machine-readable zone (MRZ) of the passport document.

MRZ Line 2

  • mrz2: The second line of the machine-readable zone (MRZ) of the passport document.

  • legal_guardian: The name of the legal guardian of the passport holder (if applicable).

Name of Spouse

  • name_of_spouse: The name of the spouse of the passport holder (if applicable).

Name of Mother

  • name_of_mother: The name of the mother of the passport holder.

Old Passport Date of Issue

  • old_passport_date_of_issue: The date of issue of the old passport (if applicable), ISO format: YYYY-MM-DD.

Old passport Number

  • old_passport_number: The number of the old passport (if applicable).

Address Line 1

  • address1: The first line of the address of the passport holder.

Address Line 2

  • address2: The second line of the address of the passport holder.

Address Line 3

  • address3: The third line of the address of the passport holder.

Old passport Place of Issue

  • old_passport_place_of_issue: The place of issue of the old passport (if applicable).

File Number

  • file_number: The file number of the passport document.

Last updated

Was this helpful?