logo

OCR API to Extract data from Documents & Images

Shyam Paliwal
Shyam Paliwal at January 25, 2023

OCR API makes real-time data extraction from invoices possible not only in key-value pairs but line items as well, have a look at Masters India OCR API. They are built to extract the data from any kind of invoice, there is no dependency on the template.

OCR API will solve the problem of Manual data entry of bills or invoices into the system or ERPS. Businesses, start-ups, and Enterprises who want to reduce manual data entry and automate the whole Invoicing Process can use the OCR to improvise the output.

What is OCR API?

Businesses that want to automate their data extraction process they looking for ways to integrate OCR into their current system, Applications Or ERPs. One of the best ways to do this is through the use of OCR API.  In the market Free OCR API is also available but they have limitations of usage and are not accurate to fulfill business needs. Image OCR API also helps in extracting text from printed or handwritten invoices.

OCR API is a simple way of extracting data from images or multi-page PDF documents such as Invoices. You will get the extracted text response in JSON format. 

These APIs are AI-powered OCR API to capture data from Any Document and get data from the invoices within seconds.

How OCR API will be Helpful?

  • Invoice OCR API is the way to automate Invoice Processing or accounts payable process
  • Free OCR API will give real-time data extraction within seconds Not in minutes, hours, or days
  • Inbuilt with AI & Ml for better accuracy & to reduce template dependency data extraction
  • OCR-free API are beneficial for Any type of industry & can save up to 90% of time consumed in invoice data entry.
  • OCR API Can get integrate in ERP & Current Systems, No third party UI requirement for Invoice 
  • Image OCR API Made data extraction possible from PDF & Image within system easy
  • It will get fit in the current Accounts payable process and can be used in the current process to improve productivity.
  • OCR Vision API are budget friendly and very affordable
  • OCR API is filled with Security and encryption
  • OCR API help in automating the GRN Process, 3 way matching reduce invoice entry time.
  • OCR API improves operational efficiency, within the company by reducing data entry errors and optimizing output.

Masters India OCR API

Masters India OCR API is perfect for fast text recognition and data extraction from receipts, and invoices, these APIs are Powered by machine learning.  

The optical character recognition API extracts enrich and categorizes details from unstructured digital or handwritten invoices, Into structured editable data and This OCR API is fast, gives you output in JSON for efficient communication.

  1. Submit files any time via API at your end
  2. Fast processing of doc for extraction
  3. JSON output can be used as per choice in the form
  4. Real-time OCR API will convert Documents into structured data within a few seconds.

Masters India OCR API for Real-Time Data Extractions

Masters India offers OCR API offers true real-time data extraction from invoices, these API will get integrated into your existing Solution or ERP such as SAP Oracle, Microsoft, and others.

These OCR Vision API extract over 50+ different field data (Including line items) and this advanced OCR free API also extracts the data from not only digital invoices but also handwritten ones.

Try Now

OCR API Documentation

  • Visit below API doc link to see code examples for making API requests to Masters India OCR: View Documents

How Masters India OCR API is different from Free OCR API

  Masters India OCR API Image OCR API
Data Formatting Yes NA
Cost-effective & Time Saving Yes NA
Training required Less Yes
Self-learning AI Yes NA
Template setup required No Yes
Integrate with system Yes N

 

 

 

 

 

 



How to try Free OCR API?

Now it's time to get started: Below you will find an example and document links that will help you in set up OCR API over Postman. In addition to connecting to our OCR servers, you can also directly buy these API and integrate them at your System or ERP and start using them.

Below Steps will explain the whole process of how you can Test OCR free API over Postman and in your ERP. To Try Our image OCR API at your own Invoice over Postman you require a token - 

  • You require credentials - Generate token by using credential
  • Download the Postman
  • Setup - View OCR API documentation  - Follow the steps mentioned in the documents
  • Generate token
  • Upload file either PDF/Image
  • Get Results

Once checked, go ahead and register on the Masters India website to get the necessary tokens. You will need your username, Password to access the token. This is a synchronous API call, which returns all the data extracted in ~10 -15 seconds for a single-page document. Each additional page for PDF documents may take another 3 – 4 seconds per page.

  • Masters India OCR API can capture data from receipts and invoices of formats: jpg, png, and pdf.
  • OCR vision API returns results in JSON format. The result typically contains the field name its value & Accuracy as visible in response.

