Amazon Textract

App · 22 actions

Read documents with Amazon Textract: pull the text out of scans, photos and PDFs, read forms, tables and signatures, ask a document questions in plain English, read invoices, receipts and US IDs, and sort loan packets, with results as plain text, fields and rows.

Actions

ActionWhat it does
Analyze documentRead a one-page form or document: its text, each form label with its value (as fields), tables as rows, answers to questions you ask in plain English, signatures and layout.
Analyze ID documentRead a US driver's license or passport: name, date of birth, document number, expiry, address and the rest, with each field's confidence.
Analyze invoice or receiptRead an invoice or receipt (one page): the vendor, number, date, tax and total, every other field at the top, and each line item with its quantity and price.
Analyze lending documentsSort a mortgage or loan packet into its documents (pay slips, bank statements, tax forms, IDs and more) and read each page's fields, waiting for Textract to finish.
Analyze multi-page documentRead the form fields, tables, answers to your questions, signatures and layout of a PDF or TIFF of any length, waiting for Textract to finish.
Analyze multi-page invoices and receiptsRead every invoice or receipt in a PDF or TIFF of any length: each one's vendor, totals and line items, waiting for Textract to finish.
Create adapterCreate an adapter: a way to tune Textract's answers to your kind of document.
Create adapter versionTrain a new version of an adapter from a labelled dataset in S3, such as the manifest the Textract console's labelling tool saves.
Delete adapterDelete an adapter and all its versions.
Delete adapter versionDelete one trained version of an adapter.
Extract textRead all the text in a scan, photo or one-page PDF (printed or handwritten), line by line.
Extract text from multi-page documentRead all the text in a PDF or TIFF of any length (up to 3,000 pages), line by line, waiting for Textract to finish.
Get adapterGet an adapter's name, description, features and settings.
Get adapter versionGet an adapter version's training status and, once trained, how well it reads each feature compared with Textract alone.
Get document analysis resultsRead the results of a document analysis job by its ID, waiting for it if it is still running.
Get invoice and receipt resultsRead the results of an invoice and receipt job by its ID, waiting for it if it is still running.
Get lending analysis resultsRead each page's kind and fields from a lending analysis job by its ID, waiting for it if it is still running.
Get lending analysis summarySummarise a lending analysis job by its ID: the documents in the packet grouped by kind, with their pages, pages missing a signature, and the kinds of document Textract didn't find.
Get text extraction resultsRead the results of a text extraction job by its ID, waiting for it if it is still running.
List adapter versionsList the versions of an adapter (or of every adapter), with each one's training status.
List adaptersList the adapters in the connection's region, optionally only those created in a time window.
Update adapterRename an adapter, change its description, or turn its auto update on or off.

Analyze document

Read a one-page form or document: its text, each form label with its value (as fields), tables as rows, answers to questions you ask in plain English, signatures and layout. For a longer PDF use Analyze multi-page document.

Inputs

DocumentdocumenttextRequired
Upload a scan or photo, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file). A JPEG or PNG image, or a PDF or TIFF of one page, up to 10 MB. For longer documents use the multi-page action.
Look forfeatureslist
What to read besides the text. Forms and Tables if you choose nothing; Questions is turned on by typing a question. Textract charges for each one chosen.One or more of: FORMS (Forms (labels and their values)), TABLES, QUERIES (Questions), SIGNATURES, LAYOUT (Layout (titles, headers, paragraphs, lists)). Default: ["FORMS", "TABLES"].
Questionsquerieslist
Questions to ask of the document in plain English, one per line, such as 'What is the invoice number?'. Up to 15, of up to 200 characters each. Each answer comes back under answers.
Adapteradapter_idtext
An adapter trained in the Textract console to read your kind of document better. Leave empty to use Textract as it comes.
Adapter versionadapter_versiontext
Which trained version of the adapter to use. Needed with an adapter.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
Example output
{
  "answers": {
    "What is the applicant's phone number?": "555-0100"
  },
  "blocks_truncated": false,
  "fields": {
    "Full Name": "Jane Doe"
  },
  "key_values": [
    {
      "confidence": 99.2,
      "key": "Full Name",
      "page": 1,
      "selected": null,
      "value": "Jane Doe"
    }
  ],
  "layout": [
    {
      "page": 1,
      "text": "Employment Application",
      "type": "title"
    }
  ],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [
    {
      "alias": null,
      "answer": "555-0100",
      "confidence": 99.2,
      "page": 1,
      "question": "What is the applicant's phone number?"
    }
  ],
  "raw": {
    "AnalyzeDocumentModelVersion": "1.0",
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "KEY"
        ],
        "Id": "k1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "v1"
            ],
            "Type": "VALUE"
          },
          {
            "Ids": [
              "w3",
              "w4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "VALUE"
        ],
        "Id": "v1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "TABLE",
        "Confidence": 99.2,
        "EntityTypes": [
          "STRUCTURED_TABLE"
        ],
        "Id": "t1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "c1",
              "c2",
              "c3",
              "c4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w6"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w7"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "Id": "c3",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w8"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "Id": "c4",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w9"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      },
      {
        "BlockType": "QUERY",
        "Confidence": 99.2,
        "Id": "q1",
        "Page": 1,
        "Query": {
          "Text": "What is the applicant's phone number?"
        },
        "Relationships": [
          {
            "Ids": [
              "a1"
            ],
            "Type": "ANSWER"
          }
        ]
      },
      {
        "BlockType": "QUERY_RESULT",
        "Confidence": 99.2,
        "Id": "a1",
        "Page": 1,
        "Text": "555-0100"
      },
      {
        "BlockType": "SIGNATURE",
        "Confidence": 99.2,
        "Id": "s1",
        "Page": 1
      },
      {
        "BlockType": "LAYOUT_TITLE",
        "Confidence": 99.2,
        "Id": "y1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1"
            ],
            "Type": "CHILD"
          }
        ]
      }
    ],
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [
    {
      "confidence": 99.2,
      "page": 1
    }
  ],
  "tables": [
    {
      "column_count": 2,
      "confidence": 99.2,
      "page": 1,
      "records": [
        {
          "Employer": "AnyCompany",
          "Position": "Baker"
        }
      ],
      "row_count": 2,
      "rows": [
        [
          "Employer",
          "Position"
        ],
        [
          "AnyCompany",
          "Baker"
        ]
      ],
      "title": null
    }
  ],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held"
}

Analyze ID document

Read a US driver's license or passport: name, date of birth, document number, expiry, address and the rest, with each field's confidence. Give a license's back too, if you have it.

Inputs

DocumentdocumenttextRequired
A photo or scan of the ID (its front): upload it, pick a file from an earlier step, or give a link or an S3 address. JPEG, PNG, or a one-page PDF or TIFF, up to 10 MB.
Back of the IDback_documenttext
The back of a driver's license, in the same way.

