Skip to content

AnalyzeID

Source: src/AWS/Textract/AnalyzeID.ts

Runtime binding for textract:AnalyzeID — synchronous extraction of identity-document fields (name, date of birth, document number, …) from images of passports, driver licenses, and other government IDs.

// init
const analyzeID = yield* AWS.Textract.AnalyzeID();
// runtime
const result = yield* analyzeID({
DocumentPages: [{ Bytes: licenseBytes }],
});
const fields = result.IdentityDocuments?.[0]?.IdentityDocumentFields;