Test Free OCR API with the Postman App

Use the free Postman app for Windows, Mac, and Linux to test the Masters India free OCR API. If you have Postman installed you can click the "Run in Postman" button above to add these two OCR vision APIs into Postman.  

Video - Below Video will help you to complete the setup over Postman

https://drive.google.com/file/d/1okynfsI-8gvERXlA555ffoCYbuaXM9Uz/view?usp=sharing 

OCR vision API - to be used in Postman 

Auth - https://api-platform.mastersindia.co/api/v1/token-auth/
Upload - https://api-platform.mastersindia.co/api/v1/ocr/upload/


Auth API -  https://api-platform.mastersindia.co/api/v1/token-auth/


Method Type  - POST

  • Header

    • Authorization: JWT

    • Subid: 657

    • Productid: arap

  • Body
    • Add credentials in Body
      {
          "username": "*********@mastersindia.co",
          "password": "***********"
      }
  • Hit Send button 
    JWT token will get Generated - Copy & paste it Into the header section of the Upload API

Authentication

Masters India supports access-token-based authentication. To our user, our OCR API requires an access_token from a user after validating his credentials. This key can be used in subsequent requests but expires after 24 hours which must be requested again by hitting again. The key needs to be passed as a request parameter. 

To generate the Authorization token by clicking on the Send button. Once the Token Is generated Then paste it in Upload API.

Upload API - https://api-platform.mastersindia.co/api/v1/ocr/upload/

Method Type  - POST

  • Header
    • Authorization: JWT Token value
    • Subid: 657
    • Productid: arap
  • Body
    • File_url: Upload file 
      • Upload file  - The document Type you can upload are - PDF/JPEG/PNG
  • Hit Send button
    Within a few seconds, results will be visible in Postman JSON from

Below Field Data It Will Extract  From Invoice Are Listed Below

Results Parameters

invoice_number
po_number
payment_term
e-waybill_number
irn
vehicle_number
document_type

invoice_date
payment_due_date

buyer_name
buyer_gstin
buyer_pan_number
buyer_address

ship_to_name
shipping_address
ship_to_gstin
place_of_supply

supplier_name
supplier_gstin
supplier_pan_number
supplier_address
supplier_phone
supplier_email

total_taxable
total_discount_amount
total_cgst_rate
total_sgst_rate
total_igst_rate
total_cgst_amount
total_sgst_amount
total_igst_amount
cess_rate
total_cess_amount
invoice_amount
other_charges

bank_name
account_number
ifsc_iban

Table data
item_sku
item_code
item_hsn
item_description
item_quantity
item_uom
item_unit_price
item_taxable_value
item_discount_rate
item_discount_value
item_cgst_rate
item_sgst_rate
item_igst_rate
item_cgst_value
item_sgst_value
item_igst_value
item_cess_rate
item_cess_value
item_total_amount

You can try out these OCR API to automate the data extraction

Try Now

Response - (JSON Format)

Below is a JSON example of the data extracted from an invoice: Success Response for free OCR API will show data of  Both key-value pair as well as Line item data. 

