Read - Read

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​

POST {Endpoint}/vision/v3.1/read/analyze
POST {Endpoint}/vision/v3.1/read/analyze?language={language}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints.

language
query

OcrDetectionLanguage

The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language.

Request Header

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

string

Request Body

Name Required Type Description
url True

string

Publicly reachable URL of an image.

Responses

Name Type Description
202 Accepted

The service has accepted the request and will start processing later.

Headers

Operation-Location: string

Other Status Codes

ComputerVisionError

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Analyze request

Sample Request

POST {Endpoint}/vision/v3.1/read/analyze?language=en


{
  "url": "{url}"
}

Sample Response

Definitions

Name Description
ComputerVisionError

Details about the API request error.

ComputerVisionErrorCodes

The error code.

ImageUrl
OcrDetectionLanguage

The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language.

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

InvalidThumbnailSize

string

NotSupportedFeature

string

NotSupportedImage

string

NotSupportedLanguage

string

NotSupportedVisualFeature

string

StorageException

string

Timeout

string

Unspecified

string

UnsupportedMediaType

string

ImageUrl

Name Type Description
url

string

Publicly reachable URL of an image.

OcrDetectionLanguage

The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language.

Name Type Description
de

string

en

string

es

string

fr

string

it

string

nl

string

pt

string