Microsoft Azure: Form Recognizer OCR

An automation tool that leverages Microsoft Azure's Form Recognizer service to perform Optical Character Recognition on images and PDFs.


Created by Jacky Koh, this tool is a sophisticated solution for extracting text from various document formats. It requires a file URL, Azure OCR Project ID, and Azure OCR API Key as inputs. The tool operates through a Python script that interacts with Azure's OCR service, sending the document for analysis and periodically checking for the completion of the OCR process. Upon successful completion, the script outputs structured data such as text and tables extracted from the document.

Use cases

This tool can be used by businesses that handle large volumes of paper-based documents, such as invoices, contracts, and forms. It's particularly useful for data entry automation, document management systems, and digital archiving. Legal firms, financial institutions, and healthcare providers could use it to digitize records, while researchers might employ it to convert printed materials into editable formats for data analysis.


The tool streamlines the process of digitizing documents, saving time and reducing manual data entry errors. It offers the advantage of Azure's advanced OCR capabilities, ensuring high accuracy in text recognition and the ability to handle complex document layouts. Users can quickly convert documents into actionable data, facilitating easier search, analysis, and integration with other digital systems.

How it works

The tool's Python script starts by setting up the necessary parameters with the user's inputs, including the file URL and Azure credentials. It then sends a POST request to Azure's Form Recognizer service, specifying the 'prebuilt-document' model for analysis. The script enters a loop, making timed GET requests to check the OCR process status. Once Azure's service completes the OCR, the script parses the 'analyzeResult' from the response, providing the user with the extracted document data.

Build your AI workforce today!

Easily deploy and train your AI workers. Grow your business, not your headcount.
Free plan
No card required