Outputs

blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
date_of_birthtext
The date of birth, as printed.
document_numbertext
The license or passport number.
expiration_datetext
When it expires, as printed.
field_listlist
Every field, with its confidence.
fieldsobject
Every field, by name, such as fields['ADDRESS'].
first_nametext
The first name.
id_typetext
DRIVER LICENSE FRONT, PASSPORT or another kind.
last_nametext
The last name.
pagesnumber
How many pages were read.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
Example output
{
  "blocks_truncated": false,
  "date_of_birth": "03/18/2001",
  "document_number": "736HDV7874JSB",
  "expiration_date": "01/20/2028",
  "field_list": [
    {
      "confidence": 98.5,
      "normalized_value": null,
      "type": "FIRST_NAME",
      "value": "MARIA"
    },
    {
      "confidence": 98.5,
      "normalized_value": null,
      "type": "LAST_NAME",
      "value": "GARCIA"
    },
    {
      "confidence": 98.5,
      "normalized_value": "2001-03-18T00:00:00",
      "type": "DATE_OF_BIRTH",
      "value": "03/18/2001"
    },
    {
      "confidence": 98.5,
      "normalized_value": null,
      "type": "DOCUMENT_NUMBER",
      "value": "736HDV7874JSB"
    },
    {
      "confidence": 98.5,
      "normalized_value": "2028-01-20T00:00:00",
      "type": "EXPIRATION_DATE",
      "value": "01/20/2028"
    },
    {
      "confidence": 98.5,
      "normalized_value": null,
      "type": "ID_TYPE",
      "value": "DRIVER LICENSE FRONT"
    },
    {
      "confidence": 98.5,
      "normalized_value": null,
      "type": "ADDRESS",
      "value": "100 MARKET STREET"
    }
  ],
  "fields": {
    "ADDRESS": "100 MARKET STREET",
    "DATE_OF_BIRTH": "03/18/2001",
    "DOCUMENT_NUMBER": "736HDV7874JSB",
    "EXPIRATION_DATE": "01/20/2028",
    "FIRST_NAME": "MARIA",
    "ID_TYPE": "DRIVER LICENSE FRONT",
    "LAST_NAME": "GARCIA"
  },
  "first_name": "MARIA",
  "id_type": "DRIVER LICENSE FRONT",
  "last_name": "GARCIA",
  "pages": 1,
  "raw": {
    "AnalyzeIDModelVersion": "1.0",
    "DocumentMetadata": {
      "Pages": 1
    },
    "IdentityDocuments": [
      {
        "Blocks": [],
        "DocumentIndex": 1,
        "IdentityDocumentFields": [
          {
            "Type": {
              "Text": "FIRST_NAME"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "Text": "MARIA"
            }
          },
          {
            "Type": {
              "Text": "LAST_NAME"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "Text": "GARCIA"
            }
          },
          {
            "Type": {
              "Text": "DATE_OF_BIRTH"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "NormalizedValue": {
                "Value": "2001-03-18T00:00:00",
                "ValueType": "DATE"
              },
              "Text": "03/18/2001"
            }
          },
          {
            "Type": {
              "Text": "DOCUMENT_NUMBER"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "Text": "736HDV7874JSB"
            }
          },
          {
            "Type": {
              "Text": "EXPIRATION_DATE"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "NormalizedValue": {
                "Value": "2028-01-20T00:00:00",
                "ValueType": "DATE"
              },
              "Text": "01/20/2028"
            }
          },
          {
            "Type": {
              "Text": "ID_TYPE"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "Text": "DRIVER LICENSE FRONT"
            }
          },
          {
            "Type": {
              "Text": "ADDRESS"
            },
            "ValueDetection": {
              "Confidence": 98.5,
              "Text": "100 MARKET STREET"
            }
          }
        ]
      }
    ]
  }
}

Analyze invoice or receipt

Read an invoice or receipt (one page): the vendor, number, date, tax and total, every other field at the top, and each line item with its quantity and price.

Inputs

DocumentdocumenttextRequired
Upload a scan or photo, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file). A JPEG or PNG image, or a PDF or TIFF of one page, up to 10 MB. For longer documents use the multi-page action.

Outputs

