Get Read Result - Get Read Result

This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.

GET {Endpoint}/vision/v3.2-preview/read/analyzeResults/{operationId}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints.

operationId
path True

string

uuid

Id of read operation returned in the response of the 'Read' interface.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

ReadOperationResult

Returns the read operation status.

Other Status Codes

ComputerVisionError

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Get Read Result request

Sample request

GET {Endpoint}/vision/v3.2-preview/read/analyzeResults/e56ffa6e-1ee4-4042-bc07-993db706c95f

Sample response

{
  "status": "succeeded",
  "createdDateTime": "2019-10-03T14:32:04.236Z",
  "lastUpdatedDateTime": "2019-10-03T14:38:14.852Z",
  "analyzeResult": {
    "version": "v3.2",
    "readResults": [
      {
        "page": 1,
        "language": "en",
        "angle": 49.59,
        "width": 600,
        "height": 400,
        "unit": "pixel",
        "lines": [
          {
            "boundingBox": [
              202,
              618,
              2047,
              643,
              2046,
              840,
              200,
              813
            ],
            "appearance": {
              "style": {
                "name": "other",
                "confidence": 0.995
              }
            },
            "text": "Our greatest glory is not",
            "words": [
              {
                "boundingBox": [
                  204,
                  627,
                  481,
                  628,
                  481,
                  830,
                  204,
                  829
                ],
                "text": "Our",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  519,
                  628,
                  1057,
                  630,
                  1057,
                  832,
                  518,
                  830
                ],
                "text": "greatest",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1114,
                  630,
                  1549,
                  631,
                  1548,
                  833,
                  1114,
                  832
                ],
                "text": "glory",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1586,
                  631,
                  1785,
                  632,
                  1784,
                  834,
                  1586,
                  833
                ],
                "text": "is",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1822,
                  632,
                  2115,
                  633,
                  2115,
                  835,
                  1822,
                  834
                ],
                "text": "not",
                "confidence": 0.164
              }
            ]
          },
          {
            "boundingBox": [
              420,
              1273,
              2954,
              1250,
              2958,
              1488,
              422,
              1511
            ],
            "appearance": {
              "style": {
                "name": "handwriting",
                "confidence": 0.985
              }
            },
            "text": "but in rising every time we fall",
            "words": [
              {
                "boundingBox": [
                  423,
                  1269,
                  634,
                  1268,
                  635,
                  1507,
                  424,
                  1508
                ],
                "text": "but",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  667,
                  1268,
                  808,
                  1268,
                  809,
                  1506,
                  668,
                  1507
                ],
                "text": "in",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  874,
                  1267,
                  1289,
                  1265,
                  1290,
                  1504,
                  875,
                  1506
                ],
                "text": "rising",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1331,
                  1265,
                  1771,
                  1263,
                  1772,
                  1502,
                  1332,
                  1504
                ],
                "text": "every",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1812,
                  1263,
                  2178,
                  1261,
                  2179,
                  1500,
                  1813,
                  1502
                ],
                "text": "time",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  2219,
                  1261,
                  2510,
                  1260,
                  2511,
                  1498,
                  2220,
                  1500
                ],
                "text": "we",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  2551,
                  1260,
                  3016,
                  1258,
                  3017,
                  1496,
                  2552,
                  1498
                ],
                "text": "fall",
                "confidence": 0.164
              }
            ]
          },
          {
            "language": "es",
            "boundingBox": [
              1612,
              903,
              2744,
              935,
              2738,
              1139,
              1607,
              1107
            ],
            "appearance": {
              "style": {
                "name": "other",
                "confidence": 0.995
              }
            },
            "text": "Viva la vida",
            "words": [
              {
                "boundingBox": [
                  323,
                  454,
                  416,
                  449,
                  418,
                  494,
                  325,
                  501
                ],
                "text": "Viva",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  92,
                  550,
                  429,
                  541,
                  430,
                  591,
                  94,
                  600
                ],
                "text": "la",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  58,
                  466,
                  268,
                  458,
                  270,
                  505,
                  161,
                  512
                ],
                "text": "vida",
                "confidence": 0.164
              }
            ]
          }
        ]
      },
      {
        "page": 2,
        "language": "en",
        "angle": 1.32,
        "width": 600,
        "height": 400,
        "unit": "pixel",
        "lines": [
          {
            "boundingBox": [
              1612,
              903,
              2744,
              935,
              2738,
              1139,
              1607,
              1107
            ],
            "appearance": {
              "style": {
                "name": "handwriting",
                "confidence": 0.855
              }
            },
            "text": "in never failing ,",
            "words": [
              {
                "boundingBox": [
                  1611,
                  934,
                  1707,
                  933,
                  1708,
                  1147,
                  1613,
                  1147
                ],
                "text": "in",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  1753,
                  933,
                  2132,
                  930,
                  2133,
                  1144,
                  1754,
                  1146
                ],
                "text": "never",
                "confidence": 0.999
              },
              {
                "boundingBox": [
                  2162,
                  930,
                  2673,
                  927,
                  2674,
                  1140,
                  2164,
                  1144
                ],
                "text": "failing",
                "confidence": 0.164
              },
              {
                "boundingBox": [
                  2703,
                  926,
                  2788,
                  926,
                  2790,
                  1139,
                  2705,
                  1140
                ],
                "text": ",",
                "confidence": 0.164
              }
            ]
          }
        ]
      }
    ]
  }
}

