Skip to main content

Overview


Intelligent Document Processing (IDP)

This API allows you to extract information from documents using Optical Character Recognition and advanced machine learning NLP algorithms.

Prerequisites

A private IDP service A private URL provided by NeuralSpace to access the IDP service

Endpoint

https://<YOUR-IDP-SERVICE-URL>/ocr/reader

Request

Parameters

The following parameters can be used in the request:

ParameterTypeRequiredDescription
imagefileYesThe image file to be processed.
pageLimitstringYesThe maximum number of pages to process.
documentTypestringYesCurrently only passport, id_card, id_card_old, trade_license, trade_license_detailed documentType are supported

Example Request

The following example shows how to make a request to the API using curl:

curl --location 'https://<YOUR-IDP-SERVICE-URL>/reader' \
--form 'file=@"YOUR_FILE_PATH"' \
--form 'pageLimit="2"' \
--form 'documentType="passport"'

Response

Parameters

The following parameters can be returned in the response:

ParameterTypeDescription
entitiesobjectThe extracted entities and their values from the uploaded document.
textsarrayAn array of strings containing the extracted text from uploaded document.

Example Response

The following example shows the response to the above request:

{
"entities": {
"name": "SITA MAHA LAKSHMI",
"surname": "RAMADUGULA",
"document_number": "JB369854",
"birth_date": "590923",
"expiry_date": "211010",
"sex": "F",
"nationality": "IND",
"document_type": "P"
},
"texts": [
"WINS TUIRTGW REPUBLIC OF INDIA",
"",
"P IND JE369854",
"RAMADUGULA",
"",
"SITA MANA LAKSHNI",
"",
"INDIAN F 2370971959",
"",
"GUNDUGOLANU",
"HYDERABAD",
"R 8 Lokam",
"",
"117107201 1071072021",
"",
"P<INDRAMADUGULA<<SITA<MAMA<LAKSHMI<<<<<<<<<<",
"JB369854<4IND5909234F2110101<<<<<<<<<<<<<<<8",
""
]
}

Errors

The following error messages can be returned by the API:

Error MessageDescription
InvalidImageFormatThe image file provided is not in a supported format.
InvalidImageSizeThe image file provided exceeds the maximum allowed size.
InvalidPageLimitThe pageLimit parameter provided is not valid.
InvalidDocumentTypeThe documentType parameter provided is not valid.
RateLimitExceededThe requests for the poc server is limited to 30 requests/minute

If an error occurs, the response will have the following format:

{
"status": "error",
"message": "<error message>"
}
  • Currently id_cards_old documentType used for Old Emirates ID accepts only pdf with both front and back side.
  • For all other document types both pdf and image formats are supported
  • Accuracy in the test environment may be slightly lower than the test environment