amount_duetext
The amount due, as printed.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
currencytext
The currency code Textract found, such as USD.
documentslist
Each invoice or receipt in the file; the fields above are the first one's.
due_datetext
When payment is due, as printed.
invoice_receipt_datetext
Its date, as printed.
invoice_receipt_idtext
The invoice or receipt number.
line_itemslist
Every line item.
pagesnumber
How many pages the document has.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
subtotaltext
The subtotal, as printed.
summaryobject
Every field at the top of the document, by name, such as summary['TOTAL'].
summary_fieldslist
Every summary field, with its label and confidence.
taxtext
The tax, as printed.
totaltext
The total, as printed.
vendor_nametext
Who issued it.
Example output
{
  "amount_due": null,
  "blocks_truncated": false,
  "currency": "USD",
  "documents": [
    {
      "currency": "USD",
      "index": 1,
      "line_items": [
        {
          "ITEM": "Sourdough loaf",
          "PRICE": "$27.50",
          "QUANTITY": "5"
        }
      ],
      "summary": {
        "INVOICE_RECEIPT_DATE": "05/10/2026",
        "INVOICE_RECEIPT_ID": "INV-1042",
        "TOTAL": "$27.50",
        "VENDOR_NAME": "AnyCompany Bakery"
      }
    }
  ],
  "due_date": null,
  "invoice_receipt_date": "05/10/2026",
  "invoice_receipt_id": "INV-1042",
  "line_items": [
    {
      "ITEM": "Sourdough loaf",
      "PRICE": "$27.50",
      "QUANTITY": "5"
    }
  ],
  "pages": 1,
  "raw": {
    "DocumentMetadata": {
      "Pages": 1
    },
    "ExpenseDocuments": [
      {
        "Blocks": [],
        "ExpenseIndex": 1,
        "LineItemGroups": [
          {
            "LineItemGroupIndex": 1,
            "LineItems": [
              {
                "LineItemExpenseFields": [
                  {
                    "Type": {
                      "Text": "ITEM"
                    },
                    "ValueDetection": {
                      "Text": "Sourdough loaf"
                    }
                  },
                  {
                    "Type": {
                      "Text": "QUANTITY"
                    },
                    "ValueDetection": {
                      "Text": "5"
                    }
                  },
                  {
                    "Type": {
                      "Text": "PRICE"
                    },
                    "ValueDetection": {
                      "Text": "$27.50"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "SummaryFields": [
          {
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.1,
              "Text": "VENDOR_NAME"
            },
            "ValueDetection": {
              "Confidence": 98.7,
              "Text": "AnyCompany Bakery"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Invoice No:"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_ID"
            },
            "ValueDetection": {
              "Confidence": 97.4,
              "Text": "INV-1042"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Date"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_DATE"
            },
            "ValueDetection": {
              "Confidence": 98.0,
              "Text": "05/10/2026"
            }
          },
          {
            "Currency": {
              "Code": "USD",
              "Confidence": 95.0
            },
            "LabelDetection": {
              "Confidence": 99.5,
              "Text": "Total"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.5,
              "Text": "TOTAL"
            },
            "ValueDetection": {
              "Confidence": 99.1,
              "Text": "$27.50"
            }
          }
        ]
      }
    ]
  },
  "subtotal": null,
  "summary": {
    "INVOICE_RECEIPT_DATE": "05/10/2026",
    "INVOICE_RECEIPT_ID": "INV-1042",
    "TOTAL": "$27.50",
    "VENDOR_NAME": "AnyCompany Bakery"
  },
  "summary_fields": [
    {
      "confidence": 98.7,
      "currency": null,
      "groups": [],
      "label": null,
      "page": 1,
      "type": "VENDOR_NAME",
      "value": "AnyCompany Bakery"
    },
    {
      "confidence": 97.4,
      "currency": null,
      "groups": [],
      "label": "Invoice No:",
      "page": 1,
      "type": "INVOICE_RECEIPT_ID",
      "value": "INV-1042"
    },
    {
      "confidence": 98.0,
      "currency": null,
      "groups": [],
      "label": "Date",
      "page": 1,
      "type": "INVOICE_RECEIPT_DATE",
      "value": "05/10/2026"
    },
    {
      "confidence": 99.1,
      "currency": "USD",
      "groups": [],
      "label": "Total",
      "page": 1,
      "type": "TOTAL",
      "value": "$27.50"
    }
  ],
  "tax": null,
  "total": "$27.50",
  "vendor_name": "AnyCompany Bakery"
}

Analyze lending documents

Sort a mortgage or loan packet into its documents (pay slips, bank statements, tax forms, IDs and more) and read each page's fields, waiting for Textract to finish. Get lending analysis summary groups the documents by kind. Needs an S3 bucket on the connection, or a document already in S3.

Inputs

DocumentdocumenttextRequired
Upload a PDF, TIFF, JPEG or PNG, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file) in the connection's region. Lodol puts an uploaded file or link in the connection's S3 bucket for Textract to read, and deletes it once the results are in (it stays if the step stops waiting first). PDF and TIFF files of any length; images up to 10 MB.
Wait for resultswait_secondsnumber
How many seconds to wait for Textract to finish, checking every 5 seconds, up to 600. Most documents take under a minute. Set 0 to start the job and read its results later with the matching Get step.From 0 to 600. Default: 300.

Outputs

blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
pagesnumber
How many pages the packet has.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
resultslist
Each page, classified, with its fields.
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "blocks_truncated": false,
  "document_location": "s3://my-documents/lodol-textract/3f2a9c1d/application.pdf",
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "pages": 1,
  "raw": {
    "DocumentMetadata": {
      "Pages": 1
    },
    "JobStatus": "SUCCEEDED",
    "Results": [
      {
        "Extractions": [
          {
            "LendingDocument": {
              "LendingFields": [
                {
                  "Type": "OVERTIME_CONTINUANCE_LIKELY",
                  "ValueDetections": [
                    {
                      "Confidence": 95.0,
                      "Text": "Yes"
                    }
                  ]
                },
                {
                  "KeyDetection": {
                    "Confidence": 99.98,
                    "Text": "Weekly"
                  },
                  "Type": "CURRENT_GROSS_PAY_WEEKLY",
                  "ValueDetections": [
                    {
                      "Confidence": 99.6,
                      "SelectionStatus": "NOT_SELECTED"
                    }
                  ]
                }
              ],
              "SignatureDetections": [
                {
                  "Confidence": 98.0
                }
              ]
            }
          }
        ],
        "Page": 1,
        "PageClassification": {
          "PageNumber": [
            {
              "Confidence": 100.0,
              "Value": "undetected"
            }
          ],
          "PageType": [
            {
              "Confidence": 99.99,
              "Value": "1005"
            }
          ]
        }
      }
    ]
  },
  "results": [
    {
      "fields": {
        "CURRENT_GROSS_PAY_WEEKLY": "not selected",
        "OVERTIME_CONTINUANCE_LIKELY": "Yes"
      },
      "page": 1,
      "page_type": "1005",
      "page_type_confidence": 100.0,
      "signature_count": 1
    }
  ],
  "status": "SUCCEEDED",
  "status_message": null,
  "warnings": []
}

Analyze multi-page document

Read the form fields, tables, answers to your questions, signatures and layout of a PDF or TIFF of any length, waiting for Textract to finish. Questions and the adapter apply to every page. Needs an S3 bucket on the connection, or a document already in S3.

Inputs

DocumentdocumenttextRequired
Upload a PDF, TIFF, JPEG or PNG, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file) in the connection's region. Lodol puts an uploaded file or link in the connection's S3 bucket for Textract to read, and deletes it once the results are in (it stays if the step stops waiting first). PDF and TIFF files of any length; images up to 10 MB.
Look forfeatureslist
What to read besides the text. Forms and Tables if you choose nothing; Questions is turned on by typing a question. Textract charges for each one chosen.One or more of: FORMS (Forms (labels and their values)), TABLES, QUERIES (Questions), SIGNATURES, LAYOUT (Layout (titles, headers, paragraphs, lists)). Default: ["FORMS", "TABLES"].
Questionsquerieslist
Questions to ask of the document in plain English, one per line, such as 'What is the invoice number?'. Up to 30, of up to 200 characters each. Each answer comes back under answers.
Adapteradapter_idtext
An adapter trained in the Textract console to read your kind of document better. Leave empty to use Textract as it comes.
Adapter versionadapter_versiontext
Which trained version of the adapter to use. Needed with an adapter.
Wait for resultswait_secondsnumber
How many seconds to wait for Textract to finish, checking every 5 seconds, up to 600. Most documents take under a minute. Set 0 to start the job and read its results later with the matching Get step.From 0 to 600. Default: 300.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "answers": {
    "What is the applicant's phone number?": "555-0100"
  },
  "blocks_truncated": false,
  "document_location": "s3://my-documents/lodol-textract/3f2a9c1d/application.pdf",
  "fields": {
    "Full Name": "Jane Doe"
  },
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "key_values": [
    {
      "confidence": 99.2,
      "key": "Full Name",
      "page": 1,
      "selected": null,
      "value": "Jane Doe"
    }
  ],
  "layout": [
    {
      "page": 1,
      "text": "Employment Application",
      "type": "title"
    }
  ],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [
    {
      "alias": null,
      "answer": "555-0100",
      "confidence": 99.2,
      "page": 1,
      "question": "What is the applicant's phone number?"
    }
  ],
  "raw": {
    "AnalyzeDocumentModelVersion": "1.0",
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "KEY"
        ],
        "Id": "k1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "v1"
            ],
            "Type": "VALUE"
          },
          {
            "Ids": [
              "w3",
              "w4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "VALUE"
        ],
        "Id": "v1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "TABLE",
        "Confidence": 99.2,
        "EntityTypes": [
          "STRUCTURED_TABLE"
        ],
        "Id": "t1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "c1",
              "c2",
              "c3",
              "c4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w6"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w7"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "Id": "c3",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w8"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "Id": "c4",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w9"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      },
      {
        "BlockType": "QUERY",
        "Confidence": 99.2,
        "Id": "q1",
        "Page": 1,
        "Query": {
          "Text": "What is the applicant's phone number?"
        },
        "Relationships": [
          {
            "Ids": [
              "a1"
            ],
            "Type": "ANSWER"
          }
        ]
      },
      {
        "BlockType": "QUERY_RESULT",
        "Confidence": 99.2,
        "Id": "a1",
        "Page": 1,
        "Text": "555-0100"
      },
      {
        "BlockType": "SIGNATURE",
        "Confidence": 99.2,
        "Id": "s1",
        "Page": 1
      },
      {
        "BlockType": "LAYOUT_TITLE",
        "Confidence": 99.2,
        "Id": "y1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1"
            ],
            "Type": "CHILD"
          }
        ]
      }
    ],
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [
    {
      "confidence": 99.2,
      "page": 1
    }
  ],
  "status": "SUCCEEDED",
  "status_message": null,
  "tables": [
    {
      "column_count": 2,
      "confidence": 99.2,
      "page": 1,
      "records": [
        {
          "Employer": "AnyCompany",
          "Position": "Baker"
        }
      ],
      "row_count": 2,
      "rows": [
        [
          "Employer",
          "Position"
        ],
        [
          "AnyCompany",
          "Baker"
        ]
      ],
      "title": null
    }
  ],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held",
  "warnings": []
}