{
    "status": true,
    "message": "Data Extracted Successfully!",
    "data": {

 "invoice_number": {
            "value": "BDT/054",
            "accuracy": 99.98
        },
        "po_number": {
            "value": "PO/018/0220",
            "accuracy": 97.2
        },
        "invoice_date": {
            "value": "2-Mar-2020",
            "accuracy": 99.99
        },
        "invoice_due_date": {
            "value": "17-03-2020",
            "accuracy": 86.89
        },
        "payment_terms": {
            "value": "15",
            "accuracy": 86.89
        },
        "irn": "",
        "ewaybill_number": "",
        "supplier_gstin": {
            "value": "29AAMFB9996N1Z5",
            "accuracy": 99.99
        },
        "supplier_name": {
            "value": "BlueDot Technologies",
            "accuracy": 99.81
        },
        "buyer_gstin": {
            "value": "29AAECA7764Q1ZS",
            "accuracy": 99.97
        },
        "buyer_name": {
            "value": "BIZZWORLD TECHNOLOGIES PRIVATE LIMITED",
            "accuracy": 73.46
        },
        "ship_to_gstin": "",
        "total_taxable": {
            "value": 28900.0,
            "accuracy": 99.91
        },
        "total_igst": {
            "value": 0.0,
            "accuracy": 96.81
        },
        "total_cgst": {
            "value": 2601.0,
            "accuracy": 99.9
        },
        "total_sgst": {
            "value": 2601.0,
            "accuracy": 99.76
        },
        "total_cess": "",
        "total_tax_amount": {
            "value": 5202.0,
            "accuracy": 99.76
        },
        "invoice_amount": {
            "value": 34102.0,
            "accuracy": 99.67
        },
        "other_charges": "",
        "discount": ""
    },
    "table_data": [
        [
            {
                "item_hsn": {
                    "value": "85176990",
                    "accuracy": 92.89
                },
                "item_rate": {
                    "value": 18.0,
                    "accuracy": 82.39
                },
                "item_quantity": {
                    "value": 6.0,
                    "accuracy": 99.61
                },
                "item_unit_price": {
                    "value": 3350.0,
                    "accuracy": 99.9
                },
                "item_description": {
                    "value": "Tplink Outdoor Accesspoint",
                    "accuracy": 99.98
                },
                "item_total_amount": {
                    "value": 20100.0,
                    "accuracy": 99.3
                }
            },
            {
                "item_hsn": {
                    "value": "85176290",
                    "accuracy": 92.88
                },
                "item_rate": {
                    "value": 18.0,
                    "accuracy": 83.18
                },
                "item_quantity": {
                    "value": 8.0,
                    "accuracy": 99.85
                },
                "item_unit_price": {
                    "value": 1100.0,
                    "accuracy": 99.74
                },
                "item_description": {
                    "value": "TP LINK POE INJECTOR",
                    "accuracy": 99.92
                },
                "item_total_amount": {
                    "value": 8800.0,
                    "accuracy": 99.94
                }
            }
        ]
    ]
}
 

OCR API Code Example for Postman

Authorization

Generate JWT Token
 

 

Add token

Upload file

OCR API to for response

How does Masters India Image OCR API work?

Masters India API has two tiers  FREE OCR API & Paid OCR API 

  1. FREE OCR API - To Get Your OCR free API Key
    Visit the Masters India website submit a request and get your free OCR API key. The free OCR API plan has a rate limit of 150 requests within one month per IP address to prevent spamming.

  2. Paid OCR API
    Another one is Paid Plan or Enterprise OCR API License. Here businesses can purchase the OCR API as per their requirement or business case for their desired time duration. Paid API can also integrate into the respective system for better use.

Check How Paid & Free OCR API Plans Are Different

OCR API Plan Included

Free OCR API

Paid OCR API

Pricing

Free

Custom

Sign-Up

& Get API Key

Try Now

Contact Sales

Monthly Volume

Up to 150

Custom

Includes the number of fields

49

49+ On Demand

if Exceed Plan

NA

Price per page

Line-Item Extractions

YES

YES

Additional fields

NA

Included

File Size Limit

10 MB

40 MB

PDF/Image Page Limit

5

Unlimited

Response Time Per page

10 SEC

10 SEC

Additional Page

2-4 SEC

2-4 SEC

Doc Limit

5 calls/DAY

Custom

Extra fields

NA

3 to 7 custom

Service-level agreement (SLA)

NA

Yes

Doc Training

NA

Unlimited

Bulk Invoices

NA

Yes

Support

NA

Yes

Integration System & ERP

NA

Yes

Table data - Line item

Yes

Yes

Connect with E way

NA

Yes

Integrations with ERPs

NA

Yes

Access Annotation services

NA

Yes

API runs 

Same Server

Same Server

 

  • If the user reaches the assigned limit, Masters India salespeople will contact you and you will be charged as per the price decided at the time of sign-up.
  • For Paid Plans, OCR API consumption users can track on daily basis for the purchase period by login into the account.
  • Consumption tracking is possible even if the API is integrated with any ERP or system.

