Vision OCR API, REST: TextRecognitionAsync.GetRecognition
To get recognition results.
HTTP request
GET https://ocr.api.cloud.yandex.net/ocr/v1/getRecognition
Query parameters
Field |
Description |
operationId |
string Required field. Operation ID of async recognition request. |
Response
HTTP Code: 200 - OK
{
"textAnnotation": {
"width": "string",
"height": "string",
"blocks": [
{
"boundingBox": {
"vertices": [
{
"x": "string",
"y": "string"
}
]
},
"lines": [
{
"boundingBox": {
"vertices": [
{
"x": "string",
"y": "string"
}
]
},
"text": "string",
"words": [
{
"boundingBox": {
"vertices": [
{
"x": "string",
"y": "string"
}
]
},
"text": "string",
"entityIndex": "string",
"textSegments": [
{
"startIndex": "string",
"length": "string"
}
]
}
],
"textSegments": [
{
"startIndex": "string",
"length": "string"
}
],
"orientation": "string"
}
],
"languages": [
{
"languageCode": "string"
}
],
"textSegments": [
{
"startIndex": "string",
"length": "string"
}
]
}
],
"entities": [
{
"name": "string",
"text": "string"
}
],
"tables": [
{
"boundingBox": {
"vertices": [
{
"x": "string",
"y": "string"
}
]
},
"rowCount": "string",
"columnCount": "string",
"cells": [
{
"boundingBox": {
"vertices": [
{
"x": "string",
"y": "string"
}
]
},
"rowIndex": "string",
"columnIndex": "string",
"columnSpan": "string",
"rowSpan": "string",
"text": "string",
"textSegments": [
{
"startIndex": "string",
"length": "string"
}
]
}
]
}
],
"fullText": "string",
"rotate": "string"
},
"page": "string"
}
Field |
Description |
textAnnotation |
Recognized text blocks in page or text from entities. |
page |
string (int64) Page number in PDF file. |
TextAnnotation
Field |
Description |
width |
string (int64) Page width in pixels. |
height |
string (int64) Page height in pixels. |
blocks[] |
Recognized text blocks in this page. |
entities[] |
Recognized entities. |
tables[] |
|
fullText |
string Full text recognized from image. |
rotate |
enum (Angle) Angle of image rotation.
|
Block
Field |
Description |
boundingBox |
Area on the page where the text block is located. |
lines[] |
Recognized lines in this block. |
languages[] |
A list of detected languages |
textSegments[] |
Block position from full_text string. |
Polygon
Field |
Description |
vertices[] |
The bounding polygon vertices. |
Vertex
Field |
Description |
x |
string (int64) X coordinate in pixels. |
y |
string (int64) Y coordinate in pixels. |
Line
Field |
Description |
boundingBox |
Area on the page where the line is located. |
text |
string Recognized text. |
words[] |
Recognized words. |
textSegments[] |
Line position from full_text string. |
orientation |
enum (Angle) Angle of line rotation.
|
Word
Field |
Description |
boundingBox |
Area on the page where the word is located. |
text |
string Recognized word value. |
entityIndex |
string (int64) ID of the recognized word in entities array. |
textSegments[] |
Word position from full_text string. |
TextSegments
Field |
Description |
startIndex |
string (int64) Start character position from full_text string. |
length |
string (int64) Text segment length. |
DetectedLanguage
Field |
Description |
languageCode |
string Detected language code. |
Entity
Field |
Description |
name |
string Entity name. |
text |
string Recognized entity text. |
Table
Field |
Description |
boundingBox |
Area on the page where the table is located. |
rowCount |
string (int64) Number of rows in table. |
columnCount |
string (int64) Number of columns in table. |
cells[] |
Table cells. |
TableCell
Field |
Description |
boundingBox |
Area on the page where the table cell is located. |
rowIndex |
string (int64) Row index. |
columnIndex |
string (int64) Column index. |
columnSpan |
string (int64) Column span. |
rowSpan |
string (int64) Row span. |
text |
string Text in cell. |
textSegments[] |
Table cell position from full_text string. |