Analyze multi-page invoices and receipts

Read every invoice or receipt in a PDF or TIFF of any length: each one's vendor, totals and line items, waiting for Textract to finish. Needs an S3 bucket on the connection, or a document already in S3.

Inputs

DocumentdocumenttextRequired
Upload a PDF, TIFF, JPEG or PNG, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file) in the connection's region. Lodol puts an uploaded file or link in the connection's S3 bucket for Textract to read, and deletes it once the results are in (it stays if the step stops waiting first). PDF and TIFF files of any length; images up to 10 MB.
Wait for resultswait_secondsnumber
How many seconds to wait for Textract to finish, checking every 5 seconds, up to 600. Most documents take under a minute. Set 0 to start the job and read its results later with the matching Get step.From 0 to 600. Default: 300.

Outputs

amount_duetext
The amount due, as printed.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
currencytext
The currency code Textract found, such as USD.
document_locationtext
The s3:// address Textract read the document from.
documentslist
Each invoice or receipt in the file; the fields above are the first one's.
due_datetext
When payment is due, as printed.
finishedtrue/false
Whether the results are in.
invoice_receipt_datetext
Its date, as printed.
invoice_receipt_idtext
The invoice or receipt number.
job_idtext
The job's ID, for the matching Get step.
line_itemslist
Every line item.
pagesnumber
How many pages the document has.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
subtotaltext
The subtotal, as printed.
summaryobject
Every field at the top of the document, by name, such as summary['TOTAL'].
summary_fieldslist
Every summary field, with its label and confidence.
taxtext
The tax, as printed.
totaltext
The total, as printed.
vendor_nametext
Who issued it.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "amount_due": null,
  "blocks_truncated": false,
  "currency": "USD",
  "document_location": "s3://my-documents/lodol-textract/3f2a9c1d/application.pdf",
  "documents": [
    {
      "currency": "USD",
      "index": 1,
      "line_items": [
        {
          "ITEM": "Sourdough loaf",
          "PRICE": "$27.50",
          "QUANTITY": "5"
        }
      ],
      "summary": {
        "INVOICE_RECEIPT_DATE": "05/10/2026",
        "INVOICE_RECEIPT_ID": "INV-1042",
        "TOTAL": "$27.50",
        "VENDOR_NAME": "AnyCompany Bakery"
      }
    }
  ],
  "due_date": null,
  "finished": true,
  "invoice_receipt_date": "05/10/2026",
  "invoice_receipt_id": "INV-1042",
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "line_items": [
    {
      "ITEM": "Sourdough loaf",
      "PRICE": "$27.50",
      "QUANTITY": "5"
    }
  ],
  "pages": 1,
  "raw": {
    "DocumentMetadata": {
      "Pages": 1
    },
    "ExpenseDocuments": [
      {
        "Blocks": [],
        "ExpenseIndex": 1,
        "LineItemGroups": [
          {
            "LineItemGroupIndex": 1,
            "LineItems": [
              {
                "LineItemExpenseFields": [
                  {
                    "Type": {
                      "Text": "ITEM"
                    },
                    "ValueDetection": {
                      "Text": "Sourdough loaf"
                    }
                  },
                  {
                    "Type": {
                      "Text": "QUANTITY"
                    },
                    "ValueDetection": {
                      "Text": "5"
                    }
                  },
                  {
                    "Type": {
                      "Text": "PRICE"
                    },
                    "ValueDetection": {
                      "Text": "$27.50"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "SummaryFields": [
          {
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.1,
              "Text": "VENDOR_NAME"
            },
            "ValueDetection": {
              "Confidence": 98.7,
              "Text": "AnyCompany Bakery"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Invoice No:"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_ID"
            },
            "ValueDetection": {
              "Confidence": 97.4,
              "Text": "INV-1042"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Date"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_DATE"
            },
            "ValueDetection": {
              "Confidence": 98.0,
              "Text": "05/10/2026"
            }
          },
          {
            "Currency": {
              "Code": "USD",
              "Confidence": 95.0
            },
            "LabelDetection": {
              "Confidence": 99.5,
              "Text": "Total"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.5,
              "Text": "TOTAL"
            },
            "ValueDetection": {
              "Confidence": 99.1,
              "Text": "$27.50"
            }
          }
        ]
      }
    ]
  },
  "status": "SUCCEEDED",
  "status_message": null,
  "subtotal": null,
  "summary": {
    "INVOICE_RECEIPT_DATE": "05/10/2026",
    "INVOICE_RECEIPT_ID": "INV-1042",
    "TOTAL": "$27.50",
    "VENDOR_NAME": "AnyCompany Bakery"
  },
  "summary_fields": [
    {
      "confidence": 98.7,
      "currency": null,
      "groups": [],
      "label": null,
      "page": 1,
      "type": "VENDOR_NAME",
      "value": "AnyCompany Bakery"
    },
    {
      "confidence": 97.4,
      "currency": null,
      "groups": [],
      "label": "Invoice No:",
      "page": 1,
      "type": "INVOICE_RECEIPT_ID",
      "value": "INV-1042"
    },
    {
      "confidence": 98.0,
      "currency": null,
      "groups": [],
      "label": "Date",
      "page": 1,
      "type": "INVOICE_RECEIPT_DATE",
      "value": "05/10/2026"
    },
    {
      "confidence": 99.1,
      "currency": "USD",
      "groups": [],
      "label": "Total",
      "page": 1,
      "type": "TOTAL",
      "value": "$27.50"
    }
  ],
  "tax": null,
  "total": "$27.50",
  "vendor_name": "AnyCompany Bakery",
  "warnings": []
}

Create adapter

Create an adapter: a way to tune Textract's answers to your kind of document. Train it with your labelled samples in the Textract console, or with Create adapter version.

Inputs

Nameadapter_nametextRequired
A name, using letters, digits, '-' and '_', such as invoice-queries.
Made forfeatureslistRequired
What the adapter improves. Textract adapters mostly tune Questions.One or more of: FORMS (Forms (labels and their values)), TABLES, QUERIES (Questions), SIGNATURES, LAYOUT (Layout (titles, headers, paragraphs, lists)).
Descriptiondescriptiontext
What the adapter is for, up to 256 characters of plain text.
Auto updateauto_updatetext
Whether Textract retrains the adapter when it updates its own model.One of: ENABLED (Retrain when Textract updates its model), DISABLED (Keep it as trained).

Outputs

adapter_idtext
The adapter's ID.
adapter_nametext
Its name.
auto_updatetext
ENABLED or DISABLED: whether it is retrained when Textract updates.
created_attext
When it was created, in UTC.
descriptiontext
Its description.
featureslist
What it was made for: QUERIES, TABLES and so on.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_name": "invoice-queries",
  "auto_update": "DISABLED",
  "created_at": "2026-10-20T09:15:02Z",
  "description": "Reads our suppliers' invoices",
  "features": [
    "QUERIES"
  ]
}

Create adapter version

Train a new version of an adapter from a labelled dataset in S3, such as the manifest the Textract console's labelling tool saves. Training can take hours; Get adapter version shows when it is ready.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.
Dataset manifestmanifest_s3_uritextRequired
The S3 address of the dataset's manifest file, such as s3://my-bucket/adapter/manifest.jsonl.
Output locationoutput_s3_uritextRequired
An S3 address for the training results, such as s3://my-bucket/adapter-output/.

Outputs

adapter_idtext
The adapter's ID.
adapter_versiontext
The new version's number.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_version": "1"
}

Delete adapter

Delete an adapter and all its versions. This can't be undone.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.

Outputs

adapter_idtext
The deleted adapter's ID.
deletedtrue/false
Always true.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "deleted": true
}

Delete adapter version

Delete one trained version of an adapter. This can't be undone.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.
Adapter versionadapter_versiontextRequired
The version, such as 1. Pick it, or give it from List adapter versions.

Outputs

adapter_idtext
The adapter's ID.
adapter_versiontext
The deleted version.
deletedtrue/false
Always true.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_version": "1",
  "deleted": true
}

Extract text

Read all the text in a scan, photo or one-page PDF (printed or handwritten), line by line. For a longer PDF use Extract text from multi-page document.

Inputs

DocumentdocumenttextRequired
Upload a scan or photo, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file). A JPEG or PNG image, or a PDF or TIFF of one page, up to 10 MB. For longer documents use the multi-page action.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
Example output
{
  "answers": {},
  "blocks_truncated": false,
  "fields": {},
  "key_values": [],
  "layout": [],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [],
  "raw": {
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      }
    ],
    "DetectDocumentTextModelVersion": "1.0",
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [],
  "tables": [],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held"
}

