Skip to content

Colombia ID Card OCR API

The Colombia ID Card OCR API allows you to extract and recognize key information from Colombian identity cards using Optical Character Recognition (OCR) technology. The API can extract information from both front and back sides of the ID card.

Features

  • Dual-side Recognition: Extract information from both front and back of Colombian ID cards
  • Complete Information: Recognize card number, names, dates, and personal details
  • High Accuracy: Advanced OCR technology ensures accurate text recognition
  • Fast Processing: Quick processing with results within seconds

Usage

To use the Colombia ID Card OCR API, you need to submit an image of either the front or back side of a Colombian ID card. The API will process the image and return the recognized information in a structured format.

id number + name recognition

Code example:

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

Response for ID card back recognition success

{
"status": "OK",
"message": {
"CardNumber": "",
"GivenNames": "",
"Surname": "",
"DateOfExpiry": "",
"BloodType": "A+",
"DateOfBirth": "17-ENE-1987",
"DateOfIssue": "16-FEB-2005",
"Gender": "M",
"Height": "1.72",
"PlaceOfBirth": "BOGOTA D.C (CUNDINAMARCA)",
"PlaceOfIssue": "BOGOTA D.C."
}
}

ID card ocr API JSON result explanation:

This JSON object represents the OCR (Optical Character Recognition) data extracted from a Colombian ID card.

  1. CardNumber: The unique identification number of the cardholder.
  2. GivenNames: The given names of the cardholder.
  3. Surname: The surname of the cardholder.
  4. DateOfExpiry: The expiry date of the ID card.
  5. BloodType: The blood type of the cardholder. In this example, it is “A+“.
  6. DateOfBirth: The birth date of the cardholder. In this example, it is “17-ENE-1987”.
  7. DateOfIssue: The issue date of the ID card. In this example, it is “16-FEB-2005”.
  8. Gender: The gender of the cardholder. In this example, it is “M” for male.
  9. Height: The height of the cardholder in meters. In this example, it is “1.72”.
  10. PlaceOfBirth: The place of birth of the cardholder. In this example, it is “BOGOTA D.C (CUNDINAMARCA)“.
  11. PlaceOfIssue: The place where the ID card was issued. In this example, it is “BOGOTA D.C.”.

Response for ID card front recognition success

{
"status": "OK",
"message": {
"CardNumber": "1.136.879.353",
"GivenNames": "OSCAR FELIPE",
"Surname": "RUEDA PLATA",
"DateOfBirth": "19870117"
}
}

Response for recognition fail

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

Response for input image not identity card

{
"status": "FAIL",
"message": "not identity card"
}

Response for not recognized card type

{
"status": "FAIL",
"message": "card not recognized"
}

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/co_ocr/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
messageCardNumber: card number
GivenNames: given names
Surname: surname
Gender: gender
DateOfBirth: birth date
DateOfExpiry: expiry date
PlaceOfBirth: birth place
DateOfIssue: issue date
PlaceOfIssue: issue place
Height: height
BloodType: blood type

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