Form Recognizer invoice model

The invoice model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key fields and line items from sales invoices. Invoices can be of various formats and quality including phone-captured images, scanned documents, and digital PDFs. The API analyzes invoice text; extracts key information such as customer name, billing address, due date, and amount due; and returns a structured JSON data representation.

Sample invoice processed with Form Recognizer Studio:

sample invoice

Development options

The following resources are supported by Form Recognizer v2.1:

Feature Resources
Invoice model

The following resources are supported by Form Recognizer v3.0:

Feature Resources Model ID
Invoice model prebuilt-invoice

Try Form Recognizer

See how data, including customer information, vendor details, and line items, is extracted from invoices using the Form Recognizer Studio or our Sample Labeling tool. You'll need the following:

  • An Azure subscription—you can create one for free

  • A Form Recognizer instance in the Azure portal. You can use the free pricing tier (F0) to try the service. After your resource deploys, select Go to resource to get your API key and endpoint.

Screenshot: keys and endpoint location in the Azure portal.

Form Recognizer Studio (preview)

  1. On the Form Recognizer Studio home page, select Invoices

  2. You can analyze the sample invoice or select the + Add button to upload your own sample.

  3. Select the Analyze button:

    Screenshot: analyze invoice menu.

Sample Labeling tool

You will need an invoice document. You can use our sample invoice document.

  1. On the Sample Labeling tool home page, select Use prebuilt model to get data.

  2. Select Invoice from the Form Type dropdown menu:

    Screenshot: Sample Labeling tool dropdown prebuilt model selection menu.

Input requirements

  • For best results, provide one clear photo or high-quality scan per document.
  • Supported file formats: JPEG, PNG, BMP, TIFF, and PDF (text-embedded or scanned). Text-embedded PDFs are best to eliminate the possibility of error in character extraction and location.
  • For PDF and TIFF, up to 2000 pages can be processed (with a free tier subscription, only the first two pages are processed).
  • The file size must be less than 50 MB.
  • Image dimensions must be between 50 x 50 pixels and 10000 x 10000 pixels.
  • PDF dimensions are up to 17 x 17 inches, corresponding to Legal or A3 paper size, or smaller.
  • The total size of the training data is 500 pages or less.
  • If your PDFs are password-locked, you must remove the lock before submission.
  • For unsupervised learning (without labeled data):
    • Data must contain keys and values.
    • Keys must appear above or to the left of the values; they can't appear below or to the right.

Note

The Sample Labeling tool does not support the BMP file format. This is a limitation of the tool not the Form Recognizer Service.

Supported languages and locales

Model Language—Locale code Default
Invoice
  • English (United States)—en-US
English (United States)—en-US

Field extraction

Name Type Description Standardized output
CustomerName String Invoiced customer
CustomerId String Customer reference ID
PurchaseOrder String Purchase order reference number
InvoiceId String ID for this specific invoice (often "Invoice Number")
InvoiceDate Date Date the invoice was issued yyyy-mm-dd
DueDate Date Date payment for this invoice is due yyyy-mm-dd
VendorName String Vendor name
VendorAddress String Vendor mailing address
VendorAddressRecipient String Name associated with the VendorAddress
CustomerAddress String Mailing address for the Customer
CustomerAddressRecipient String Name associated with the CustomerAddress
BillingAddress String Explicit billing address for the customer
BillingAddressRecipient String Name associated with the BillingAddress
ShippingAddress String Explicit shipping address for the customer
ShippingAddressRecipient String Name associated with the ShippingAddress
SubTotal Number Subtotal field identified on this invoice Integer
TotalTax Number Total tax field identified on this invoice Integer
InvoiceTotal Number (USD) Total new charges associated with this invoice Integer
AmountDue Number (USD) Total Amount Due to the vendor Integer
ServiceAddress String Explicit service address or property address for the customer
ServiceAddressRecipient String Name associated with the ServiceAddress
RemittanceAddress String Explicit remittance or payment address for the customer
RemittanceAddressRecipient String Name associated with the RemittanceAddress
ServiceStartDate Date First date for the service period (for example, a utility bill service period) yyyy-mm-dd
ServiceEndDate Date End date for the service period (for example, a utility bill service period) yyyy-mm-dd
PreviousUnpaidBalance Number Explicit previously unpaid balance Integer

Line items

Following are the line items extracted from an invoice in the JSON output response (the output below uses this sample invoice)

Name Type Description Text (line item #1) Value (standardized output)
Items String Full string text line of the line item 3/4/2021 A123 Consulting Services 2 hours $30.00 10% $60.00
Amount Number The amount of the line item $60.00 100
Description String The text description for the invoice line item Consulting service Consulting service
Quantity Number The quantity for this invoice line item 2 2
UnitPrice Number The net or gross price (depending on the gross invoice setting of the invoice) of one unit of this item $30.00 30
ProductCode String Product code, product number, or SKU associated with the specific line item A123
Unit String The unit of the line item, e.g, kg, lb etc. Hours
Date Date Date corresponding to each line item. Often it is a date the line item was shipped 3/4/2021 2021-03-04
Tax Number Tax associated with each line item. Possible values include tax amount, tax %, and tax Y/N 10%

The invoice key-value pairs and line items extracted are in the documentResults section of the JSON output.

Form Recognizer preview v3.0

The Form Recognizer preview introduces several new features and capabilities.

Next steps