Extract text from multi-page document

Read all the text in a PDF or TIFF of any length (up to 3,000 pages), line by line, waiting for Textract to finish. Needs an S3 bucket on the connection, or a document already in S3.

Inputs

DocumentdocumenttextRequired
Upload a PDF, TIFF, JPEG or PNG, pick a file from an earlier step, or give a link or an S3 address (s3://bucket/file) in the connection's region. Lodol puts an uploaded file or link in the connection's S3 bucket for Textract to read, and deletes it once the results are in (it stays if the step stops waiting first). PDF and TIFF files of any length; images up to 10 MB.
Wait for resultswait_secondsnumber
How many seconds to wait for Textract to finish, checking every 5 seconds, up to 600. Most documents take under a minute. Set 0 to start the job and read its results later with the matching Get step.From 0 to 600. Default: 300.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "answers": {},
  "blocks_truncated": false,
  "document_location": "s3://my-documents/lodol-textract/3f2a9c1d/application.pdf",
  "fields": {},
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "key_values": [],
  "layout": [],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [],
  "raw": {
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      }
    ],
    "DetectDocumentTextModelVersion": "1.0",
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [],
  "status": "SUCCEEDED",
  "status_message": null,
  "tables": [],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held",
  "warnings": []
}

Get adapter

Get an adapter's name, description, features and settings.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.

Outputs

adapter_idtext
The adapter's ID.
adapter_nametext
Its name.
auto_updatetext
ENABLED or DISABLED: whether it is retrained when Textract updates.
created_attext
When it was created, in UTC.
descriptiontext
Its description.
featureslist
What it was made for: QUERIES, TABLES and so on.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_name": "invoice-queries",
  "auto_update": "DISABLED",
  "created_at": "2026-10-20T09:15:02Z",
  "description": "Reads our suppliers' invoices",
  "features": [
    "QUERIES"
  ]
}

Get adapter version

Get an adapter version's training status and, once trained, how well it reads each feature compared with Textract alone.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.
Adapter versionadapter_versiontextRequired
The version, such as 1. Pick it, or give it from List adapter versions.

Outputs

adapter_idtext
The adapter's ID.
adapter_versiontext
The version's number.
created_attext
When it was created, in UTC.
evaluationlist
Its scores against the test set.
featureslist
What it was trained for.
manifesttext
The s3:// address of the dataset it was trained on.
output_locationtext
The s3:// address its training results went to.
statustext
ACTIVE, CREATION_IN_PROGRESS, CREATION_ERROR, AT_RISK or DEPRECATED.
status_messagetext
Textract's note on the status.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_version": "1",
  "created_at": "2026-10-21T10:00:00Z",
  "evaluation": [
    {
      "baseline_f1_score": 0.81,
      "f1_score": 0.94,
      "feature": "QUERIES",
      "precision": 0.95,
      "recall": 0.93
    }
  ],
  "features": [
    "QUERIES"
  ],
  "manifest": "s3://my-documents/adapter/manifest.jsonl",
  "output_location": "s3://my-documents/adapter-output/",
  "status": "ACTIVE",
  "status_message": null
}