Definitions

Name Description
analyzeResults

Analyze batch operation result.

Appearance

An object representing the appearance of the text line.

ComputerVisionError

Details about the API request error.

ComputerVisionErrorCodes

The error code.

Line

An object representing a recognized text line.

OperationStatusCodes

Status of the read operation.

ReadOperationResult

OCR result of the read operation.

ReadResult

Text extracted from a page in the input document.

Style

An object representing the style of the text line.

TextRecognitionResultDimensionUnit

The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF, the unit is 'inch'.

TextStyle

The text line style name, including handwriting and other.

Word

An object representing a recognized word.

analyzeResults

Analyze batch operation result.

Name Type Description
readResults

ReadResult[]

Text extracted from the input.

version

string

Version of schema used for this result.

Appearance

An object representing the appearance of the text line.

Name Type Description
style

Style

An object representing the style of the text line.

ComputerVisionError

Details about the API request error.

Name Type Description
code

ComputerVisionErrorCodes

The error code.

message

string

A message explaining the error reported by the service.

requestId

string

A unique request identifier.

ComputerVisionErrorCodes

The error code.

Name Type Description
BadArgument

string

CancelledRequest

string

DetectFaceError

string

FailedToProcess

string

InternalServerError

string

InvalidDetails

string

InvalidImageFormat

string

InvalidImageSize

string

InvalidImageUrl

string

InvalidModel

string

InvalidPageRange

string

InvalidThumbnailSize

string

NotSupportedFeature

string

NotSupportedImage

string

NotSupportedLanguage

string

NotSupportedVisualFeature

string

StorageException

string

Timeout

string

Unspecified

string

UnsupportedMediaType

string

Line

An object representing a recognized text line.

Name Type Description
appearance

Appearance

Appearance of the text line.

boundingBox

number[]

Bounding box of a recognized line.

language

string

The BCP-47 language code of the recognized text line. Only provided where the language of the line differs from the page's.

text

string

The text content of the line.

words

Word[]

List of words in the text line.

OperationStatusCodes

Status of the read operation.

Name Type Description
failed

string

notStarted

string

running

string

succeeded

string

ReadOperationResult

OCR result of the read operation.

Name Type Description
analyzeResult

analyzeResults

Analyze batch operation result.

createdDateTime

string

Get UTC date time the batch operation was submitted.

lastUpdatedDateTime

string

Get last updated UTC date time of this batch operation.

status

OperationStatusCodes

Status of the read operation.

ReadResult

Text extracted from a page in the input document.

Name Type Description
angle

number

The orientation of the image in degrees in the clockwise direction. Range between [-180, 180).

height

number

The height of the image in pixels or the PDF in inches.

language

string

The BCP-47 language code of the recognized text page.

lines

Line[]

A list of recognized text lines.

page

integer

The 1-based page number of the recognition result.

unit

TextRecognitionResultDimensionUnit

The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF, the unit is 'inch'.

width

number

The width of the image in pixels or the PDF in inches.

Style

An object representing the style of the text line.

Name Type Description
confidence

number

The confidence of text line style.

name

TextStyle

The text line style name, including handwriting and other.

TextRecognitionResultDimensionUnit

The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF, the unit is 'inch'.

Name Type Description
inch

string

pixel

string

TextStyle

The text line style name, including handwriting and other.

Name Type Description
handwriting

string

other

string

Word

An object representing a recognized word.

Name Type Description
boundingBox

number[]

Bounding box of a recognized word.

confidence

number

Qualitative confidence measure.

text

string

The text content of the word.