The OCR Unified Recognition API recognizes multiple image types, such as general text, ID cards, and invoices. Specify the image type using the Type parameter. You do not need to switch APIs.
Operation description
How to use this API
| Step | Overview |
| 1 | Activate OCR Unified Recognition. After activation, you receive a free quota for testing. |
| 2 | Purchase an OCR Shared Resource Plan. If you do not purchase a resource plan, the system charges you on a pay-as-you-go basis based on your actual usage. |
| 3 | Use the code examples in the API Explorer to integrate the API. After integration, call the API to get recognition results. If you use a RAM user, the Alibaba Cloud account (root account) must grant permissions to the RAM user. For instructions on creating a RAM user, see Create a RAM user. The OCR service provides a system authorization policy named AliyunOCRFullAccess. For instructions on granting permissions, see Grant permissions to a RAM user |
Important notes
| Type | Overview |
| Image format |
|
| Image dimensions |
|
| Image size |
|
| Other notes |
|
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ocr:RecognizeAllText |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Url |
string |
No |
|
https://example.png |
| body |
string |
No |
|
图片二进制文件 |
| Type |
string |
Yes |
|
Advanced |
| OutputFigure |
boolean |
No |
|
false |
| OutputQrcode |
boolean |
No |
|
false |
| OutputBarCode |
boolean |
No |
|
false |
| OutputStamp |
boolean |
No |
|
false |
| OutputCoordinate |
string |
No |
|
"" |
| OutputOricoord |
boolean |
No |
|
false |
| OutputKVExcel |
boolean |
No |
|
false |
| PageNo |
integer |
No |
Set this parameter for mixed invoices, VAT invoices, fixed-amount invoices, air itineraries, train tickets, roll tickets, or common printed invoices (that is, when Type=MixedInvoice/Invoice/QuotaInvoice/AirItinerary/TrainTicket/RollTicket/CommonPrintedInvoice).
|
1 |
| AdvancedConfig |
object |
No |
|
|
| OutputRow |
boolean |
No |
|
false |
| OutputParagraph |
boolean |
No |
|
false |
| OutputTable |
boolean |
No |
|
false |
| OutputCharInfo |
boolean |
No |
|
false |
| IsLineLessTable |
boolean |
No |
|
false |
| IsHandWritingTable |
boolean |
No |
|
false |
| OutputTableExcel |
boolean |
No |
|
false |
| OutputTableHtml |
boolean |
No |
|
false |
| IdCardConfig |
object |
No |
|
|
| OutputIdCardQuality |
boolean |
No |
|
false |
| Llm_rec |
boolean |
No |
||
| InternationalIdCardConfig |
object |
No |
|
|
| Country |
string |
No |
|
India |
| InternationalBusinessLicenseConfig |
object |
No |
|
|
| Country |
string |
No |
Valid values:
|
India |
| MultiLanConfig |
object |
No |
|
|
| Languages |
string |
No |
|
eng,chn |
| TableConfig |
object |
No |
|
|
| IsHandWritingTable |
boolean |
No |
|
false |
| IsLineLessTable |
boolean |
No |
|
false |
| OutputTableExcel |
boolean |
No |
|
false |
| OutputTableHtml |
boolean |
No |
|
false |
Request parameters have three levels. Level-one parameters are required basic parameters, such as the image URL and image type. Level-two parameters control output content, such as returning coordinates. Level-three parameters apply to specific image types and control output of specific information, such as ID card quality scores. Only Type is required. Other parameters are optional.
Additional information about request parameters for each image type (Type)
| Type | Description | Supported parameters |
| Advanced | Advanced general text recognition |
|
| General | Basic general text recognition |
|
| Commerce | E-commerce image text |
|
| HandWriting | Handwritten text |
|
| MultiLang | Multilingual text |
|
| Table | Table |
|
| IdCard | ID card |
|
| BankCard | Bank card |
|
| InternationalPassport | International passport |
|
| ChinesePassport | Chinese passport |
|
| SocialSecurityCard | Social security card |
|
| PermitToHK_MO_TW | Hong Kong, Macao, and Taiwan travel permit |
|
| PermitToMainland | Mainland China travel permit |
|
| HouseholdHead | Household registration book cover |
|
| HouseholdResident | Household registration book resident page |
|
| EstateCertification | Real estate ownership certificate |
|
| BirthCertification | Birth certificate |
|
| HKIdCard | Hong Kong ID card |
|
| InternationalIdCard | International ID card |
|
| Stamp | Official seal |
|
| MixedInvoice | Mixed invoice |
|
| Invoice | VAT invoice |
|
| CarInvoice | Motor vehicle sales unified invoice |
|
| QuotaInvoice | Fixed-amount invoice |
|
| AirItinerary | Air itinerary |
|
| TrainTicket | Train ticket |
|
| TollInvoice | Toll road invoice |
|
| RollTicket | VAT invoice roll ticket |
|
| BankAcceptance | Bank acceptance bill |
|
| BusShipTicket | Passenger bus or ship ticket |
|
| NonTaxInvoice | Non-tax revenue invoice |
|
| CommonPrintedInvoice | Common printed invoice |
|
| HotelConsume | Hotel transaction record |
|
| PaymentRecord | Payment details page |
|
| PurchaseRecord | E-commerce order page |
|
| RideHailingItinerary | Ride-hailing itinerary |
|
| ShoppingReceipt | Shopping receipt |
|
| TaxClearanceCertificate | Tax clearance certificate |
|
| UsedCarInvoice | Used car sales unified invoice |
|
| VehicleLicense | Vehicle license |
|
| DrivingLicense | Driver's license |
|
| VehicleRegistration | Motor vehicle registration certificate |
|
| VehicleCertification | Vehicle qualification certificate |
|
| LicensePlateNumber | License plate number |
|
| CarVinCode | Vehicle VIN code |
|
| BusinessLicense | Business license |
|
| InternationalBusinessLicense | International business license |
|
| MedicalDeviceManageLicense | Medical device operating license |
|
| MedicalDeviceProduceLicense | Medical device production license |
|
| CosmeticProduceLicense | Cosmetic production license |
|
| QrCode | QR code | |
| BarCode | Barcode | |
| TaxiInvoice | Taxi invoice |
|
| TrademarkCertificate | Trademark registration certificate |
|
| FoodProduceLicense | Food production license |
|
| FoodManagementLicense | Food operation license |
|
| ClassIIMedicalDeviceManageLicense | Class II medical device operating filing certificate |
|
| WayBill | Electronic waybill |
|
| BankAccountPermit | Bank account permit |
|
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema |
||
| RequestId |
string |
The unique request ID. |
E2A98925-DC2C-18FB-995F-BAF507XXXXXX |
| Data |
object |
The recognition result. |
|
| Height |
integer |
The original image height. |
2000 |
| Width |
integer |
The original image width. |
1000 |
| Content |
string |
All text in the image. |
"合同编号..." |
| SubImageCount |
integer |
The number of sub-images in the image. |
2 |
| SubImages |
array<object> |
Information about sub-images in the image. |
|
|
array<object> |
|||
| SubImageId |
integer |
The sub-image ID (starts from 0). |
0 |
| Type |
string |
The sub-image type (for example, ID card front or VAT invoice). |
身份证正面 |
| Angle |
integer |
The clockwise rotation angle of the sub-image (range: 0–359 degrees). |
0 |
| SubImagePoints |
array<object> |
The four-point coordinates of the sub-image (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| SubImageRect |
object |
The rotated rectangle coordinates of the sub-image (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The sub-image width. |
1000 |
| Height |
integer |
The sub-image height. |
2000 |
| KvInfo |
object |
|
|
| KvCount |
integer |
The number of key-value pairs in the structured information. |
6 |
| Data |
any |
|
{ "address": "XX省XX市XX街道XX号", "ethnicity": "汉", "sex": "男", "name": "王XX", "idNumber": "XXX", "birthDate": "2000年1月1日" } |
| KvDetails |
object |
|
|
|
object |
|
||
| KeyName |
string |
The field name. |
"address" |
| KeyConfidence |
integer |
The confidence level of the field (range: 0–100). |
100 |
| Value |
string |
The text content of the field value (KeyName). |
"XX省XX市XX街道" |
| ValueConfidence |
integer |
The confidence level of the field value (range: 0–100). |
98 |
| ValuePoints |
array<object> |
The four-point coordinates of the field value (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| ValueRect |
object |
The rotated rectangle coordinates of the field value (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
50 |
| Height |
integer |
The rectangle height. |
50 |
| ValueAngle |
integer |
The clockwise rotation angle of the field value (range: 0–359). |
0 |
| BlockInfo |
object |
|
|
| BlockCount |
integer |
The number of text blocks in the sub-image. |
12 |
| BlockDetails |
array<object> |
Detailed text block information for the sub-image. |
|
|
array<object> |
|||
| BlockId |
integer |
The text block ID (starts from 0). |
0 |
| BlockAngle |
integer |
The clockwise rotation angle of the text block (range: 0–359). |
0 |
| BlockContent |
string |
The text content of the block. |
“合同编号...” |
| BlockConfidence |
integer |
The confidence level of the text block (range: 0–100). |
98 |
| BlockPoints |
array<object> |
The four-point coordinates of the text block (returned when OutputCoordinate="points"). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| BlockRect |
object |
The rotated rectangle coordinates of the text block (returned when OutputCoordinate="rectangle"). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
50 |
| Height |
integer |
The rectangle height. |
10 |
| CharInfos |
array<object> |
Character-level information (returned when AdvancedConfig.OutputCharInfo=true). |
|
|
array<object> |
|||
| CharId |
integer |
The character ID (starts from 0). |
0 |
| CharContent |
string |
The character content. |
“合” |
| CharConfidence |
integer |
The confidence level of the character (range: 0–100). |
95 |
| CharPoints |
array<object> |
The four-point coordinates of the character (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| CharRect |
object |
The rotated rectangle coordinates of the character (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
10 |
| Height |
integer |
The rectangle height. |
10 |
| TableInfo |
object |
Table information (returned when AdvancedConfig.OutputTable=true). |
|
| TableCount |
integer |
The number of tables. |
2 |
| TableDetails |
array<object> |
Detailed table information. |
|
|
array<object> |
|||
| TableId |
integer |
The table ID (starts from 0). |
0 |
| RowCount |
integer |
The number of rows in the table. |
10 |
| ColumnCount |
integer |
The number of columns in the table. |
3 |
| CellCount |
integer |
The number of cells in the table. |
29 |
| Header |
object |
Header information. |
|
| Contents |
array |
The header text content. |
|
|
string |
|
"12.1本合同当事人" |
|
| BlockId |
integer |
The text block ID (starts from 0). |
0 |
| Footer |
object |
Footer information. |
|
| Contents |
array |
The footer text content. |
|
|
string |
|
"贷款人/抵押权人(盖章/电子签章):" |
|
| BlockId |
integer |
The text block ID (starts from 0). |
0 |
| CellDetails |
array<object> |
Detailed cell information. |
|
|
array<object> |
|||
| CellId |
integer |
The cell ID (starts from 0). |
0 |
| CellContent |
string |
The cell text content. |
"借款人/抵押人:" |
| RowStart |
integer |
The starting row number of the cell. The first position is 0. |
0 |
| RowEnd |
integer |
The ending row number of the cell. The first position is 0. RowStart=0 and RowEnd=0 means the cell occupies only the first row. |
0 |
| ColumnStart |
integer |
The starting column number of the cell. The first position is 0. |
2 |
| ColumnEnd |
integer |
The ending column number of the cell. The first position is 0. ColumnStart=0 and ColumnEnd=0 means the cell occupies only the first column. |
5 |
| BlockList |
array |
The list of text block IDs in this cell. |
|
|
integer |
A single text block ID. |
0 |
|
| CellPoints |
array<object> |
The four-point coordinates of the cell (returned when OutputCoordinate="points"). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| CellRect |
object |
The rotated rectangle coordinates of the cell (returned when OutputCoordinate="rectangle"). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
20 |
| Height |
integer |
The rectangle height. |
20 |
| CellAngle |
integer |
The clockwise rotation angle of the cell (range: 0–359). |
0 |
| TablePoints |
array<object> |
The four-point coordinates of the table (returned when OutputCoordinate=“points"). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| TableRect |
object |
The rotated rectangle coordinates of the table (returned when OutputCoordinate=“rectangle"). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
100 |
| Height |
integer |
The rectangle height. |
100 |
| TableExcel |
string |
|
https://example.xlsx |
| TableHtml |
string |
|
https://example.html |
| RowInfo |
object |
Row information for the sub-image (returned when AdvancedConfig.OutputRow=true). |
|
| RowCount |
integer |
The number of rows in the sub-image. |
9 |
| RowDetails |
array<object> |
Detailed row information for the sub-image. |
|
|
object |
|||
| RowId |
integer |
The row ID (starts from 0). |
0 |
| RowContent |
string |
The row text content. |
“合同编号..." |
| BlockList |
array |
The list of text block IDs in this row. |
|
|
integer |
A single text block ID. |
0 |
|
| ParagraphInfo |
object |
Paragraph information for the sub-image (returned when AdvancedConfig.OutputParagraph=true). |
|
| ParagraphCount |
integer |
The number of paragraphs in the sub-image. |
11 |
| ParagraphDetails |
array<object> |
Detailed paragraph information for the sub-image. |
|
|
object |
|||
| ParagraphId |
integer |
The paragraph ID (starts from 0). |
0 |
| ParagraphContent |
string |
The paragraph text content. |
“合同编号...” |
| BlockList |
array |
The list of text block IDs in this paragraph. |
|
|
integer |
A single text block ID. |
0 |
|
| QrCodeInfo |
object |
QR code information for the sub-image (returned when OutputQrcode=true). |
|
| QrCodeCount |
integer |
The number of QR codes in the sub-image. |
1 |
| QrCodeDetails |
array<object> |
Detailed QR code information for the sub-image. |
|
|
array<object> |
|||
| Data |
any |
The QR code content. |
“http://www.gsxt.gov.cn/indeXXX” |
| QrCodePoints |
array<object> |
The four-point coordinates of the QR code (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| QrCodeRect |
object |
The rotated rectangle coordinates of the QR code (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
100 |
| Height |
integer |
The rectangle height. |
100 |
| QrCodeAngle |
integer |
The rotation angle of the QR code (range: 0–359). |
0 |
| BarCodeInfo |
object |
Barcode information for the sub-image (returned when OutputBarCode=true). |
|
| BarCodeCount |
integer |
The number of barcodes in the sub-image. |
2 |
| BarCodeDetails |
array<object> |
Detailed barcode information. |
|
|
array<object> |
|||
| Type |
string |
The barcode type. Supported types:
|
Code128 |
| Data |
any |
The barcode content. |
"1100011XXXXXX" |
| BarCodePoints |
array<object> |
The four-point coordinates of the barcode (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| BarCodeRect |
object |
The rotated rectangle coordinates of the barcode (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
100 |
| Height |
integer |
The rectangle height. |
10 |
| BarCodeAngle |
integer |
The clockwise rotation angle of the barcode (range: 0–359). |
0 |
| FigureInfo |
object |
Pattern information for the sub-image (returned when OutputFigure=true). This is a dictionary where the key is the pattern type and the value is the information for that pattern type. Supported pattern types:
|
|
|
object |
Detailed pattern information. |
||
| FigureCount |
integer |
The number of patterns in the sub-image. |
3 |
| FigureDetails |
array<object> |
Detailed pattern information. |
|
|
array<object> |
|||
| Type |
string |
The pattern type. One of blicense_title, national_emblem, face, finger_print, or signature. |
face |
| Data |
any |
Pattern data (returned only if data exists). |
“” |
| FigurePoints |
array<object> |
The four-point coordinates of the pattern (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| FigureRect |
object |
The rotated rectangle coordinates of the pattern (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
50 |
| Height |
integer |
The rectangle height. |
50 |
| FigureAngle |
integer |
The clockwise rotation angle of the pattern (range: 0–359). |
0 |
| StampInfo |
object |
Stamp information for the sub-image (returned when OutputStamp=true). |
|
| StampCount |
integer |
The number of seals in the sub-image. |
2 |
| StampDetails |
array<object> |
The details of the stamp. |
|
|
array<object> |
|||
| Data |
object |
The seal recognition result for the sub-image. This is a dictionary where the key is the field name and the value is the recognized result for the corresponding field. |
|
| CompanyId |
string |
The import and export enterprise code. |
"XXX" |
| OrganizationName |
string |
The organization name. |
"XXX贸易有限公司" |
| AntiFakeCode |
string |
The anti-counterfeiting code. |
"3205823XXXXXX" |
| OtherText |
string |
Other text. |
"3205823XXXXXX" |
| TopText |
string |
Text that appears on the outer ring of the stamp. |
"XXX贸易有限公司" |
| OrganizationNameEng |
string |
The English organization name. |
"" |
| TaxpayerId |
string |
The taxpayer identification number. |
"" |
| StampPoints |
array<object> |
The four-point coordinates of the seal (returned when OutputCoordinate=“points”). |
|
|
object |
|||
| X |
integer |
The x-coordinate of the vertex. |
100 |
| Y |
integer |
The y-coordinate of the vertex. |
200 |
| StampRect |
object |
The rotated rectangle coordinates of the seal (returned when OutputCoordinate=“rectangle”). |
|
| CenterX |
integer |
The x-coordinate of the rectangle center. |
100 |
| CenterY |
integer |
The y-coordinate of the rectangle center. |
200 |
| Width |
integer |
The rectangle width. |
50 |
| Height |
integer |
The rectangle height. |
50 |
| StampAngle |
integer |
The clockwise rotation angle of the rectangle (range: 0–359). |
0 |
| QualityInfo |
object |
Quality detection information for the sub-image. |
|
| IsCopy |
boolean |
Indicates whether it is a photocopy. |
false |
| IsReshoot |
boolean |
Indicates whether it is a photo of a document. Only supported for ID card images (Type=IdCard). |
false |
| CompletenessScore |
number |
The completeness score. Only supported for ID card images (Type=IdCard). |
90.5 |
| QualityScore |
number |
The overall quality score. Only supported for ID card images (Type=IdCard). |
80.5 |
| TamperScore |
number |
The tamper score. Only supported for ID card images (Type=IdCard). |
10.5 |
| XmlResult |
string |
The result in XML format. |
"" |
| AlgoVersion |
string |
The algorithm version number. |
"" |
| DebugInfo |
any |
Debug information (returned only if not empty). |
"" |
| AlgoServer |
array |
The list of algorithm server information (returned only if not empty). |
|
|
string |
Algorithm server information. |
"" |
|
| IsMixedMode |
boolean |
Indicates whether it is a mixed type. |
false |
| PageNo |
integer |
The PDF/OFD page number (starts from 1). |
1 |
| KvExcelUrl |
string |
|
https://example.xlsx |
| Code |
string |
The error code (not returned if recognition is successful). |
400 |
| Message |
string |
The error message (not returned if recognition is successful). |
illegalImageUrl |
KV information fields for each image type (Type). All KV fields are of String type.
| Type | Type description | Returned KV information fields |
| IdCard | ID card |
|
| BankCard | Bank card |
|
| InternationalPassport | International passport |
|
| ChinesePassport | Chinese passport |
|
| SocialSecurityCard | Social security card |
|
| PermitToHK_MO_TW | Hong Kong, Macao, and Taiwan travel permit |
|
| PermitToMainland | Mainland China travel permit |
|
| HouseholdHead | Household registration book cover |
|
| HouseholdResident | Household registration book resident page |
|
| EstateCertification | Real estate ownership certificate |
|
| BirthCertification | Birth certificate |
|
| HKIdCard | Hong Kong ID card |
|
| InternationalIdCard | International ID card |
|
| Stamp | Official seal |
|
| Invoice | VAT invoice |
|
| CarInvoice | Motor vehicle sales unified invoice |
|
| QuotaInvoice | Fixed-amount invoice |
|
| AirItinerary | Air itinerary |
|
| TrainTicket | Train ticket |
|
| TollInvoice | Toll road invoice |
|
| RollTicket | VAT invoice roll ticket |
|
| BankAcceptance | Bank acceptance bill |
|
| BusShipTicket | Passenger bus or ship ticket |
|
| NonTaxInvoice | Non-tax revenue invoice |
|
| CommonPrintedInvoice | Common printed invoice |
|
| HotelConsume | Hotel transaction record |
|
| PaymentRecord | Payment details page |
|
| PurchaseRecord | E-commerce order page |
|
| RideHailingItinerary | Ride-hailing itinerary |
|
| ShoppingReceipt | Shopping receipt |
|
| TaxClearanceCertificate | Tax clearance certificate |
|
| UsedCarInvoice | Used car sales unified invoice |
|
| VehicleLicense | Vehicle license |
|
| DrivingLicense | Driver's license |
|
| VehicleRegistration | Motor vehicle registration certificate |
|
| VehicleCertification | Vehicle qualification certificate |
|
| LicensePlateNumber | License plate number |
|
| CarVinCode | Vehicle VIN code |
|
| BusinessLicense | Business license |
|
| BusinessLicense | International business license |
|
| MedicalDeviceManageLicense | Medical device operating license |
|
| MedicalDeviceProduceLicense | Medical device production license |
|
| CosmeticProduceLicense | Cosmetic production license |
|
| TaxiInvoice | Taxi invoice |
|
| TrademarkCertificate | Trademark registration certificate |
|
| FoodProduceLicense | Food production license |
|
| FoodManagementLicense | Food operation license |
|
| ClassIIMedicalDeviceManageLicense | Class II medical device operating filing certificate |
|
| WayBill | Electronic waybill |
|
| BankAccountPermit | Bank account permit |
|
Examples
Success response
JSON format
{
"RequestId": "E2A98925-DC2C-18FB-995F-BAF507XXXXXX",
"Data": {
"Height": 2000,
"Width": 1000,
"Content": "\"合同编号...\"",
"SubImageCount": 2,
"SubImages": [
{
"SubImageId": 0,
"Type": "身份证正面",
"Angle": 0,
"SubImagePoints": [
{
"X": 100,
"Y": 200
}
],
"SubImageRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 1000,
"Height": 2000
},
"KvInfo": {
"KvCount": 6,
"Data": "{\n \"address\": \"XX省XX市XX街道XX号\",\n \"ethnicity\": \"汉\",\n \"sex\": \"男\",\n \"name\": \"王XX\",\n \"idNumber\": \"XXX\",\n \"birthDate\": \"2000年1月1日\"\n}",
"KvDetails": {
"key": {
"KeyName": "\"address\"",
"KeyConfidence": 100,
"Value": "\"XX省XX市XX街道\"",
"ValueConfidence": 98,
"ValuePoints": [
{
"X": 100,
"Y": 200
}
],
"ValueRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 50,
"Height": 50
},
"ValueAngle": 0
}
}
},
"BlockInfo": {
"BlockCount": 12,
"BlockDetails": [
{
"BlockId": 0,
"BlockAngle": 0,
"BlockContent": "“合同编号...”",
"BlockConfidence": 98,
"BlockPoints": [
{
"X": 100,
"Y": 200
}
],
"BlockRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 50,
"Height": 10
},
"CharInfos": [
{
"CharId": 0,
"CharContent": "“合”",
"CharConfidence": 95,
"CharPoints": [
{
"X": 100,
"Y": 200
}
],
"CharRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 10,
"Height": 10
}
}
]
}
]
},
"TableInfo": {
"TableCount": 2,
"TableDetails": [
{
"TableId": 0,
"RowCount": 10,
"ColumnCount": 3,
"CellCount": 29,
"Header": {
"Contents": [
"\"12.1本合同当事人\""
],
"BlockId": 0
},
"Footer": {
"Contents": [
"\"贷款人/抵押权人(盖章/电子签章):\""
],
"BlockId": 0
},
"CellDetails": [
{
"CellId": 0,
"CellContent": "\"借款人/抵押人:\"",
"RowStart": 0,
"RowEnd": 0,
"ColumnStart": 2,
"ColumnEnd": 5,
"BlockList": [
0
],
"CellPoints": [
{
"X": 100,
"Y": 200
}
],
"CellRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 20,
"Height": 20
},
"CellAngle": 0
}
],
"TablePoints": [
{
"X": 100,
"Y": 200
}
],
"TableRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 100,
"Height": 100
}
}
],
"TableExcel": "https://example.xlsx",
"TableHtml": "https://example.html"
},
"RowInfo": {
"RowCount": 9,
"RowDetails": [
{
"RowId": 0,
"RowContent": "“合同编号...\"",
"BlockList": [
0
]
}
]
},
"ParagraphInfo": {
"ParagraphCount": 11,
"ParagraphDetails": [
{
"ParagraphId": 0,
"ParagraphContent": "“合同编号...”",
"BlockList": [
0
]
}
]
},
"QrCodeInfo": {
"QrCodeCount": 1,
"QrCodeDetails": [
{
"Data": "“http://www.gsxt.gov.cn/indeXXX”",
"QrCodePoints": [
{
"X": 100,
"Y": 200
}
],
"QrCodeRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 100,
"Height": 100
},
"QrCodeAngle": 0
}
]
},
"BarCodeInfo": {
"BarCodeCount": 2,
"BarCodeDetails": [
{
"Type": "Code128",
"Data": "\"1100011XXXXXX\"",
"BarCodePoints": [
{
"X": 100,
"Y": 200
}
],
"BarCodeRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 100,
"Height": 10
},
"BarCodeAngle": 0
}
]
},
"FigureInfo": {
"key": {
"FigureCount": 3,
"FigureDetails": [
{
"Type": "face",
"Data": "“”",
"FigurePoints": [
{
"X": 100,
"Y": 200
}
],
"FigureRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 50,
"Height": 50
},
"FigureAngle": 0
}
]
}
},
"StampInfo": {
"StampCount": 2,
"StampDetails": [
{
"Data": {
"CompanyId": "\"XXX\"",
"OrganizationName": "\"XXX贸易有限公司\"",
"AntiFakeCode": "\"3205823XXXXXX\"",
"OtherText": "\"3205823XXXXXX\"",
"TopText": "\"XXX贸易有限公司\"",
"OrganizationNameEng": "\"\"",
"TaxpayerId": "\"\""
},
"StampPoints": [
{
"X": 100,
"Y": 200
}
],
"StampRect": {
"CenterX": 100,
"CenterY": 200,
"Width": 50,
"Height": 50
},
"StampAngle": 0
}
]
},
"QualityInfo": {
"IsCopy": false,
"IsReshoot": false,
"CompletenessScore": 90.5,
"QualityScore": 80.5,
"TamperScore": 10.5
}
}
],
"XmlResult": "\"\"",
"AlgoVersion": "\"\"",
"DebugInfo": "\"\"",
"AlgoServer": [
"\"\""
],
"IsMixedMode": false,
"PageNo": 1,
"KvExcelUrl": "https://example.xlsx"
},
"Code": "400",
"Message": "illegalImageUrl"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | invalidInputParameter | %s | |
| 400 | InvalidCountry | Specified parameter Country is not valid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.