Querying the OCR Parsing Result
Function
Querying the OCR Parsing Result
URI
GET /v1/koosearch/doc-search/ocr-results
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_id |
Yes |
String |
Parsing task ID |
pages |
No |
String |
Page number set, which specifies the pages whose OCR results are to be queried. Multiple pages are separated by commas (,), for example, 1,2,3,4,5. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Parameter description: Token used for API authentication. For how to obtain the token, see section 3.2 "Authentication." Constraints: N/A. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of PageOcrResult objects |
OCR result response |
Parameter |
Type |
Description |
---|---|---|
page_num |
Integer |
Document page number |
ocr_result |
RawOcrResult object |
Character recognition results |
Parameter |
Type |
Description |
---|---|---|
table_result |
Table recognition results. |
|
layout_result |
Layout recognition result |
|
kv_result |
Key-value pair recognition result |
|
ocr_result |
Character recognition results |
Parameter |
Type |
Description |
---|---|---|
table_count |
Integer |
Number of tables. |
table_list |
Array of SmartDocumentRecognizerTableBlock objects |
OCR table data. |
Parameter |
Type |
Description |
---|---|---|
location |
Array<Array<Integer>> |
List of location information about a text block, including the 2D coordinates (x,y) of four vertexes in the text area, where the coordinate origin is the upper-left corner of the image, the X axis is horizontal, and the Y axis is vertical. |
words_block_count |
Integer |
Number of cells in a table |
words_block_list |
Array of SmartDocumentRecognizerTableWordsBlock objects |
List of cell recognition results |
Parameter |
Type |
Description |
---|---|---|
words |
String |
Character recognition results in a cell |
rows |
Array of integers |
Rows occupied by text. The values start from 0 and are displayed in a list. The data type is Integer. |
columns |
Array of integers |
Columns occupied by text. The values start from 0 and are displayed in a list. The data type is Integer. |
Parameter |
Type |
Description |
---|---|---|
layout_block_count |
Integer |
Number of document layout areas recognized by the model |
layout_block_list |
Array of SmartDocumentRecognizerLayoutBlock objects |
List of document layout area recognition results |
Parameter |
Type |
Description |
---|---|---|
location |
Array<Array<Integer>> |
List of location information about a text block, including the 2D coordinates (x,y) of four vertexes in the text area, where the coordinate origin is the upper-left corner of the image, the X axis is horizontal, and the Y axis is vertical. |
type |
String |
Document area type, including text and table |
text |
String |
Text in the document area. |
words_ids |
Array of integers |
Index list of character recognition results, indicating which text blocks in words_block_list of ocr_result are located within the document area. |
Parameter |
Type |
Description |
---|---|---|
kv_block_count |
Integer |
Number of key-value pairs recognized by the model |
kv_block_list |
Array of SmartDocumentRecognizerKVBlock objects |
List of key-value pair recognition results |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Key in the key-value pair |
value |
String |
Value in the key-value pair |
words_block_count |
Integer |
Number of text boxes contained in the key-value pair |
words_block_list |
Array of SmartDocumentRecognizerKVWordsBlock objects |
Key-value pair text box recognition result list |
Parameter |
Type |
Description |
---|---|---|
location |
Array<Array<Integer>> |
List of location information about a text block, including the 2D coordinates (x,y) of four vertexes in the text area, where the coordinate origin is the upper-left corner of the image, the X axis is horizontal, and the Y axis is vertical. |
type |
String |
Type |
words |
String |
Recognition result of a text block |
Parameter |
Type |
Description |
---|---|---|
direction |
Float |
Image direction. |
words_block_count |
Integer |
Number of text blocks that have been recognized |
words_block_list |
Array of SmartDocumentRecognizerWordsBlockList objects |
List of text blocks that have been recognized. The output sequence is from left to right and from top to bottom. |
Parameter |
Type |
Description |
---|---|---|
location |
Array<Array<Integer>> |
List of location information about a text block, including the 2D coordinates (x,y) of four vertexes in the text area, where the coordinate origin is the upper-left corner of the image, the X axis is horizontal, and the Y axis is vertical. |
confidence |
Float |
Confidence of a recognized text block |
words |
String |
Recognition result of a text block |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
|
error_msg |
String |
Error description |
Example Requests
None
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
OCR parsing result |
400 |
Invalid request parameters |
401 |
Authentication error |
500 |
Service content error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot