RecognizeAllText

Updated at:

Recognizes text in multiple image types through a unified OCR interface, including general text, personal ID cards, and invoices. You only need to specify the image type by using the Type parameter without switching to a different API operation.

Operation description

How to use this operation

StepDescription
1Activate the Unified OCR Recognition service. After you activate this API operation, you receive a free quota that you can use for testing.
2Purchase an OCR Shared Resource Plan. You can also skip purchasing a resource plan. The system automatically deducts fees based on actual usage through the pay-as-you-go billing method.
3Refer to the code samples on the debugging page to complete API integration. After integration, call the API operation to obtain recognition results. If you use a RAM user to call the API operation, the Alibaba Cloud account must grant permissions to the RAM user. For more information about how to create a RAM user, see Create a RAM user. The text recognition service provides a system authorization policy: AliyunOCRFullAccess. For more information about how to grant permissions, see Grant permissions to a RAM user on the Users page.

Important notes

TypeDescription
Image format
  • This operation supports the following formats: PNG, JPG, JPEG, BMP, GIF, TIFF, WebP, and PDF.

Image dimensions
  • The image width and height must be greater than 15 pixels and less than 8,192 pixels.

  • The aspect ratio must be less than 50.

  • For better recognition results, both the width and height should be greater than 500 px.

Image size
  • The binary file of the image cannot exceed 10 MB.

  • Large images affect the response speed of the operation. Use images smaller than 1.5 MB for recognition and invoke the operation by passing an image URL.

Other notes
  • Make sure that the entire image content and its edges are included in the image.

  • This feature automatically handles interference such as glare and distortion, but accuracy may be affected. Use images with high clarity, no glare, and no distortion whenever possible.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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

  • Specify either this parameter or the body parameter. Do not specify both or leave both empty.

  • The URL of the image. The URL can be up to 2,048 bytes in length. Base64 encoding is not supported.

https://example.png

body

string

No

  • Specify either this parameter or the URL parameter. Do not specify both or leave both empty.

  • The binary binary file. The maximum file size is 10 MB.

  • If you use HTTP to call the operation, place the binary binary file in the HTTP body for upload.

  • If you use an SDK to call the operation, place the image in the body of the SDK.

Binary file

Type

string

Yes

  • The image type. This is a required parameter and only a single value can be specified.

  • For supported image types, see Supplementary description of request parameters.

  • For document and card images, if the actual image type does not match the specified Type, recognition fails.

Advanced

OutputFigure

boolean

No

  • Specifies whether to enable the figure detection feature. If enabled, the FigureInfo field is returned. For the metric description, see the response parameters.

  • true: Enable. false: Disable.

  • Default value: The default value varies by image type (Type). For more information, see Supplementary description of request parameters.

  • The following figure types are supported:
    • blicense_title: business license title

    • national_emblem: national emblem

    • face: face

    • finger_print: fingerprint

    • signature: signature area

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when figure detection is required.

false

OutputQrcode

boolean

No

  • Specifies whether to enable the QR code detection feature. If enabled, the QrCodeInfo field is returned. For the metric description, see the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when QR code detection is required.

false

OutputBarCode

boolean

No

  • Specifies whether to enable the barcode detection feature. If enabled, the BarCodeInfo field is returned. For the metric description, see the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when barcode detection is required.

false

OutputStamp

boolean

No

  • Specifies whether to enable the seal detection feature. If enabled, the StampInfo field is returned. For the metric description, see the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when seal detection is required.

false

OutputCoordinate

string

No

  • The coordinate format to return (points or rectangle).

  • points: four-point coordinates. rectangle: rotated rectangle.

  • By default, you do not need to specify this parameter, and text coordinates are not returned.

""

OutputOricoord

boolean

No

  • Specifies whether to return the coordinates based on the original image. The system automatically processes images (such as auto-rotation and image correction). You can specify whether the returned coordinates are based on the original image or the processed image.

  • true: Return original image coordinates. false: Return processed image coordinates.

  • Default value: The default value varies by image type (Type). For more information, see Supplementary description of request parameters.

  • Note: This parameter takes effect only when OutputCoordinate is not empty.

false

OutputKVExcel

boolean

No

  • Specifies whether to convert the recognized structured information into an Excel file link. Default value: not required.

  • true: Enable. false: Disable.

  • The file link is valid for one hour.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when needed.

false

PageNo

integer

No

When the image type is mixed invoice, VAT invoice, fixed-amount invoice, air itinerary, train ticket, VAT roll invoice, or general machine-printed invoice (Type=MixedInvoice/Invoice/QuotaInvoice/AirItinerary/TrainTicket/RollTicket/CommonPrintedInvoice), you can use this parameter to set optional features.

  • Specifies the page number of the PDF or OFD file to recognize. For example, if PageNo=6, the sixth page of the PDF or OFD file is recognized.

  • If this parameter is not specified or the value exceeds the total number of pages in the PDF or OFD file, the first page is recognized.

  • Default value: the first page.

1

AdvancedConfig

object

No

  • When the image type is general text recognition (high-precision) (Type=Advanced), you can use this parameter to set optional features.

OutputRow

boolean

No

  • Specifies whether to enable the row-based output feature. If enabled, the RowInfo field is returned. For the metric description, see the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

false

OutputParagraph

boolean

No

  • Specifies whether to enable the paragraph segmentation feature. If this feature is enabled, the ParagraphInfo field is returned. For more information, see the metric description of the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

false

OutputTable

boolean

No

  • Specifies whether to output table recognition results, including cell information. If this feature is enabled, the TableInfo field is returned. For more information, see the metric description of the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when you need to recognize tables.

false

OutputCharInfo

boolean

