Driver License

Mindee’s Driver License 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 driver licenses, including:

  • Country Code

  • State

  • ID

  • Category

  • Last Name

  • First Name

  • Date of Birth

  • Place of Birth

  • Expiry Date

  • Issued Date

  • Issuing Authority

  • MRZ

  • DD Number

The Driver License OCR API supports documents from US and all EU countries. The documents from other nationalities and states are not supported with this model.

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 Driver License OCR 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.

Country Code

  • country_code: The alpha-3 ISO 3166 code of the country where the driver license was issued.

State

  • state: second part of the ISO 3166-2 code consisting in 2 letters indicating the US State.

ID

  • id: The unique identifier of the driver license.

Category

  • category: The category or class of the driver license..

Last Name

  • last_name: The last name of the driver license Holder.

First Name

  • first_name: The first name of the driver license holder.

Date of Birth

  • date_of_birth: The date of birth of the driver license holder.

Place of Birth

  • place_of_birth: The place of birth of the driver license holder.

Expiry Date

  • expiry_date: The expiry date of the driver license.

Issued Date

  • issued_date: The date the driver license was issued.

\

Issuing Authority

  • issuing_authority: The authority that issued the driver license.

\

MRZ

  • mrz: The Machine Readable Zone (MRZ) of the driver license.

DD Number

  • dd_number: The DD Number of the driver license.

Last updated

Was this helpful?