Business card
    • PDF

    Business card

    • PDF

    Article summary

    Available in Classic and VPC

    Recognize and extract key-value input information from business cards using a specialized model engine.

    Request

    This section describes the request format. The method and URI are as follows:

    MethodURI
    POST/name-card

    Request headers

    For information about the headers common to all CLOVA OCR APIs, see CLOVA OCR request headers.

    Request body

    You can include the following data in the body of your request:

    If Content-Type: application/json

    You can include the following data in the body of your request if the request header's Content-Type is application/json:

    FieldTypeRequiredDescription
    versionString-Version information
    • Only use V2
    requestIdStringRequiredRandom API call UUID
    timestampIntegerRequiredRandom API call time (timestamp)
    imagesArrayRequiredimages details

    If Content-Type: multipart/form-data

    You can include the following data in the body of your request if the request header's Content-Type is multipart/form-data:

    FieldTypeRequiredDescription
    messageObjectRequiredRequest data information
    message.versionStringRequiredVersion information
    • Only use V2
    message.requestIdStringRequiredRandom API call UUID
    message.timestampIntegerRequiredRandom API call time (timestamp)
    message.imagesArrayRequiredimages details
    fileFileRequiredOCR recognition image file

    images

    The following describes images.

    FieldTypeRequiredDescription
    formatStringRequiredImage format
    • jpg | jpeg | png | pdf | tif | tiff
      • Image: jpg, jpeg, png
      • Single page: pdf, tif, tiff
    • Select and enter one of the image formats
    nameStringRequiredRandom image name
    • Use to identify images and check response results
    dataStringRequiredBase64-encoded image data
    • Can be entered if Content-Type: application/json

    Request example

    The request example is as follows:

    If Content-Type: application/json

    The request example if the request header's Content-Type is application/json is as follows:

    curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/name-card' \
    --header 'Content-Type: application/json' \
    --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
    --data '{
        "version": "V2",
        "requestId": "1234",
        "timestamp": 0,
        "images": [
            { 
                "format": "jpg", 
                "name": "namecard_test2",
                "data": "{Base64-encoded image data}"
            }
        ]
    }'
    

    If Content-Type: multipart/form-data

    The request example if the request header's Content-Type is multipart/form-data is as follows:

    curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/name-card' \
    --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
    --header 'Content-Type: multipart/form-data' \
    --form 'message="{\"version\": \"V2\", \"requestId\": \"1234\", \"timestamp\": 1724832750462, \"images\": [{\"format\": \"jpg\", \"name\": \"namecard_test\"}]}"' \
    --form 'file={file}.jpg"'
    

    Response

    This section describes the response format.

    Response body

    The response body includes the following data:

    FieldTypeRequiredDescription
    versionString-Version information
    • Only use V2
    requestIdString-Random API call UUID
    timestampInteger-API call time (timestamp)
    imagesArray-images details

    images

    The following describes images.

    FieldTypeRequiredDescription
    uidString-Business card image UID
    • Use for API validity checks
    nameString-Business card image name
    • Use to identify images and check response results
    inferResultString-Business card image recognition result
    • SUCCESS | FAILURE | ERROR
      • SUCCESS: recognition successful
      • FAILURE: recognition failure
      • ERROR: recognition processing exception
    messageString-Result message
    validationResultObject-Validity check result information
    validationResult.resultString-Validity check result code
    • NO_REQUESTED | UNCHECKED | ERROR | VALID | INVALID
      • NO_REQUESTED: no validation action requested (validity check failed)
      • UNCHECKED: unable to verify validation
      • ERROR: error on validation (validity check failed)
      • VALID: validation result valid (validity check succeeded)
      • INVALID: failed to pass validation
    validationResult.messageString-Validity check result details message
    • This value is not always returned
    convertedImageInfoObject-Converted image information
    • If format is pdf or tiff
    • Coordinate values are set relative to the called image file
    convertedImageInfo.widthInteger-Converted image width
    convertedImageInfo.heightInteger-Converted image height
    convertedImageInfo.pageIndexInteger-Converted image page index
    nameCardObject-Business card details
    nameCard.metaObject-Meta information
    nameCard.meta.estimatedLanguageString-OCR estimated language
    • ko | en | ja
      • ko:Korean
      • en: English
      • ja: Japanese
    nameCard.resultObject-Business card OCR recognition result

    result

    The following describes result.

    FieldTypeRequiredDescription
    nameArray-Name information
    nameFuriganaArray-Furigana name information
    companyArray-Company information
    addressArray-Address information
    positionArray-Job title information
    departmentArray-Department information
    mobileArray-Mobile phone information
    telArray-Phone information
    faxArray-Fax information
    emailArray-Email information
    homepageArray-Website information

    Common object information

    The following describes the common objects.

    FieldTypeRequiredDescription
    textString-Recognized text
    keyTextString-Key value of recognized text
    confidenceScoreFloat-Confidence of recognized text
    • 0 - 1
    • The higher the confidence value, the more accurate the text is
    boundingPolyObject-Bounding Poly information
    boundingPolysArray-boundingPoly details
    maskingPolysArray-maskingPoly details

    boundingPolys

    The following describes boundingPolys.

    FieldTypeRequiredDescription
    verticesArray-vertices details

    maskingPolys

    The following describes maskingPolys.

    FieldTypeRequiredDescription
    verticesArray-vertices details

    vertices

    The following describes boundingPolyVertices.

    FieldTypeRequiredDescription
    xFloat-X-axis coordinate value
    yFloat-Y-axis coordinate value

    Response status codes

    For response status codes common to all CLOVA OCR APIs, see Common CLOVA OCR response status codes.

    Response example

    The response example is as follows:

    Success

    The following is a sample response upon a successful call.

    {
        "version": "V2",
        "requestId": "1234",
        "timestamp": 1725235494383,
        "images": [
            {
                "uid": "{uid}",
                "name": "namecard_test",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                },
                "nameCard": {
                    "meta": {
                        "estimatedLanguage": "ko"
                    },
                    "result": {
                        "name": [
                            {
                                "text": "Kim**",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 92.0,
                                                "y": 103.0
                                            },
                                            {
                                                "x": 218.0,
                                                "y": 103.0
                                            },
                                            {
                                                "x": 218.0,
                                                "y": 141.0
                                            },
                                            {
                                                "x": 92.0,
                                                "y": 141.0
                                            }
                                        ]
                                    }
                                ],
                                "maskingPolys": []
                            }
                        ],
                        "company": [
                            {
                                "text": "** **Distributor",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 90.0,
                                                "y": 255.0
                                            },
                                            {
                                                "x": 237.0,
                                                "y": 255.0
                                            },
                                            {
                                                "x": 237.0,
                                                "y": 284.0
                                            },
                                            {
                                                "x": 90.0,
                                                "y": 284.0
                                            }
                                        ]
                                    }
                                ],
                                "maskingPolys": []
                            }
                        ],
                        "address": [
                            {
                                "text": "Seoul***",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 91.0,
                                                "y": 287.0
                                            },
                                            {
                                                "x": 376.0,
                                                "y": 287.0
                                            },
                                            {
                                                "x": 376.0,
                                                "y": 312.0
                                            },
                                            {
                                                "x": 91.0,
                                                "y": 312.0
                                            }
                                        ]
                                    }
                                ],
                                "maskingPolys": []
                            }
                        ],
                        "position": [
                            {
                                "text": "****",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 226.0,
                                                "y": 114.0
                                            },
                                            {
                                                "x": 300.0,
                                                "y": 114.0
                                            },
                                            {
                                                "x": 300.0,
                                                "y": 138.0
                                            },
                                            {
                                                "x": 226.0,
                                                "y": 138.0
                                            }
                                        ]
                                    }
                                ],
                                "maskingPolys": []
                            }
                        ],
                        "mobile": [
                            {
                                "text": "010********",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 88.0,
                                                "y": 145.0
                                            },
                                            {
                                                "x": 300.0,
                                                "y": 145.0
                                            },
                                            {
                                                "x": 300.0,
                                                "y": 175.0
                                            },
                                            {
                                                "x": 88.0,
                                                "y": 175.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "tel": [
                            {
                                "text": "02-****-****",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 89.0,
                                                "y": 311.0
                                            },
                                            {
                                                "x": 264.0,
                                                "y": 311.0
                                            },
                                            {
                                                "x": 264.0,
                                                "y": 333.0
                                            },
                                            {
                                                "x": 89.0,
                                                "y": 333.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "fax": [
                            {
                                "text": "02-****-****",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 89.0,
                                                "y": 334.0
                                            },
                                            {
                                                "x": 264.0,
                                                "y": 334.0
                                            },
                                            {
                                                "x": 264.0,
                                                "y": 358.0
                                            },
                                            {
                                                "x": 89.0,
                                                "y": 358.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "email": [
                            {
                                "text": "****@****.net",
                                "keyText": "",
                                "confidenceScore": 0.0,
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 137.0,
                                                "y": 359.0
                                            },
                                            {
                                                "x": 312.0,
                                                "y": 359.0
                                            },
                                            {
                                                "x": 312.0,
                                                "y": 382.0
                                            },
                                            {
                                                "x": 137.0,
                                                "y": 382.0
                                            }
                                        ]
                                    }
                                ],
                                "maskingPolys": []
                            }
                        ]
                    }
                }
            }
        ]
    }
    

    Failure

    The following is a sample response upon a failed call.

    {
        "version": "V2",
        "requestId": "1234",
        "timestamp": 1725235840459,
        "images": [
            {
                "uid": "{uid}",
                "name": "namecard_test2",
                "inferResult": "ERROR",
                "message": "Read page:0 error.",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.