Post Parameters

The table below lists all possible parameters for both OCR APIs. we have published As additional documentation, that you can use for Postman. And last but not least: you can try our OCR API on your invoice. Our free OCR API form on the OCR page is nothing else than a POST call to the free OCR API endpoint and can be used for free testing.

API

Headers

Key

Value

Description

Auth

Headers

Authorization

JWT

Get your creds for JWT token - contact sales

 

body

raw

Username & Password

required to generate the tokens that could be used to extract data.

Upload

Headers

Authorization

JWT Token Value

past the tokne genrate in auth API

   

SubId

656

 
   

Productid

arap

if given then it will pass the object otherwise throw an error of non-type object having no attribute id.

 

body

file url

file: Select file

You can use these methods to upload an image or PDF.

   

language

English

The language used for OCR. currently, English is taken as default.

   

isOverlayRequired

[Optional] true/false - automatic

Default = true

If true, OCR will show the coordinates of the bounding boxes for each word in the past. If false, the OCR'ed text is returned only as a text block (this will make the JSON response smaller).

   

filetype

String value: PDF, PNG, JPG

Overwrites the automatic file type detection based on content type -just pass the key file_url in the body of the upload API. Supported image file formats are png, and jpg (jpeg). For documents, OCR API supports the PDF format of one & Multi-page as well.

   

detectOrientation

[Optional] true/false - automatic

The OCR API autorotates the image or pdf correctly and sets the TextOrientation parameter in the JSON response.

   

scale

[Optional] true/false - automatic

If set to true, the api does this for internal upscaling. This can improve the OCR result significantly, especially for low-resolution PDF scans or images, but we suggest a minimum 300 DPI pdf for better results.

   

isTable

[Optional] true/false - automatic

by default in OCR table extraction is set for invoice & receipt processing and all other types of input documents that have a table-like structure. If set to true, the OCR logic always makes sure that the parsed text of a particular invoice's result is always returned line by line.

   

OCREngine

Default update one

Updated is ocr engine used to extract

OCR Engine

Masters India Amazon Textract as an optical character recognition (OCR) engine to extract text from documents. The information returned in multiple Block objects includes the lines and words of detected text, the relationships between the lines and words of detected text, the page that the detected text appears on and the location of the lines and words of text on the document page. The OCR engine is designed to handle a wide variety of document types, including scanned documents, PDFs, and images, and can recognize text that is handwritten as well. This OCR engine uses machine learning algorithms to accurately identify and extract text from documents, even in cases where the text is obscured or distorted. Overall, Textract's OCR engine is a powerful tool for extracting text and data from a wide variety of document types.

Features of OCR Engine:

  • Fastest OCR
  • Supports larger images or multi-page pdf files
  • Accuracy improved

Use cases

Here are some use cases of OCR APIs of how you can extract data from unstructured documents and convert them into structured documents/editable format:-

  1. Accounts payable/Account & finance team
  2. Tech companies 
  3. Banking
  4. Government Public sector units
  5. Inra or construction companies
  6. Delivery
  7. Logistics
  8. Healthcare
  9. Manufacturing

Best OCR APIs of 2023

The below list will give the name of the best OCR API some of them could be available as free OCR API as well these API has quality Auto-detect language, give you a response in multiple languages, provide some free tier as well and have fasters response, Text annotation (all text as one string)

  • Masters India OCR API
  • Google Cloud Vision
  • Sema Media Data
  • Taggun
  • Cloudmersive
  • Microsoft Computer Vision

If you would like to Try out our OCR API on your Invoices. Visit Masters India OCR Software Page and a Request Callback.

Try Now

Frequently asked questions
How useful was this post?
Click on a star to rate it!
Average rating 4.70 / 5. Vote count: 1414

Search Your interest

Invoice OCR Software

Use AI & ML powered OCR software or APIs to extract data from Invoices.

You can also get latest updates on Whatsapp!

Browse other topics

Invoice OCR Software
Try out Masters India OCR software on your Invoices see the results without registration, you can drag and drop your invoices in live solution and get result by hitting try now button.
Check out other Similar Posts
No Data found
No articles found