Domain name for API request: ocr.intl.tencentcloudapi.com.
Indonesian identity card recognition
Default API request rate limit: 5 requests/second.
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: RecognizeIndonesiaIDCardOCR. |
| 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-jakarta, ap-singapore. |
| ImageBase64 | No | String | The Base64 value of the image. Supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. Supported image size: the downloaded image after Base64 encoding is no more than 7M. Image download time is not more than 3 seconds. Either ImageUrl or ImageBase64 must be provided. If both are provided, only use ImageUrl. |
| ImageUrl | No | String | The Url address of the image. Supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. Supported image size: the downloaded image after Base64 encoding is no more than 7M. Image download time is no more than 3 seconds. 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 portrait photo. If selected true, image restrictions are: Image size after encoding must not exceed 5M, jpg format long side pixel cannot exceed 4000, other formats image long edge pixel maximum of 2000. Short side pixel of all format images not less than 64. Support PNG, jpg, JPEG, BMP, no support for GIF images. If portrait matting fails, return an empty string. |
| Parameter Name | Type | Description |
|---|---|---|
| NIK | String | The Single Identity Number. |
| Nama | String | The full name. |
| TempatTglLahir | String | The place and date of birth. |
| JenisKelamin | String | The gender. |
| GolDarah | String | The blood type. |
| Alamat | String | The address. |
| RTRW | String | The street. |
| KelDesa | String | The village. |
| Kecamatan | String | The region. |
| Agama | String | The religion. |
| StatusPerkawinan | String | The marital status. |
| Perkerjaan | String | The occupation. |
| KewargaNegaraan | String | The nationality. |
| BerlakuHingga | String | The expiry date. |
| IssuedDate | String | The issue date. |
| Photo | String | The portraitImage. |
| Provinsi | String | The province. |
| Kota | String | The city. |
| WarnCardInfos | Array of Integer | Card Warning Information -9101 Alarm for covered certificate, -9102 Alarm for photocopied certificate, -9103 Alarm for photographed certificate, -9104 Alarm for PS certificate, -9107 Alarm for reflective certificate, -9108 Alarm for blurry image, -8101 Alarm for document information format verification, -8102 Alarm for document information consistency verification, -9109 This capability is not enabled. |
| 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. |
RecognizeIndonesiaIDCardOCR call
POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizeIndonesiaIDCardOCR
<Common request parameters>
{
"ReturnHeadImage": "false",
"ImageUrl": "https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/***/fakeurl.jpg"
}
{
"Response": {
"Agama": "ATHOLIK",
"Alamat": "BANJARSARI",
"BerlakuHingga": "SEUMUR HIDUP",
"GolDarah": "O",
"IssuedDate": "15-05-2015",
"JenisKelamin": "LAKEI AKI",
"Kecamatan": "",
"KelDesa": "PAKEMBINANGUN",
"KewargaNegaraan": "INM",
"NIK": "360000000006",
"Nama": "",
"Perkerjaan": "KARYAWAN SWASTA",
"Photo": "",
"RTRW": "00/000",
"RequestId": "0000-0000-0000-0001",
"StatusPerkawinan": "KAWFN",
"TempatTglLahir": "JAKARTA 13-01-1987",
"Provinsi": "DKI JAKARTA",
"Kota": "DKI JAKARTA"
}
}
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 | File download failed. |
| FailedOperation.ImageDecodeFailed | Image decoding failed. |
| FailedOperation.OcrFailed | OCR failed. This error may be caused by unstable network connections,service anomalies or other issues. |
| FailedOperation.UnKnowError | Unknown error. |
| FailedOperation.UnOpenError | The service is not activated. |
| FailedOperation.WarningServiceFailed | General Alarm Service exception |
| InvalidParameter.EngineImageDecodeFailed | Image decoding failed. |
| InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
| LimitExceeded.TooLargeFileError | The file is too large. |
| ResourcesSoldOut.ChargeStatusException | Exceptional billing status. |
文档反馈