tencent cloud

APIs

RecognizePhilippinesDrivingLicenseOCR

下载
聚焦模式
字号
最后更新时间: 2026-10-13 15:31:24

1. API Description

Domain name for API request: ocr.intl.tencentcloudapi.com.

This API is used to recognize a Philippine driver's license.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: RecognizePhilippinesDrivingLicenseOCR.
Version Yes String Common Params. The value used for this API: 2018-11-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore.
ImageBase64 No String The Base64-encoded value of an image.
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
Either the ImageUrl or ImageBase64 of the image must be provided. If both are provided, only ImageUrl will be used.
ImageUrl No String The URL of the image.
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
We recommend that you store the image in Tencent Cloud for higher download speed and stability.
For a non-Tencent Cloud URL, the download speed and stability may be affected.
ReturnHeadImage No Boolean Whether to return the identity photo.

3. Output Parameters

Parameter Name Type Description
HeadPortrait TextDetectionResult Base64 encoded result of portrait photo.
Name TextDetectionResult Full name of the license holder.
LastName TextDetectionResult Last name / surname of the license holder.
FirstName TextDetectionResult First name of the license holder.
MiddleName TextDetectionResult Middle name of the license holder.
Nationality TextDetectionResult Nationality of the license holder.
Sex TextDetectionResult Gender.
Address TextDetectionResult Address of the license holder.
LicenseNo TextDetectionResult Driver's license number.
ExpiresDate TextDetectionResult Expiration date of the driver's license.
AgencyCode TextDetectionResult Code of the issuing agency.
Birthday TextDetectionResult Date of birth of the license holder.
BloodType TextDetectionResult Blood type of the license holder.
Height TextDetectionResult Height of the license holder, in metres as printed on the card (e.g. 1.69).
Weight TextDetectionResult Weight of the license holder, in kilograms (e.g. 65).
EyeColor TextDetectionResult Eye color of the license holder (e.g. BLACK).
DLCodes TextDetectionResult Driver's license codes indicating the vehicle categories the license holder is authorized to operate (e.g. A, A1, B, B1, B2, C, D, BE, CE).
Restrictions TextDetectionResult Restrictions that limit the license holder's driving privileges, such as transmission type (AT / MT) or vehicle-class limits.
Conditions TextDetectionResult Driving conditions of the license holder (e.g. A = must wear glasses, D = daytime driving only).
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 RecognizePhilippinesDrivingLicenseOCR

RecognizePhilippinesDrivingLicenseOCR

Input Example

POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizePhilippinesDrivingLicenseOCR
<Common Request Parameters>

{
    "ReturnHeadImage": "true",
    "ImageUrl": "https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/***/fakeurl.jpg"
}

Output Example

{
    "Response": {
        "Address": {
            "Polygon": [
                {
                    "X": 566,
                    "Y": 500
                },
                {
                    "X": 704,
                    "Y": 500
                },
                {
                    "X": 704,
                    "Y": 532
                },
                {
                    "X": 566,
                    "Y": 532
                }
            ],
            "Value": "132 LAKAS NG MAHIRAP***CITY"
        },
        "AgencyCode": {
            "Polygon": [
                {
                    "X": 1286,
                    "Y": 683
                },
                {
                    "X": 1385,
                    "Y": 683
                },
                {
                    "X": 1385,
                    "Y": 725
                },
                {
                    "X": 1286,
                    "Y": 725
                }
            ],
            "Value": "N2*"
        },
        "Birthday": {
            "Polygon": [
                {
                    "X": 911,
                    "Y": 432
                },
                {
                    "X": 1186,
                    "Y": 432
                },
                {
                    "X": 1186,
                    "Y": 483
                },
                {
                    "X": 911,
                    "Y": 483
                }
            ],
            "Value": "1992/**/22"
        },
        "ExpiresDate": {
            "Polygon": [
                {
                    "X": 557,
                    "Y": 675
                },
                {
                    "X": 1229,
                    "Y": 679
                },
                {
                    "X": 1228,
                    "Y": 736
                },
                {
                    "X": 556,
                    "Y": 732
                }
            ],
            "Value": "2024/**/22"
        },
        "FirstName": {
            "Polygon": [
                {
                    "X": 555,
                    "Y": 320
                },
                {
                    "X": 1286,
                    "Y": 314
                },
                {
                    "X": 1286,
                    "Y": 373
                },
                {
                    "X": 555,
                    "Y": 379
                }
            ],
            "Value": "GE**LD"
        },
        "HeadPortrait": {
            "Polygon": [
                {
                    "X": 108,
                    "Y": 282
                },
                {
                    "X": 536,
                    "Y": 282
                },
                {
                    "X": 536,
                    "Y": 770
                },
                {
                    "X": 108,
                    "Y": 770
                }
            ],
            "Value": "/9j/4AAQSkZJRg.....s97n//2Q=="
        },
        "LastName": {
            "Polygon": [
                {
                    "X": 555,
                    "Y": 320
                },
                {
                    "X": 1286,
                    "Y": 314
                },
                {
                    "X": 1286,
                    "Y": 373
                },
                {
                    "X": 555,
                    "Y": 379
                }
            ],
            "Value": "SA**N"
        },
        "LicenseNo": {
            "Polygon": [
                {
                    "X": 557,
                    "Y": 675
                },
                {
                    "X": 1229,
                    "Y": 679
                },
                {
                    "X": 1228,
                    "Y": 736
                },
                {
                    "X": 556,
                    "Y": 732
                }
            ],
            "Value": "N02-**-****44"
        },
        "MiddleName": {
            "Polygon": [
                {
                    "X": 555,
                    "Y": 320
                },
                {
                    "X": 1286,
                    "Y": 314
                },
                {
                    "X": 1286,
                    "Y": 373
                },
                {
                    "X": 555,
                    "Y": 379
                }
            ],
            "Value": "GO***LES"
        },
        "Name": {
            "Polygon": [
                {
                    "X": 555,
                    "Y": 320
                },
                {
                    "X": 1286,
                    "Y": 314
                },
                {
                    "X": 1286,
                    "Y": 373
                },
                {
                    "X": 555,
                    "Y": 379
                }
            ],
            "Value": "SA*****LES"
        },
        "Nationality": {
            "Polygon": [
                {
                    "X": 563,
                    "Y": 438
                },
                {
                    "X": 660,
                    "Y": 438
                },
                {
                    "X": 660,
                    "Y": 479
                },
                {
                    "X": 563,
                    "Y": 479
                }
            ],
            "Value": "PHL"
        },
        "RequestId": "f3f1b6d7-e2f1-48e1-a454-d2c8ba2e4fa0",
        "Sex": {
            "Polygon": [
                {
                    "X": 561,
                    "Y": 393
                },
                {
                    "X": 743,
                    "Y": 397
                },
                {
                    "X": 742,
                    "Y": 439
                },
                {
                    "X": 561,
                    "Y": 434
                }
            ],
            "Value": "M"
        }
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.DownLoadError File download failed.
FailedOperation.ImageDecodeFailed Image decoding failed.
FailedOperation.OcrFailed OCR recognition failed.
FailedOperation.UnKnowError Unknown error.
FailedOperation.UnOpenError The service has not been activated.
InvalidParameter.EngineImageDecodeFailed Image decoding failed.
InvalidParameterValue.InvalidParameterValueLimit Incorrect parameter value.
LimitExceeded.TooLargeFileError File content too large.
ResourcesSoldOut.ChargeStatusException The billing status is abnormal.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