Get document analysis results

Read the results of a document analysis job by its ID, waiting for it if it is still running.

Inputs

Job IDjob_idtextRequired
The job ID that Analyze multi-page document returned.
Wait for resultswait_secondsnumber
How many seconds to wait for a job that is still running, checking every 5 seconds, up to 600. Set 0 to read the job as it is now.From 0 to 600. Default: 300.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "answers": {
    "What is the applicant's phone number?": "555-0100"
  },
  "blocks_truncated": false,
  "document_location": null,
  "fields": {
    "Full Name": "Jane Doe"
  },
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "key_values": [
    {
      "confidence": 99.2,
      "key": "Full Name",
      "page": 1,
      "selected": null,
      "value": "Jane Doe"
    }
  ],
  "layout": [
    {
      "page": 1,
      "text": "Employment Application",
      "type": "title"
    }
  ],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [
    {
      "alias": null,
      "answer": "555-0100",
      "confidence": 99.2,
      "page": 1,
      "question": "What is the applicant's phone number?"
    }
  ],
  "raw": {
    "AnalyzeDocumentModelVersion": "1.0",
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "KEY"
        ],
        "Id": "k1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "v1"
            ],
            "Type": "VALUE"
          },
          {
            "Ids": [
              "w3",
              "w4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "KEY_VALUE_SET",
        "Confidence": 99.2,
        "EntityTypes": [
          "VALUE"
        ],
        "Id": "v1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "TABLE",
        "Confidence": 99.2,
        "EntityTypes": [
          "STRUCTURED_TABLE"
        ],
        "Id": "t1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "c1",
              "c2",
              "c3",
              "c4"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w6"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "EntityTypes": [
          "COLUMN_HEADER"
        ],
        "Id": "c2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w7"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 1
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 1,
        "Confidence": 99.2,
        "Id": "c3",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w8"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "CELL",
        "ColumnIndex": 2,
        "Confidence": 99.2,
        "Id": "c4",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w9"
            ],
            "Type": "CHILD"
          }
        ],
        "RowIndex": 2
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      },
      {
        "BlockType": "QUERY",
        "Confidence": 99.2,
        "Id": "q1",
        "Page": 1,
        "Query": {
          "Text": "What is the applicant's phone number?"
        },
        "Relationships": [
          {
            "Ids": [
              "a1"
            ],
            "Type": "ANSWER"
          }
        ]
      },
      {
        "BlockType": "QUERY_RESULT",
        "Confidence": 99.2,
        "Id": "a1",
        "Page": 1,
        "Text": "555-0100"
      },
      {
        "BlockType": "SIGNATURE",
        "Confidence": 99.2,
        "Id": "s1",
        "Page": 1
      },
      {
        "BlockType": "LAYOUT_TITLE",
        "Confidence": 99.2,
        "Id": "y1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1"
            ],
            "Type": "CHILD"
          }
        ]
      }
    ],
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [
    {
      "confidence": 99.2,
      "page": 1
    }
  ],
  "status": "SUCCEEDED",
  "status_message": null,
  "tables": [
    {
      "column_count": 2,
      "confidence": 99.2,
      "page": 1,
      "records": [
        {
          "Employer": "AnyCompany",
          "Position": "Baker"
        }
      ],
      "row_count": 2,
      "rows": [
        [
          "Employer",
          "Position"
        ],
        [
          "AnyCompany",
          "Baker"
        ]
      ],
      "title": null
    }
  ],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held",
  "warnings": []
}

Get invoice and receipt results

Read the results of an invoice and receipt job by its ID, waiting for it if it is still running.

Inputs

Job IDjob_idtextRequired
The job ID that Analyze multi-page invoices and receipts returned.
Wait for resultswait_secondsnumber
How many seconds to wait for a job that is still running, checking every 5 seconds, up to 600. Set 0 to read the job as it is now.From 0 to 600. Default: 300.

Outputs

