amazonaws.com – textract
Amazon Textract detects and analyzes text in documents and converts it into machine-readable text. This is the API reference documentation for Amazon Textract.
- Homepage
- https://api.apis.guru/v2/specs/amazonaws.com:textract/2018-06-27.json
- Provider
- amazonaws.com:textract / textract
- OpenAPI version
- 3.0.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/amazonaws.com/textract/2018-06-27/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/amazonaws.com/textract/2018-06-27/openapi.yaml
Tools (15)
Extracted live via the executor SDK.
-
xAmzTargetTextractAnalyzeDocument.analyzeDocumentAnalyzes an input document for relationships between detected items.
The types of information returned are as follows:
-
Form data (key-value pairs). The related information is returned in two Block [blocked] objects, each of type
KEY_VALUE_SET: a KEYBlockobject and a VALUEBlockobject. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. -
Table and table cell data. A TABLE
Blockobject contains information about a detected table. A CELLBlockobject is returned for each cell in a table. -
Lines and words of text. A LINE
Blockobject contains one or more WORDBlockobjects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value ofFeatureTypes). -
Signatures. A SIGNATURE
Blockobject contains the location information of a signature in a document. If used in conjunction with forms or tables, a signature can be given a Key-Value pairing or be detected in the cell of a table. -
Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object.
-
Query Result. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score.
Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT
Blockobject contains information about a selection element, including the selection status.You can choose which type of analysis to perform by specifying the
FeatureTypeslist.The output is returned in a list of
Blockobjects.AnalyzeDocumentis a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis [blocked].For more information, see .
-
-
xAmzTargetTextractAnalyzeExpense.analyzeExpenseAnalyzeExpensesynchronously analyzes an input document for financially related relationships between text.Information is returned as
ExpenseDocumentsand seperated as follows:-
LineItemGroups- A data set containingLineItemswhich store information about the lines of text, such as an item purchased and its price on a receipt. -
SummaryFields- Contains all other information a receipt, such as header information or the vendors name.
-
-
xAmzTargetTextractAnalyzeId.analyzeIdAnalyzes identity documents for relevant information. This information is extracted and returned as
IdentityDocumentFields, which records both the normalized field and value of the extracted text. Unlike other Amazon Textract operations,AnalyzeIDdoesn't return any Geometry data. -
xAmzTargetTextractDetectDocumentText.detectDocumentTextDetects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be in one of the following image formats: JPEG, PNG, PDF, or TIFF.
DetectDocumentTextreturns the detected text in an array of Block [blocked] objects.Each document page has as an associated
Blockof type PAGE. Each PAGEBlockobject is the parent of LINEBlockobjects that represent the lines of detected text on a page. A LINEBlockobject is a parent for each word that makes up the line. Words are represented byBlockobjects of type WORD.DetectDocumentTextis a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection [blocked].For more information, see .
-
xAmzTargetTextractGetDocumentAnalysis.getDocumentAnalysisGets the results for an Amazon Textract asynchronous operation that analyzes text in a document.
You start asynchronous text analysis by calling StartDocumentAnalysis [blocked], which returns a job identifier (
JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call toStartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic isSUCCEEDED. If so, callGetDocumentAnalysis, and pass the job identifier (JobId) from the initial call toStartDocumentAnalysis.GetDocumentAnalysisreturns an array of Block [blocked] objects. The following types of information are returned:-
Form data (key-value pairs). The related information is returned in two Block [blocked] objects, each of type
KEY_VALUE_SET: a KEYBlockobject and a VALUEBlockobject. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. -
Table and table cell data. A TABLE
Blockobject contains information about a detected table. A CELLBlockobject is returned for each cell in a table. -
Lines and words of text. A LINE
Blockobject contains one or more WORDBlockobjects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value of theStartDocumentAnalysisFeatureTypesinput parameter). -
Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object.
-
Query Results. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score.
While processing a document with queries, look out for
INVALID_REQUEST_PARAMETERSoutput. This indicates that either the per page query limit has been exceeded or that the operation is trying to query a page in the document which doesn’t exist.Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT
Blockobject contains information about a selection element, including the selection status.Use the
MaxResultsparameter to limit the number of blocks that are returned. If there are more results than specified inMaxResults, the value ofNextTokenin the operation response contains a pagination token for getting the next set of results. To get the next page of results, callGetDocumentAnalysis, and populate theNextTokenrequest parameter with the token value that's returned from the previous call toGetDocumentAnalysis.For more information, see .
-
-
xAmzTargetTextractGetDocumentTextDetection.getDocumentTextDetectionGets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.
You start asynchronous text detection by calling StartDocumentTextDetection [blocked], which returns a job identifier (
JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call toStartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic isSUCCEEDED. If so, callGetDocumentTextDetection, and pass the job identifier (JobId) from the initial call toStartDocumentTextDetection.GetDocumentTextDetectionreturns an array of Block [blocked] objects.Each document page has as an associated
Blockof type PAGE. Each PAGEBlockobject is the parent of LINEBlockobjects that represent the lines of detected text on a page. A LINEBlockobject is a parent for each word that makes up the line. Words are represented byBlockobjects of type WORD.Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in
MaxResults, the value ofNextTokenin the operation response contains a pagination token for getting the next set of results. To get the next page of results, callGetDocumentTextDetection, and populate theNextTokenrequest parameter with the token value that's returned from the previous call toGetDocumentTextDetection.For more information, see .
-
xAmzTargetTextractGetExpenseAnalysis.getExpenseAnalysisGets the results for an Amazon Textract asynchronous operation that analyzes invoices and receipts. Amazon Textract finds contact information, items purchased, and vendor name, from input invoices and receipts.
You start asynchronous invoice/receipt analysis by calling StartExpenseAnalysis [blocked], which returns a job identifier (
JobId). Upon completion of the invoice/receipt analysis, Amazon Textract publishes the completion status to the Amazon Simple Notification Service (Amazon SNS) topic. This topic must be registered in the initial call toStartExpenseAnalysis. To get the results of the invoice/receipt analysis operation, first ensure that the status value published to the Amazon SNS topic isSUCCEEDED. If so, callGetExpenseAnalysis, and pass the job identifier (JobId) from the initial call toStartExpenseAnalysis.Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in
MaxResults, the value ofNextTokenin the operation response contains a pagination token for getting the next set of results. To get the next page of results, callGetExpenseAnalysis, and populate theNextTokenrequest parameter with the token value that's returned from the previous call toGetExpenseAnalysis.For more information, see .
-
xAmzTargetTextractGetLendingAnalysis.getLendingAnalysisGets the results for an Amazon Textract asynchronous operation that analyzes text in a lending document.
You start asynchronous text analysis by calling
StartLendingAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call toStartLendingAnalysis.To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysis, and pass the job identifier (
JobId) from the initial call toStartLendingAnalysis. -
xAmzTargetTextractGetLendingAnalysisSummary.getLendingAnalysisSummaryGets summarized results for the
StartLendingAnalysisoperation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document.You start asynchronous text analysis by calling
StartLendingAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call toStartLendingAnalysis.To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call
GetLendingAnalysisSummary, and pass the job identifier (JobId) from the initial call toStartLendingAnalysis. -
xAmzTargetTextractStartDocumentAnalysis.startDocumentAnalysisStarts the asynchronous analysis of an input document for relationships between detected items such as key-value pairs, tables, and selection elements.
StartDocumentAnalysiscan analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation [blocked] to specify the bucket name and file name of the document.StartDocumentAnalysisreturns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify inNotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic isSUCCEEDED. If so, call GetDocumentAnalysis [blocked], and pass the job identifier (JobId) from the initial call toStartDocumentAnalysis.For more information, see .
-
xAmzTargetTextractStartDocumentTextDetection.startDocumentTextDetectionStarts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.
StartDocumentTextDetectioncan analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation [blocked] to specify the bucket name and file name of the document.StartTextDetectionreturns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify inNotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic isSUCCEEDED. If so, call GetDocumentTextDetection [blocked], and pass the job identifier (JobId) from the initial call toStartDocumentTextDetection.For more information, see .
-
xAmzTargetTextractStartExpenseAnalysis.startExpenseAnalysisStarts the asynchronous analysis of invoices or receipts for data like contact information, items purchased, and vendor names.
StartExpenseAnalysiscan analyze text in documents that are in JPEG, PNG, and PDF format. The documents must be stored in an Amazon S3 bucket. Use the DocumentLocation [blocked] parameter to specify the name of your S3 bucket and the name of the document in that bucket.StartExpenseAnalysisreturns a job identifier (JobId) that you will provide toGetExpenseAnalysisto retrieve the results of the operation. When the analysis of the input invoices/receipts is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you provide to theNotificationChannel. To obtain the results of the invoice and receipt analysis operation, ensure that the status value published to the Amazon SNS topic isSUCCEEDED. If so, call GetExpenseAnalysis [blocked], and pass the job identifier (JobId) that was returned by your call toStartExpenseAnalysis.For more information, see .
-
xAmzTargetTextractStartLendingAnalysis.startLendingAnalysisStarts the classification and analysis of an input document.
StartLendingAnalysisinitiates the classification and analysis of a packet of lending documents.StartLendingAnalysisoperates on a document file located in an Amazon S3 bucket.StartLendingAnalysiscan analyze text in documents that are in one of the following formats: JPEG, PNG, TIFF, PDF. UseDocumentLocationto specify the bucket name and the file name of the document.StartLendingAnalysisreturns a job identifier (JobId) that you use to get the results of the operation. When the text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify inNotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If the status is SUCCEEDED you can call eitherGetLendingAnalysisorGetLendingAnalysisSummaryand provide theJobIdto obtain the results of the analysis.If using
OutputConfigto specify an Amazon S3 bucket, the output will be contained within the specified prefix in a directory labeled with the job-id. In the directory there are 3 sub-directories:-
detailedResponse (contains the GetLendingAnalysis response)
-
summaryResponse (for the GetLendingAnalysisSummary response)
-
splitDocuments (documents split across logical boundaries)
-
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools