Skip to content

Philippines Driver's License OCR API

The Philippines Driver’s License OCR API allows you to extract and recognize key information from a Philippines Driver’s License using Optical Character Recognition (OCR) technology. The extracted information includes the license number and the name of the license holder.

Features

  • License Number Recognition: Automatically detect and extract the license number from the driver’s license.
  • Name Recognition: Automatically detect and extract the name of the license holder.
  • High Accuracy: Utilizes advanced OCR technology to ensure high accuracy in text recognition.
  • Fast Processing: Quickly process and return the extracted information.

Usage

To use this Driver’s License OCR API, you need to send an image of the Philippines Driver’s License. The API will process the image and return the recognized information in a structured format.

Code example:

curl --location --request POST 'https://api.ekycpro.com/v1/ph_ocr_dl/general' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-API-Key: AbcdEfgh' \
--data-urlencode 'img=BASE64_ENCODE_VALUE'

Response for recognition success

{
"status": "OK",
"message": {
"name": "SANCHEZ,CARLOS",
"lastName": "SANCHEZ",
"firstName": "CARLOS",
"middleName": "",
"nationality": "PHL",
"sex": "F",
"address": "166 E TRES DE ABRIL ST CEBU CITY CEBU 6000",
"licenseNo": "G01-90-189371",
"expiresDate": "2023/11/03",
"agencyCode": "G01",
"birthday": "1969/11/03"
}
}

Response for recognition fail

{
"status": "FAIL",
"message": "check input image and retry"
}

Response for invalid request parameters

{
"status": "INVALID_REQUEST",
"message": "check request params"
}

Response for invalid image format

{
"status": "IMAGE_INVALID_FORMAT",
"message": "image format not support"
}

Response for image size larger than 2M

{
"status": "IMAGE_INVALID_SIZE",
"message": "image larger than 2M"
}

Response for server error

{
"status": "INNER_ERROR",
"message": "Inner error, please retry later"
}

HTTP request

POST https://api.ekycpro.com/v1/ph_ocr_dl/general

Request parameters

parameterdescription
imgstring, base64 encoded image. It is recommended that the image be less than 200KB, so it will be returned within 2 seconds, otherwise the return time will be longer.

Response format

fieldsdescription
statusstatus code
messagename: full name
lastName: last name
firstName: first name
middleName: middle name
nationality: citizenship
sex: gender, ‘M’ or ‘F’
address: address
licenseNo: license number
expiresDate: license expiry Date
agencyCode: agency code
birthday: date of birth

Status code

statusdescription
OKcharge, success
FAILcharge, image recognition error, please check input image
INVALID_REQUESTfree, invalid request parameters
IMAGE_INVALID_FORMATfree, invalid image format, image format should be one of jpeg/jpg/png/bmp
IMAGE_INVALID_SIZEfree, invalid image size, should be less than 2M
INNER_ERRORfree, server error