No

  • Specifies whether to output single-character recognition results. If this feature is enabled, the CharInfos field is returned in the BlockInfo field. For more information, see the metric description of the response parameters.

  • true: Enable. false: Disable.

  • Default value: false.

false

IsLineLessTable

boolean

No

  • Specifies whether the table is borderless or has only horizontal lines without vertical lines.

  • true: Borderless table. false: Bordered table.

  • Default value: false.

  • Note: This parameter takes effect only when OutputTable=true.

false

IsHandWritingTable

boolean

No

  • Specifies whether the table is handwritten.

  • true: The table is handwritten. false: The table is not handwritten.

  • Default value: false.

  • Note: This parameter takes effect only when OutputTable=true.

false

OutputTableExcel

boolean

No

  • Specifies whether to export the recognized table results as an Excel file and return the result as a file URL.

  • true: Enable. false: Disable.

  • Default value: false.

  • The file URL is valid for one hour.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when needed.

false

OutputTableHtml

boolean

No

  • Specifies whether to export the recognized table results in HTML format and return the result as a file URL.

  • true: Enable. false: Disable.

  • Default value: false.

  • The file URL is valid for one hour.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when needed.

false

IdCardConfig

object

No

  • When the image type is ID card (Type=IdCard), you can use this field to configure optional features.

OutputIdCardQuality

boolean

No

  • Specifies whether to enable the ID card quality detection feature.

  • The ID card quality detection feature includes: whether the image is a recaptured photo, whether it is a photocopy, a completeness score, and an overall quality score.

  • true: Enable. false: Disable.

  • Default value: false.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when you need the ID card quality detection feature.

false

Llm_rec

boolean

No

InternationalIdCardConfig

object

No

  • When the image type is international ID card (Type=InternationalIdCard), you can use this field to configure optional features.

Country

string

No

  • The country name.

  • Supported countries: India, Vietnam, Korea, Bangladesh.

  • By default, you do not need to specify this parameter. The algorithm automatically determines the country.

  • Note: If you specify the country name, the response time of the operation is shorter.

Valid values:

  • Bangladesh :

    Bangladesh.

  • Vietnam :

    Vietnam.

  • India :

    India.

  • Korea :

    Korea.

India

InternationalBusinessLicenseConfig

object

No

  • When the image type is international business license (Type=InternationalBusinessLicense), you can use this field to configure optional features.

Country

string

No

  • The country name.

  • Supported countries: India, Korea.

  • By default, you do not need to specify this parameter. The algorithm automatically determines the country.

  • Note: If you specify the country name, the response time of the operation is shorter.

Valid values:

  • India :

    India

  • Korea :

    Korea

India

MultiLanConfig

object

No

  • When the image type is general multi-language text (Type=MultiLang), you can use this field to configure optional features.

Languages

string

No

  • The list of supported languages.

  • chn: Chinese, eng: English, ja: Japanese, lading: Latin, kor: Korean, sx: Handwriting, tai: Thai, rus: Russian, mys: Malay, idn: Indonesian, viet: Vietnamese, ukr: Ukrainian.

  • Note: You can specify multiple language parameters at the same time, separated by commas. Example: Languages="eng,chn,lading". However, if you are certain about the language type of the image, specify only one language parameter for better recognition results.

eng,chn

TableConfig

object

No

  • When the image type is table (Type=Table), you can use this field to configure optional features.

IsHandWritingTable

boolean

No

  • Specifies whether the table is handwritten.

  • true: The table is handwritten. false: The table is not handwritten.

  • Default value: false.

false

IsLineLessTable

boolean

No

  • Specifies whether the table is borderless or has only horizontal lines without vertical lines.

  • true: Borderless table. false: Bordered table.

  • Default value: false.

false

OutputTableExcel

boolean

No

  • Specifies whether to export the recognized table results as an Excel file and return the result as a file URL.

  • true: Enable. false: Disable.

  • Default value: false.

  • The file URL is valid for one hour.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when needed.

false

OutputTableHtml

boolean

No

  • Specifies whether to export the recognized table results in HTML format and return the result as a file URL.

  • true: Enable. false: Disable.

  • Default value: false.

  • The file URL is valid for one hour.

  • Note: Enabling this parameter increases the response time of the operation. Enable this parameter only when needed.

false

  • The request parameters of this operation are divided into three levels. Level-1 parameters are required basic parameters such as the image URL and image type. Level-2 parameters control the recognition output, such as whether to return coordinates. Level-3 parameters are associated with specific image types and control whether to output specific information, such as whether to output the quality detection score of an ID card. Only Type is a required parameter. Set the other parameters as needed.

Supplementary description of request parameters supported by image type (Type)

