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.
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. |
| Parameter Name | Type | Description |
|---|---|---|
| HeadPortrait | TextDetectionResult | The Base64-encoded identity 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. |
| 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. |
RecognizePhilippinesDrivingLicenseOCR
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"
}
{
"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"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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 | Failed to download the file. |
| FailedOperation.ImageDecodeFailed | Failed to decode the image. |
| FailedOperation.OcrFailed | OCR recognition failed. This error may be caused by unstable network connections, service anomalies, or other issues. |
| FailedOperation.UnKnowError | Unknown error. |
| FailedOperation.UnOpenError | The service has not been activated. |
| InvalidParameter.EngineImageDecodeFailed | Image decoding failed. |
| InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
| LimitExceeded.TooLargeFileError | The file size exceeds the limit |
| ResourcesSoldOut.ChargeStatusException | The billing status is abnormal. |
フィードバック