amount_duetext
The amount due, as printed.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
currencytext
The currency code Textract found, such as USD.
document_locationtext
The s3:// address Textract read the document from.
documentslist
Each invoice or receipt in the file; the fields above are the first one's.
due_datetext
When payment is due, as printed.
finishedtrue/false
Whether the results are in.
invoice_receipt_datetext
Its date, as printed.
invoice_receipt_idtext
The invoice or receipt number.
job_idtext
The job's ID, for the matching Get step.
line_itemslist
Every line item.
pagesnumber
How many pages the document has.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
subtotaltext
The subtotal, as printed.
summaryobject
Every field at the top of the document, by name, such as summary['TOTAL'].
summary_fieldslist
Every summary field, with its label and confidence.
taxtext
The tax, as printed.
totaltext
The total, as printed.
vendor_nametext
Who issued it.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "amount_due": null,
  "blocks_truncated": false,
  "currency": "USD",
  "document_location": null,
  "documents": [
    {
      "currency": "USD",
      "index": 1,
      "line_items": [
        {
          "ITEM": "Sourdough loaf",
          "PRICE": "$27.50",
          "QUANTITY": "5"
        }
      ],
      "summary": {
        "INVOICE_RECEIPT_DATE": "05/10/2026",
        "INVOICE_RECEIPT_ID": "INV-1042",
        "TOTAL": "$27.50",
        "VENDOR_NAME": "AnyCompany Bakery"
      }
    }
  ],
  "due_date": null,
  "finished": true,
  "invoice_receipt_date": "05/10/2026",
  "invoice_receipt_id": "INV-1042",
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "line_items": [
    {
      "ITEM": "Sourdough loaf",
      "PRICE": "$27.50",
      "QUANTITY": "5"
    }
  ],
  "pages": 1,
  "raw": {
    "DocumentMetadata": {
      "Pages": 1
    },
    "ExpenseDocuments": [
      {
        "Blocks": [],
        "ExpenseIndex": 1,
        "LineItemGroups": [
          {
            "LineItemGroupIndex": 1,
            "LineItems": [
              {
                "LineItemExpenseFields": [
                  {
                    "Type": {
                      "Text": "ITEM"
                    },
                    "ValueDetection": {
                      "Text": "Sourdough loaf"
                    }
                  },
                  {
                    "Type": {
                      "Text": "QUANTITY"
                    },
                    "ValueDetection": {
                      "Text": "5"
                    }
                  },
                  {
                    "Type": {
                      "Text": "PRICE"
                    },
                    "ValueDetection": {
                      "Text": "$27.50"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "SummaryFields": [
          {
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.1,
              "Text": "VENDOR_NAME"
            },
            "ValueDetection": {
              "Confidence": 98.7,
              "Text": "AnyCompany Bakery"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Invoice No:"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_ID"
            },
            "ValueDetection": {
              "Confidence": 97.4,
              "Text": "INV-1042"
            }
          },
          {
            "LabelDetection": {
              "Confidence": 99.0,
              "Text": "Date"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.0,
              "Text": "INVOICE_RECEIPT_DATE"
            },
            "ValueDetection": {
              "Confidence": 98.0,
              "Text": "05/10/2026"
            }
          },
          {
            "Currency": {
              "Code": "USD",
              "Confidence": 95.0
            },
            "LabelDetection": {
              "Confidence": 99.5,
              "Text": "Total"
            },
            "PageNumber": 1,
            "Type": {
              "Confidence": 99.5,
              "Text": "TOTAL"
            },
            "ValueDetection": {
              "Confidence": 99.1,
              "Text": "$27.50"
            }
          }
        ]
      }
    ]
  },
  "status": "SUCCEEDED",
  "status_message": null,
  "subtotal": null,
  "summary": {
    "INVOICE_RECEIPT_DATE": "05/10/2026",
    "INVOICE_RECEIPT_ID": "INV-1042",
    "TOTAL": "$27.50",
    "VENDOR_NAME": "AnyCompany Bakery"
  },
  "summary_fields": [
    {
      "confidence": 98.7,
      "currency": null,
      "groups": [],
      "label": null,
      "page": 1,
      "type": "VENDOR_NAME",
      "value": "AnyCompany Bakery"
    },
    {
      "confidence": 97.4,
      "currency": null,
      "groups": [],
      "label": "Invoice No:",
      "page": 1,
      "type": "INVOICE_RECEIPT_ID",
      "value": "INV-1042"
    },
    {
      "confidence": 98.0,
      "currency": null,
      "groups": [],
      "label": "Date",
      "page": 1,
      "type": "INVOICE_RECEIPT_DATE",
      "value": "05/10/2026"
    },
    {
      "confidence": 99.1,
      "currency": "USD",
      "groups": [],
      "label": "Total",
      "page": 1,
      "type": "TOTAL",
      "value": "$27.50"
    }
  ],
  "tax": null,
  "total": "$27.50",
  "vendor_name": "AnyCompany Bakery",
  "warnings": []
}

Get lending analysis results

Read each page's kind and fields from a lending analysis job by its ID, waiting for it if it is still running.

Inputs

Job IDjob_idtextRequired
The job ID that Analyze lending documents returned.
Wait for resultswait_secondsnumber
How many seconds to wait for a job that is still running, checking every 5 seconds, up to 600. Set 0 to read the job as it is now.From 0 to 600. Default: 300.

Outputs

blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
pagesnumber
How many pages the packet has.
rawobject
Textract's own answer, with up to 5,000 of its blocks.
resultslist
Each page, classified, with its fields.
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "blocks_truncated": false,
  "document_location": null,
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "pages": 1,
  "raw": {
    "DocumentMetadata": {
      "Pages": 1
    },
    "JobStatus": "SUCCEEDED",
    "Results": [
      {
        "Extractions": [
          {
            "LendingDocument": {
              "LendingFields": [
                {
                  "Type": "OVERTIME_CONTINUANCE_LIKELY",
                  "ValueDetections": [
                    {
                      "Confidence": 95.0,
                      "Text": "Yes"
                    }
                  ]
                },
                {
                  "KeyDetection": {
                    "Confidence": 99.98,
                    "Text": "Weekly"
                  },
                  "Type": "CURRENT_GROSS_PAY_WEEKLY",
                  "ValueDetections": [
                    {
                      "Confidence": 99.6,
                      "SelectionStatus": "NOT_SELECTED"
                    }
                  ]
                }
              ],
              "SignatureDetections": [
                {
                  "Confidence": 98.0
                }
              ]
            }
          }
        ],
        "Page": 1,
        "PageClassification": {
          "PageNumber": [
            {
              "Confidence": 100.0,
              "Value": "undetected"
            }
          ],
          "PageType": [
            {
              "Confidence": 99.99,
              "Value": "1005"
            }
          ]
        }
      }
    ]
  },
  "results": [
    {
      "fields": {
        "CURRENT_GROSS_PAY_WEEKLY": "not selected",
        "OVERTIME_CONTINUANCE_LIKELY": "Yes"
      },
      "page": 1,
      "page_type": "1005",
      "page_type_confidence": 100.0,
      "signature_count": 1
    }
  ],
  "status": "SUCCEEDED",
  "status_message": null,
  "warnings": []
}

Get lending analysis summary

Summarise a lending analysis job by its ID: the documents in the packet grouped by kind, with their pages, pages missing a signature, and the kinds of document Textract didn't find.

Inputs

Job IDjob_idtextRequired
The job ID that Analyze lending documents returned.
Wait for resultswait_secondsnumber
How many seconds to wait for a job that is still running, checking every 5 seconds, up to 600. Set 0 to read the job as it is now.From 0 to 600. Default: 300.

Outputs

document_groupslist
The packet's documents, grouped by kind.
document_locationtext
The s3:// address Textract read the document from.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
pagesnumber
How many pages the packet has.
rawobject
Textract's own answer.
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
undetected_document_typeslist
Kinds of document Textract looked for and didn't find.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "document_groups": [
    {
      "document_count": 1,
      "documents": [
        {
          "index": 1,
          "pages": [
            1,
            2
          ]
        }
      ],
      "signed_pages": [
        2
      ],
      "type": "PAYSLIPS",
      "unsigned_pages": []
    },
    {
      "document_count": 1,
      "documents": [
        {
          "index": 1,
          "pages": [
            3
          ]
        }
      ],
      "signed_pages": [],
      "type": "BANK_STATEMENT",
      "unsigned_pages": [
        3
      ]
    }
  ],
  "document_location": null,
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "pages": 3,
  "raw": {
    "DocumentMetadata": {
      "Pages": 3
    },
    "JobStatus": "SUCCEEDED",
    "Summary": {
      "DocumentGroups": [
        {
          "DetectedSignatures": [
            {
              "Page": 2
            }
          ],
          "SplitDocuments": [
            {
              "Index": 1,
              "Pages": [
                1,
                2
              ]
            }
          ],
          "Type": "PAYSLIPS",
          "UndetectedSignatures": []
        },
        {
          "DetectedSignatures": [],
          "SplitDocuments": [
            {
              "Index": 1,
              "Pages": [
                3
              ]
            }
          ],
          "Type": "BANK_STATEMENT",
          "UndetectedSignatures": [
            {
              "Page": 3
            }
          ]
        }
      ],
      "UndetectedDocumentTypes": [
        "W2"
      ]
    }
  },
  "status": "SUCCEEDED",
  "status_message": null,
  "undetected_document_types": [
    "W2"
  ],
  "warnings": []
}

Get text extraction results

Read the results of a text extraction job by its ID, waiting for it if it is still running.

Inputs

Job IDjob_idtextRequired
The job ID that Extract text from multi-page document returned.
Wait for resultswait_secondsnumber
How many seconds to wait for a job that is still running, checking every 5 seconds, up to 600. Set 0 to read the job as it is now.From 0 to 600. Default: 300.

Outputs

answersobject
Each question's answer, by question.
blocks_truncatedtrue/false
Whether raw holds only the first 5,000 blocks.
document_locationtext
The s3:// address Textract read the document from.
fieldsobject
Each form label's value, by label, such as fields['Full Name']. A label seen again gets ' (2)' after it.
finishedtrue/false
Whether the results are in.
job_idtext
The job's ID, for the matching Get step.
key_valueslist
Every form label with its value (with Forms).
layoutlist
The page's parts in reading order (with Layout).
lineslist
Every line of text, in reading order.
pagesnumber
How many pages the document has.
query_answerslist
Each question's answer (with Questions).
rawobject
Textract's own answer, with up to 5,000 of its blocks.
signatureslist
Every signature found (with Signatures).
statustext
IN_PROGRESS, SUCCEEDED, PARTIAL_SUCCESS or FAILED.
status_messagetext
Textract's note on the job, if any.
tableslist
Every table (with Tables).
texttext
All the text, line by line, with a blank line between pages.
warningslist
Pages Textract couldn't read in full.
Example output
{
  "answers": {},
  "blocks_truncated": false,
  "document_location": null,
  "fields": {},
  "finished": true,
  "job_id": "8f1c6a0e2b7d4c93a5e1f0b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
  "key_values": [],
  "layout": [],
  "lines": [
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employment Application"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Full Name: Jane Doe"
    },
    {
      "confidence": 99.2,
      "page": 1,
      "text": "Employer Name Position Held"
    }
  ],
  "pages": 1,
  "query_answers": [],
  "raw": {
    "Blocks": [
      {
        "BlockType": "PAGE",
        "Confidence": 99.2,
        "Id": "p1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "l1",
              "l2",
              "l3"
            ],
            "Type": "CHILD"
          }
        ]
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l1",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w1",
              "w2"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Employment Application"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w1",
        "Page": 1,
        "Text": "Employment",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w2",
        "Page": 1,
        "Text": "Application",
        "TextType": "PRINTED"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l2",
        "Page": 1,
        "Relationships": [
          {
            "Ids": [
              "w3",
              "w4",
              "w5",
              "w5b"
            ],
            "Type": "CHILD"
          }
        ],
        "Text": "Full Name: Jane Doe"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w3",
        "Page": 1,
        "Text": "Full"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w4",
        "Page": 1,
        "Text": "Name:"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5",
        "Page": 1,
        "Text": "Jane"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w5b",
        "Page": 1,
        "Text": "Doe"
      },
      {
        "BlockType": "LINE",
        "Confidence": 99.2,
        "Id": "l3",
        "Page": 1,
        "Text": "Employer Name Position Held"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w6",
        "Page": 1,
        "Text": "Employer"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w7",
        "Page": 1,
        "Text": "Position"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w8",
        "Page": 1,
        "Text": "AnyCompany"
      },
      {
        "BlockType": "WORD",
        "Confidence": 99.2,
        "Id": "w9",
        "Page": 1,
        "Text": "Baker"
      }
    ],
    "DetectDocumentTextModelVersion": "1.0",
    "DocumentMetadata": {
      "Pages": 1
    }
  },
  "signatures": [],
  "status": "SUCCEEDED",
  "status_message": null,
  "tables": [],
  "text": "Employment Application\nFull Name: Jane Doe\nEmployer Name Position Held",
  "warnings": []
}