TypeType descriptionSupported parameters
AdvancedAdvanced general text recognition
  • OutputFigure (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • AdvancedConfig (parameter specific to Advanced general text recognition, default: empty)

GeneralBasic general text recognition
  • OutputStamp (default: false)

CommerceE-commerce image text
  • OutputStamp (default: false)

HandWritingHandwritten text
  • OutputFigure (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

MultiLangMulti-language text
  • OutputFigure (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • MultiLanConfig (parameter specific to multi-language general type, default: empty)

TableTable
  • OutputFigure (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • TableConfig (parameter specific to Table type, default: empty)

IdCardID card
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: true)

  • IdCardConfig (parameter specific to ID card, default: empty)

BankCardBank card
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

InternationalPassportInternational passport
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: true)

ChinesePassportChinese passport
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

SocialSecurityCardSocial security card
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

PermitToHK_MO_TWTravel permit to Hong Kong, Macao, and Taiwan
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

PermitToMainlandTravel permit to the Chinese mainland
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

HouseholdHeadHousehold register front page
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

HouseholdResidentHousehold register resident page
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

EstateCertificationReal estate ownership certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

BirthCertificationBirth certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

HKIdCardHong Kong ID card
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: true)

InternationalIdCardInternational ID card
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • InternationalIdCardConfig (parameter specific to International ID card, default: empty)

StampSeal
  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

MixedInvoiceMixed invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

InvoiceVAT invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

CarInvoiceMotor vehicle sales invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

QuotaInvoiceFixed-amount invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

AirItineraryAir itinerary
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

TrainTicketTrain ticket
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

TollInvoiceToll invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

RollTicketVAT roll invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

BankAcceptanceBank acceptance bill
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

BusShipTicketBus and ship ticket
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

NonTaxInvoiceNon-tax revenue invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

CommonPrintedInvoiceGeneral machine-printed invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • PageNo (default: 1)

  • OutputKVExcel (default: false)

HotelConsumeHotel consumption record
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

PaymentRecordPayment details page
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

PurchaseRecordE-commerce order page
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

RideHailingItineraryRide-hailing itinerary
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

ShoppingReceiptShopping receipt
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

TaxClearanceCertificateTax clearance certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

UsedCarInvoiceUsed car sales invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

VehicleLicenseVehicle license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

DrivingLicenseDriving license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

VehicleRegistrationMotor vehicle registration certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

VehicleCertificationVehicle certificate of conformity
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

LicensePlateNumberLicense plate
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

CarVinCodeVehicle VIN code
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

BusinessLicenseBusiness license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

InternationalBusinessLicenseInternational business license
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

  • OutputKVExcel (default: false)

  • InternationalBusinessLicenseConfig (parameter specific to International business license, default: empty)

MedicalDeviceManageLicenseMedical device business license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

MedicalDeviceProduceLicenseMedical device production license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

CosmeticProduceLicenseCosmetic production license
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

QrCodeQR code
BarCodeBarcode
TaxiInvoiceTaxi invoice
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

TrademarkCertificateTrademark registration certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

FoodProduceLicenseFood production license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

FoodManagementLicenseFood business license
  • OutputFigure (default: false)

  • OutputQrCode (default: true)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

ClassIIMedicalDeviceManageLicenseClass II medical device business filing certificate
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

WayBillElectronic waybill
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

BankAccountPermitBank account opening permit
  • OutputFigure (default: false)

  • OutputQrCode (default: false)

  • OutputBarCode (default: false)

  • OutputStamp (default: false)

  • OutputCoordinate (default: empty)

  • OutputOricoord (default: false)

  • OutputKVExcel (default: false)

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The unique request ID.

E2A98925-DC2C-18FB-995F-BAF507XXXXXX

Data

object

The recognition result.

Height

integer

The height of the original image.

2000

Width

integer

The width of the original image.

1000

Content

string

The aggregated text content contained in the image.

"Contract No...."

SubImageCount

integer

The number of sub-images contained in the image.

2

SubImages

array<object>

The sub-image information contained in the image.

array<object>

SubImageId

integer

The sub-image ID. Numbering starts from 0.

0

Type

string

The sub-image type, such as ID card front or VAT invoice.

ID card front

Angle

integer

The clockwise rotation angle of the sub-image. Valid values: 0 to 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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the sub-image.

1000

Height

integer

The height of the sub-image.

2000

KvInfo

object

  • The structured information of the sub-image.

  • Structured information is returned for image types such as personal ID cards and receipts. For example, for an ID card image, this field contains information such as name and gender.

KvCount

integer

The number of key-value pairs in the structured information of the sub-image.

6

Data

any

  • The text content of the structured information. This is a dictionary type where the key is the field name and the value is the recognition result of the field.

  • Different image types (Type) have different structured fields. For details about the structured fields returned for each Type, see Supplementary description of response elements.

{ "address": "XX Province XX City XX Street No. XX", "ethnicity": "Han", "sex": "Male", "name": "Wang XX", "idNumber": "XXX", "birthDate": "January 1, 2000" }

KvDetails

object

  • The structured information details. This is a dictionary type where the key is the field name and the value is the recognition result of the field, including the field value, coordinates, and confidence score.

object

  • The description of the structured information detail Value.

KeyName

string

The field name.

"address"

KeyConfidence

integer

The confidence score of the field. Valid values: 0 to 100.

100

Value

string

The text content of the value corresponding to the field (KeyName).

"XX Province XX City XX Street"

ValueConfidence

integer

The confidence score of the value corresponding to the field name. Valid values: 0 to 100.

98

ValuePoints

array<object>

The four-point coordinates of the value corresponding to the field name. 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 value corresponding to the field name. Returned when OutputCoordinate="rectangle".

CenterX

integer

The X-coordinate of the rectangle center point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

50

Height

integer

The height of the rectangle.

50

ValueAngle

integer

The clockwise rotation angle of the value corresponding to the field name. Valid values: 0 to 359.

0

BlockInfo

object

  • The text block information of the sub-image.

  • Returned when Type is Advanced, General, MultiLang, Commerce, or HandWriting.

BlockCount

integer

The number of text blocks in the sub-image.

12

BlockDetails

array<object>

The text block details of the sub-image.

array<object>

BlockId

integer

The text block ID. Numbering starts from 0.

0

BlockAngle

integer

The clockwise rotation angle of the text block. Valid values: 0 to 359.

0

BlockContent

string

The text content of the text block.

"Contract No...."

BlockConfidence

integer

The confidence score of the text block. Valid values: 0 to 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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

50

Height

integer

The height of the rectangle.

10

CharInfos

array<object>

The character-level information. Returned when AdvancedConfig.OutputCharInfo=true.

array<object>

CharId

integer

The character ID. Numbering starts from 0.

0

CharContent

string

The character content.

"C"

CharConfidence

integer

The confidence score of the character. Valid values: 0 to 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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

10

Height

integer

The height of the rectangle.

10

TableInfo

object

The table information. Returned when AdvancedConfig.OutputTable=true.

TableCount

integer

The number of tables.

2

TableDetails

array<object>

The table details.

array<object>

TableId

integer

The table ID. Numbering 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

The table header information.

Contents

array

The text content of the table header.

string

  • The content of a single header row.

"12.1 Parties to this contract"

BlockId

integer

The text block ID (numbering starts from 0).

0

Footer

object

The table footer information.

Contents

array

The text content of the table footer.

string

The content of a single footer line.

"Lender/Mortgagee (Seal/Electronic Signature):"

BlockId

integer

The text block ID. Numbering starts from 0.

0

CellDetails

array<object>

The cell information details.

array<object>

CellId

integer

The cell ID (numbering starts from 0).

0

CellContent

string

The text content of the cell.

"Borrower/Mortgagor:"

RowStart

integer

The starting row number of the cell. The position of the first cell is 0.

0

RowEnd

integer

The ending row number of the cell. The position of the first cell is 0. RowStart=0 and RowEnd=0 indicates that the cell occupies only the first row.

0

ColumnStart

integer

The starting column number of the cell. The position of the first cell is 0.

2

ColumnEnd

integer

The ending column number of the cell. The position of the first cell is 0. ColumnStart=0 and ColumnEnd=0 indicates that the cell occupies only the first column.

5

BlockList

array

The text block IDs contained in this cell.

integer

The ID of a single text block.

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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

20

Height

integer

The height of the rectangle.

20

CellAngle

integer

The clockwise rotation angle of the cell (range: 0 to 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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

100

Height

integer

The height of the rectangle.

100

TableExcel

string

  • The file link exported after converting the table recognition result to Excel.

  • Validity period: 1 hour.

https://example.xlsx

TableHtml

string

  • The file link exported after converting the table recognition result to HTML format.

  • Validity period: 1 hour.

https://example.html

RowInfo

object

The row information of the sub-image (returned when AdvancedConfig.OutputRow=true).

RowCount

integer

The number of rows contained in the sub-image.

9

RowDetails

array<object>

The row information details of the sub-image.

object

RowId

integer

The row ID (numbering starts from 0).

0

RowContent

string

The text content of the row.

"Contract No...."

BlockList

array

The list of text block IDs contained in this row.

integer

The ID of a single text block.

0

ParagraphInfo

object

The paragraph information of the sub-image (returned when AdvancedConfig.OutputParagraph=true).

ParagraphCount

integer

The number of paragraphs contained in the sub-image.

11

ParagraphDetails

array<object>

The paragraph information details of the sub-image.

object

ParagraphId

integer

The paragraph ID (numbering starts from 0).

0

ParagraphContent

string

The text content of the paragraph.

"Contract No...."

BlockList

array

The list of text block IDs contained in this paragraph.

integer

The ID of a single text block.

0

QrCodeInfo

object

The QR code information of the sub-image (returned when OutputQrcode=true).

QrCodeCount

integer

The number of QR codes in the sub-image.

1

QrCodeDetails

array<object>

The QR code information details of the sub-image.

array<object>

Data

any

The content of the QR code.

“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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

100

Height

integer

The height of the rectangle.

100

QrCodeAngle

integer

The rotation angle of the QR code (range: 0 to 359).

0

BarCodeInfo

object

The barcode information of the sub-image (returned when OutputBarCode=true).

BarCodeCount

integer

The number of barcodes in the sub-image.

2

BarCodeDetails

array<object>

The barcode information details.

array<object>

Type

string

The barcode type. The following types are supported:

  • Codabar

  • Code39

  • Code93

  • Code128

Code128

Data

any

The content of the barcode.

"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 point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

100

Height

integer

The height of the rectangle.

10

BarCodeAngle

integer

The clockwise rotation angle of the barcode (range: 0 to 359).

0

FigureInfo

object

The figure information contained in the sub-image (returned when OutputFigure=true). This is a dictionary type where the key is the figure type and the value is the information of figures of that type. The following figure types are supported:

  • blicense_title: business license title

  • national_emblem: national emblem

  • face: face

  • finger_print: fingerprint

  • signature: signature area

object

The figure details.

FigureCount

integer

The number of figures contained in the sub-image.

3

FigureDetails

array<object>

The details of the figure information.

array<object>

Type

string

The figure type. Valid values: blicense_title, national_emblem, face, finger_print, and signature.

face

Data

any

The figure data. This field is returned only when data is available.

“”

FigurePoints

array<object>

The four-point coordinates of the figure. This field is 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 figure. This field is returned when OutputCoordinate="rectangle".

CenterX

integer

The X-coordinate of the rectangle center point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

50

Height

integer

The height of the rectangle.

50

FigureAngle

integer

The clockwise rotation angle of the figure. Value range: 0 to 359.

0

StampInfo

object

The stamp information of the sub-image. This field is returned when OutputStamp=true.

StampCount

integer

The number of stamps in the sub-image.

2

StampDetails

array<object>

The details of the stamp information.

array<object>

Data

object

The recognition result of the sub-image stamp. The value is a dictionary type in which keys are field names and values are the recognition results of the corresponding fields.

CompanyId

string

The import and export enterprise code.

"XXX"

OrganizationName

string

The organization name.

"XXX Trading Co., Ltd."

AntiFakeCode

string

The anti-counterfeiting code.

"3205823XXXXXX"

OtherText

string

The other text.

"3205823XXXXXX"

TopText

string

The top arc text.

"XXX Trading Co., Ltd."

OrganizationNameEng

string

The English organization name.

""

TaxpayerId

string

The taxpayer identification number.

""

StampPoints

array<object>

The four-point coordinates of the stamp. This field is 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 stamp. This field is returned when OutputCoordinate="rectangle".

CenterX

integer

The X-coordinate of the rectangle center point.

100

CenterY

integer

The Y-coordinate of the rectangle center point.

200

Width

integer

The width of the rectangle.

50

Height

integer

The height of the rectangle.

50

StampAngle

integer

The clockwise rotation angle of the rectangle. Value range: 0 to 359.

0

QualityInfo

object

The quality detection information of the sub-image.

IsCopy

boolean

Indicates whether the image is a photocopy.

false

IsReshoot

boolean

Indicates whether the image is a recaptured photo. Only ID card images (Type=IdCard) are supported.

false

CompletenessScore

number

The completeness score. Only ID card images (Type=IdCard) are supported.

90.5

QualityScore

number

The overall quality score. Only ID card images (Type=IdCard) are supported.

80.5

TamperScore

number

The tampering score. Only ID card images (Type=IdCard) are supported.

10.5

XmlResult

string

The result in XML format.

""

AlgoVersion

string

The algorithm version number.

""

DebugInfo

any

The debug information. This field is returned only when the value is not empty.

""

AlgoServer

array

The list of algorithm server information. This field is returned only when the value is not empty.

string

The algorithm server information.

""

IsMixedMode

boolean

Indicates whether the image is of a mixed-paste type.

false

PageNo

integer

The page number of the PDF or OFD file. The value starts from 1.

1

KvExcelUrl

string

  • The URL of the exported file after the structured information of card, certificate, or invoice images is converted to Excel format.

  • The URL is valid for 1 hour.

https://example.xlsx

Code

string

The error code. This field is not returned when recognition succeeds.

400

Message

string

The error message. This field is not returned when recognition succeeds.

illegalImageUrl

KV information fields corresponding to each image type (Type). All KV fields are of the String type.

TypeType descriptionReturned KV information fields
IdCardID card
  • Front fields:
    • name: Name

    • sex: Gender

    • ethnicity: Ethnicity

    • birthDate: Date of birth

    • address: Address

    • idNumber: ID card number

  • Back fields:
    • issueAuthority: Issuing authority

    • validPeriod: Validity period

BankCardBank card
  • cardType: Card type

  • bankName: Bank name

  • cardNumber: Bank card number

  • validToDate: Expiration date

InternationalPassportInternational passport
  • passportType: Document type

  • surname: Surname

  • givenName: Given name

  • passportNumber: Passport number

  • nationality: Country code

  • nameEn: English name

  • name: Non-English name

  • sex: Gender

  • birthPlaceEn: Place of birth

  • birthPlace: Non-English place of birth

  • country: Nationality

  • validToDate: Valid until

  • birthDate: Date of birth

  • birthDateYmd: Date of birth (year-month-day)

  • issueDateYmd: Date of issue

  • issuePlaceEn: Place of issue

  • issuePlace: Non-English place of issue

  • issueAuthorityEn: Issuing authority

  • issueAuthority: Non-English issuing authority

  • idNumber: ID number

  • mrzLine1: Machine-readable zone line 1

  • mrzLine2: Machine-readable zone line 2

ChinesePassportChinese passport
  • passportType: Document type

  • countryCode: Country code

  • passportNumber: Passport number

  • nameEn: English name

  • name: Chinese name

  • sex: Gender

  • birthPlace: Place of birth

  • nationality: Nationality

  • issuePlace: Place of issue

  • issueAuthority: Issuing authority

  • mrzLine1: Machine-readable zone line 1

  • mrzLine2: Machine-readable zone line 2

  • validToDate: Valid until

  • birthDate: Date of birth

  • issueDate: Date of issue

SocialSecurityCardSocial security card
  • bankAccount: Bank account number

  • cardNumber: Social security card number

  • idNumber: Social security number

  • issueDate: Date of issuance

  • name: Name

  • title: Title

  • validPeriod: Validity period

PermitToHK_MO_TWTravel permit to Hong Kong, Macao, and Taiwan
  • permitType: Document type

  • nameCn: Chinese name

  • nameEn: English name

  • birthDate: Date of birth

  • sex: Gender

  • validPeriod: Validity period

  • issueAuthority: Issuing authority

  • issuePlace: Place of issue

  • permitNumber: Document number

  • mrzCode: Machine-readable zone code

PermitToMainlandTravel permit to Chinese mainland
  • birthDate: Date of birth

  • issueAuthority: Issuing authority

  • issueCount: Number of issuances

  • issuePlace: Place of issue

  • nameCn: Chinese name

  • nameEn: English name

  • permitNumber: Document number

  • permitType: Document type

  • sex: Gender

  • validPeriod: Validity period

HouseholdHeadHousehold register header page
  • Registrar: Registrar seal

  • address: Address

  • householdNumber: Household number

  • householdType: Household type

  • householderCommunity: Householder community

  • householderName: Householder name

  • issueDate: Date of issue

  • sectionNo: Section number

HouseholdResidentHousehold register resident page
  • birthDate: Date of birth

  • birthPlace: Place of birth

  • bloodGroup: Blood type

  • educationalDegree: Education level

  • employer: Employer

  • ethnicity: Ethnicity

  • formerName: Former name

  • householdNumber: Household number

  • idCardNumber: ID card number

  • immigratedToCityInfo: When and where immigrated to this city

  • immigratedToResidenceInfo: When and where immigrated to this address

  • maritalStatus: Marital status

  • militaryServiceStatus: Military service status

  • name: Name

  • nativePlace: Native place

  • occupation: Occupation

  • otherResidence: Other address in this city

  • registrar: Registrar seal

  • registrationDate: Registration date

  • relation: Relationship with householder

  • religious: Religion

  • sex: Gender

  • stature: Height

EstateCertificationReal estate ownership certificate
  • area: Area

  • certificateNumber: Certificate number

  • mutualOwnershipState: Co-ownership status

  • obligee: Right holder

  • location: Location

  • unitNumber: Real estate unit number

  • rightType: Right type

  • rightProperty: Right nature

  • usage: Usage

  • serviceLife: Service life

  • otherState: Other right status

  • buildingArea: Building area

BirthCertificationBirth certificate
  • neonatalName: Newborn name

  • sex: Gender

  • birthTime: Time of birth

  • gestationalAge: Gestational age at birth

  • birthWeight: Birth weight

  • birthLength: Birth length

  • birthPlace: Place of birth

  • medicalInstitutions: Medical institution name

  • motherName: Mother's name

  • motherAge: Mother's age

  • motherNationality: Mother's nationality

  • motherEthnicity: Mother's ethnicity

  • motherAddress: Mother's address

  • motherIdCardNumber: Mother's valid ID number

  • fatherName: Father's name

  • fatherAge: Father's age

  • fatherNationality: Father's nationality

  • fatherEthnicity: Father's ethnicity

  • fatherAddress: Father's address

  • fatherIdCardNumber: Father's valid ID number

  • issueAuthority: Issuing authority

  • issueDate: Date of issue

  • certificateNumber: Certificate number

HKIdCardHong Kong identity card
  • birthDate: Date of birth

  • firstIssuedDate: First issue date

  • idNumber: ID card number

  • issuedCode: Issue code

  • issuedDate: Issue date

  • nameCn: Chinese name

  • nameCode: Name code

  • nameEn: English name

  • sex: Gender

InternationalIdCardInternational identity card
  • India identity card front fields:
    • name: Local name

    • nameEn: English name

    • birthDate: Date of birth

    • sex: Gender

    • cardNumber: Document number

    • virtualNumber: Virtual number

  • India identity card back fields:
    • address: Local address

    • addressEn: English address

    • cardNumber: Document number

    • virtualNumber: Virtual number

  • India taxpayer document fields:
    • birthDate: Date of birth

    • fatherName: Father's name

    • name: Name

    • taxId: Tax ID

  • Vietnam identity card front fields:
    • birthDate: Date of birth

    • validToDate: Valid until

    • residence: Place of residence

    • cardType: Document type

    • placeOfAncestry: Place of ancestry

    • cardNumber: Document number

    • name: Name

    • sex: Gender

    • nationality: Nationality

  • Vietnam identity card back fields:
    • issuer: Issuer

    • mrzLine1: Machine-readable zone line 1

    • mrzLine2: Machine-readable zone line 2

    • mrzLine3: Machine-readable zone line 3

    • personalCharacteristics: Personal identification characteristics

    • issueDate: Date of issue

  • South Korea identity card fields:
    • name: Local name

    • nameChn: Chinese name

    • cardNumber: Document number

    • address: Address

    • issueDate: Date of issue

    • issuer: Issuer

  • Bangladesh identity card fields:
    • name: Local name

    • nameEn: English name

    • fatherName: Father's name

    • motherName: Mother's name

    • birthDate: Date of birth

    • cardNumber: ID card number

StampSeal
  • companyId: Import/export enterprise code

  • organizationName: Organization name

  • antiFakeCode: Anti-counterfeit code

  • otherText: Other text

  • topText: Top arc text

  • organizationNameEng: English organization name

  • taxpayerId: Taxpayer identification number

InvoiceVAT invoice
  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • invoiceDate: Invoice date

  • machineCode: Machine code

  • checkCode: Check code

  • purchaserName: Purchaser name

  • passwordArea: Password area

  • invoiceAmountPreTax: Amount excluding tax

  • invoiceTax: Tax amount

  • totalAmountInWords: Total amount in words

  • totalAmount: Total amount

  • sellerName: Seller name

  • sellerTaxNumber: Seller tax number

  • sellerContactInfo: Seller address and phone number

  • sellerBankAccountInfo: Seller bank and account number

  • drawer: Invoice issuer

  • title: Title

  • invoiceType: Invoice type (electronic general invoice, electronic special invoice, special invoice, general invoice, universal invoice)

  • formType: Form copy

  • printedInvoiceCode: Machine-printed invoice code

  • printedInvoiceNumber: Machine-printed invoice number

  • purchaserBankAccountInfo: Purchaser bank and account number

  • purchaserContactInfo: Purchaser address and phone number

  • purchaserTaxNumber: Purchaser tax number

  • recipient: Payee

  • remarks: Remarks

  • reviewer: Reviewer

  • specialTag: Special tag information

  • invoiceDetails: Invoice line items

CarInvoiceMotor vehicle sales invoice
  • taxCode: Tax control code

  • invoiceDate: Invoice date

  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • machineCode: Machine number

  • purchaserName: Purchaser name

  • purchaseCode: Purchaser ID number/organization code

  • vehicleType: Vehicle type

  • brandMode: Brand and model

  • origin: Place of origin

  • certificateNumber: Certificate number

  • importCertificateNumber: Import certificate number

  • commodityInspectionNumber: Commodity inspection number

  • engineNumber: Engine number

  • vinCode: Vehicle identification number/chassis number

  • invoiceAmountCn: Total amount including tax (in words)

  • invoiceAmount: Total amount including tax (in figures)

  • sellerName: Seller name

  • sellerContact: Seller phone number

  • sellerTaxNumber: Seller taxpayer identification number

  • sellerBankAccount: Seller account number

  • sellerAddress: Seller address

  • sellerDepositaryBank: Seller bank

  • taxRate: VAT rate or levy rate

  • tax: VAT amount

  • taxAuthoritiesInfo: Tax authority and code

  • taxAuthoritiesName: Tax authority

  • taxAuthoritiesCode: Tax authority code

  • preTaxAmount: Amount excluding tax

  • passengerLimitNumber: Passenger capacity

  • issuer: Invoice issuer

  • tonnage: Tonnage

  • purchaserTaxNumber: Purchaser taxpayer identification number

  • taxPaymentNumber: Tax payment certificate number

QuotaInvoiceFixed-amount invoice
  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • AmountInWords: Amount in words

  • Amount: Amount in figures

  • title: Invoice title

  • formType: Form copy

AirItineraryAir itinerary
  • agentCode: Sales agent code

  • caacDevelopmentFund: Civil aviation development fund

  • endorsement: Endorsement

  • fare: Fare

  • flights: Flight details

  • fuelSurcharge: Fuel surcharge

  • idCardNumber: Valid ID number

  • insurance: Insurance fee

  • internationalFlightSign: Domestic/international label

  • issueCompany: Issuing company

  • issueDate: Issue date

  • otherTaxes: Other taxes

  • passengerName: Passenger name

  • pnrCode: PNR code

  • promptMessage: Prompt message

  • serialNumber: Print serial number

  • ticketNumber: E-ticket number

  • totalAmount: Total amount

  • validationCode: Validation code

TrainTicketTrain ticket
  • departureStation: Departure station

  • arrivalStation: Arrival station

  • trainNumber: Train number

  • departureTime: Departure time

  • seatNumber: Seat number

  • fare: Fare

  • ticketGate: Ticket gate

  • seatType: Seat type

  • passengerInfo: Passenger information

  • passengerName: Passenger name

  • ticketNumber: Ticket number

  • ticketCode: Ticket code

  • saleInfo: Ticket office information

TollInvoiceToll invoice
  • title: Title

  • formType: Form copy

  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • date: Date

  • time: Time

  • vehicleType: Vehicle type

  • entranceName: Entrance

  • exitName: Exit

  • totalAmount: Total amount

  • ftype: Whether it is a photocopy (1: yes, 0: no)

RollTicketVAT roll invoice
  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • invoiceDate: Invoice date

  • checkCode: Check code

  • sellerName: Seller name

  • sellerTaxNumber: Seller tax number

  • purchaserName: Purchaser name

  • purchaserTaxCode: Purchaser tax number

  • title: Title

  • IGNORE: Machine-printed number

  • machineCode: Machine number

  • cashier: Cashier

  • totalAmountInWords: Total amount (in words)

  • totalAmount: Total amount (in figures)

  • invoiceDetails: Invoice line items

  • itemName: Item

  • quantity: Quantity

  • unitPrice: Unit price

  • amount: Amount

BankAcceptanceBank acceptance bill
  • issueDate: Date of issue

  • validToDate: Maturity date

  • draftStatus: Bill status

  • draftNumber: Bill number

  • issuerName: Drawer name

  • issuerAccountNumber: Drawer account number

  • issuerAccountBank: Drawer bank

  • payeeName: Payee name

  • payeeAccountNumber: Payee account number

  • payeeAccountBank: Payee bank

  • totalAmountInWords: Bill amount in words

  • totalAmount: Bill amount in figures

  • acceptorName: Acceptor name

  • acceptorAccountNumber: Acceptor account number

  • acceptorBankNumber: Acceptor bank number

  • acceptorAccountBank: Acceptor bank name

  • agreementNumber: Contract number

  • assignability: Transferability

  • acceptanceDate: Acceptance date

BusShipTicketBus/ship ticket
  • title: Title

  • formType: Form copy

  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • date: Date

  • time: Time

  • departureStation: Departure station

  • arrivalStation: Arrival station

  • totalAmount: Total amount

  • passengerName: Passenger name

  • idcardNo: ID card number

NonTaxInvoiceNon-tax revenue invoice
  • additionalInfo: Additional information

  • invoiceCode: Invoice code

  • invoiceDate: Invoice date

  • invoiceDetails: Item details

  • invoiceNumber: Invoice number

  • payeeName: Payee

  • payerCreditCode: Payer unified social credit code

  • payerName: Payer

  • recipient: Payee

  • reviewer: Reviewer

  • title: Title

  • totalAmount: Total amount (in figures)

  • totalAmountInWords: Total amount (in words)

  • validationCode: Validation code

CommonPrintedInvoiceGeneral machine-printed invoice
  • title: Title

  • formType: Form copy

  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • printedInvoiceCode: Machine-printed invoice code

  • printedInvoiceNumber: Machine-printed invoice number

  • invoiceDate: Invoice date

  • totalAmount: Total amount

  • sellerName: Seller name

  • sellerTaxNumber: Seller taxpayer identification number

  • purchaserName: Purchaser name

  • purchaserTaxNumber: Purchaser taxpayer identification number

  • drawer: Invoice issuer

  • recipient: Payee

  • remarks: Remarks

  • invoiceDetails: Invoice line items

  • itemName: Item name

  • unit: Unit

  • quantity: Quantity

  • unitPrice: Unit price

  • amount: Total value

  • ftype: Whether it is a photocopy (1: yes, 0: no)

HotelConsumeHotel transaction record
  • fax: Fax

  • phone: Phone

  • postCode: Postal code

  • roomNo: Room number

  • checkInDate: Check-in date

  • departureDate: Check-out date

  • memberNumber: Membership number

  • totalConsumption: Total consumption

  • name: Name

  • roomType: Room type

  • numberOfGuests: Number of guests

  • roomRate: Room rate

  • address: Address

  • consumptionDetails: Consumption details

  • Fields in consumption details:
    • date: Date

    • item: Item

    • consumption: Consumption

    • payment: Payment

PaymentRecordPayment details page
  • description: Product description

  • orderNumber: Order number

  • paymentMethod: Payment method

  • paymentTime: Payment time

  • recipientName: Payee name

  • totalAmount: Total amount

PurchaseRecordE-commerce order page
  • orderNumber: Order number

  • transactionTime: Transaction time

  • deliveryInfo: Delivery information

  • totalAmount: Transaction amount

  • shopName: Shop name

  • ftype: Whether it is a photocopy (1: yes, 0: no)

  • shoppingDetails: Product details

  • Product details fields:
    • name: Product name

    • specification: Product specification

    • price: Unit price

    • quantity: Quantity

RideHailingItineraryRide-hailing itinerary
  • serviceProvider: Service provider

  • applicationDate: Application date

  • startTime: Trip start time

  • endTime: Trip end time

  • phoneNumber: Passenger phone number

  • totalAmount: Total amount

  • rideDetails: Trip details

  • Number: Serial number

  • carType: Vehicle type

  • pickUpTime: Pick-up time

  • city: City

  • startPlace: Starting point

  • endPlace: Destination

  • mileage: Mileage

  • amount: Amount

  • remarks: Remarks

ShoppingReceiptShopping receipt
  • shopName: Issuer name

  • receiptDate: Receipt date

  • receiptTime: Receipt time

  • contactNumber: Contact number

  • shopAddress: Address

  • totalAmount: Total (paid) amount

  • receiptDetails: Product details

TaxClearanceCertificateTax clearance certificate
  • certificateNumber: Certificate number

  • drawer: Issuer

  • formType: Form copy

  • issueDate: Issue date

  • name: Taxpayer name

  • remarks: Remarks

  • taxAuthorityName: Tax authority

  • taxClearanceDetails: Tax clearance details

  • taxNumbe: Taxpayer identification number

  • totalAmount: Total amount (in figures)

  • totalAmountInWords: Total amount (in words)

UsedCarInvoiceUsed car sales invoice
  • title: Title

  • formType: Form copy

  • invoiceDate: Invoice date

  • invoiceCode: Invoice code

  • invoiceNumber: Invoice number

  • printedInvoiceCode: Machine-printed code

  • printedInvoiceNumber: Machine-printed number

  • taxCode: Tax control code

  • purchaserName: Buyer name

  • purchaserCode: Buyer ID number/organization code

  • purchaserAddress: Buyer address

  • purchaserPhoneNumber: Buyer phone number

  • sellerName: Seller name

  • sellerCode: Seller ID number/organization code

  • sellerAddress: Seller address

  • sellerPhoneNumber: Seller phone number

  • licensePlateNumber: License plate number

  • certificateNumber: Registration certificate number

  • vehicleType: Vehicle type

  • vinCode: Chassis number/vehicle identification number

  • brandMode: Brand and model

  • vehicleAdministrationName: Destination vehicle administration office

  • totalAmountInWords: Total vehicle price (in words)

  • totalAmount: Total vehicle price (in figures)

  • marketName: Used car market name

  • marketTaxNumber: Used car market taxpayer identification number

  • marketAddress: Used car market address

  • marketBankAccountInfo: Used car market bank and account number

  • marketPhoneNumber: Used car market phone number

  • remarks: Remarks

  • drawer: Invoice issuer

VehicleLicenseVehicle license
  • Vehicle license front fields:
    • address: Address

    • engineNumber: Engine number

    • issueDate: Issue date

    • model: Brand and model

    • owner: Owner

    • licensePlateNumber: License plate number

    • registrationDate: Registration date

    • useNature: Use nature

    • vehicleType: Vehicle type

    • vinCode: Vehicle identification number

    • issueAuthority: Issuing authority

  • Vehicle license back fields:
    • licensePlateNumber: License plate number

    • inspectionRecord: Inspection record

    • passengerCapacity: Approved passenger capacity

    • totalWeight: Gross weight

    • curbWeight: Curb weight

    • permittedWeight: Approved load capacity

    • overallDimension: Overall dimensions

    • tractionWeight: Approved towing weight

    • energySign: Energy label

    • recordNumber: File number

    • remarks: Remarks

DrivingLicenseDriving license
  • Driving license front fields:
    • licenseNumber: License number

    • name: Name

    • sex: Gender

    • nationality: Nationality

    • address: Address

    • birthDate: Date of birth

    • initialIssueDate: Initial issue date

    • approvedType: Approved vehicle type

    • issueAuthority: Issuing authority

    • validFromDate: Valid from

    • validPeriod: Validity period

  • Driving license back fields:
    • name: Name

    • recordNumber: File number

    • record: Record

    • licenseNumber: License number

VehicleRegistrationMotor vehicle registration certificate
  • acquisitionMethod: Vehicle acquisition method

  • axleNumber: Number of axles

  • barCode: Barcode number

  • cabPassengerCapacity: Cab passenger capacity

  • containerDimension: Cargo box interior dimensions

  • displacement: Displacement

  • engineNumber: Engine number

  • engineType: Engine model

  • frontWheelTrack: Front wheel track

  • fuelType: Fuel type

  • isDomestic: Domestic/imported

  • issueAuthority: Issuing authority

  • issueDate: Issue date

  • manufactureDate: Vehicle manufacture date

  • manufactureName: Manufacturer name

  • overallDimension: Overall dimensions

  • passengerCapacity: Cab passenger capacity

  • permittedWeight: Approved load capacity

  • power: Power

  • rearWheelTrack: Rear wheel track

  • registrationAuthority: Registration authority

  • registrationDate: Registration date

  • registrationNumber: Motor vehicle registration number

  • <li

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.