List adapter versions

List the versions of an adapter (or of every adapter), with each one's training status.

Inputs

Adapteradapter_idtext
Only this adapter's versions. Leave empty for every adapter's.
Created aftercreated_afterdate and time
Only those created after this moment.
Created beforecreated_beforedate and time
Only those created before this moment.

Outputs

countnumber
How many there are.
versionslist
The versions.
Example output
{
  "count": 1,
  "versions": [
    {
      "adapter_id": "2e9bf1b0f2a8",
      "adapter_version": "1",
      "created_at": "2026-10-21T10:00:00Z",
      "evaluation": [
        {
          "baseline_f1_score": 0.81,
          "f1_score": 0.94,
          "feature": "QUERIES",
          "precision": 0.95,
          "recall": 0.93
        }
      ],
      "features": [
        "QUERIES"
      ],
      "manifest": "s3://my-documents/adapter/manifest.jsonl",
      "output_location": "s3://my-documents/adapter-output/",
      "status": "ACTIVE",
      "status_message": null
    }
  ]
}

List adapters

List the adapters in the connection's region, optionally only those created in a time window.

Inputs

Created aftercreated_afterdate and time
Only those created after this moment.
Created beforecreated_beforedate and time
Only those created before this moment.

Outputs

adapterslist
The adapters.
countnumber
How many there are.
Example output
{
  "adapters": [
    {
      "adapter_id": "2e9bf1b0f2a8",
      "adapter_name": "invoice-queries",
      "auto_update": "DISABLED",
      "created_at": "2026-10-20T09:15:02Z",
      "description": "Reads our suppliers' invoices",
      "features": [
        "QUERIES"
      ]
    }
  ],
  "count": 1
}

Update adapter

Rename an adapter, change its description, or turn its auto update on or off.

Inputs

Adapteradapter_idtextRequired
The adapter. Pick it, or give its ID from List adapters.
New nameadapter_nametext
A new name, using letters, digits, '-' and '_'.
Descriptiondescriptiontext
What the adapter is for, up to 256 characters of plain text.
Auto updateauto_updatetext
Whether Textract retrains the adapter when it updates its own model.One of: ENABLED (Retrain when Textract updates its model), DISABLED (Keep it as trained).

Outputs

adapter_idtext
The adapter's ID.
adapter_nametext
Its name.
auto_updatetext
ENABLED or DISABLED: whether it is retrained when Textract updates.
created_attext
When it was created, in UTC.
descriptiontext
Its description.
featureslist
What it was made for: QUERIES, TABLES and so on.
Example output
{
  "adapter_id": "2e9bf1b0f2a8",
  "adapter_name": "invoice-queries",
  "auto_update": "DISABLED",
  "created_at": "2026-10-20T09:15:02Z",
  "description": "Reads our suppliers' invoices",
  "features": [
    "QUERIES"
  ]
}

On this page