Skip to content
FinHubBy HabileLabs

API Category · Document Intelligence

Thirty-one document types, one integration, one response shape. Turn a photographed Aadhaar, a scanned cheque or a 40-page bank statement into structured fields your systems can act on.

In short

An AI document OCR API extracts structured fields from a photographed or scanned document and returns them as JSON. FinHub covers 31 Indian document types across identity, banking, tax and business categories — models trained on Indian layouts return named fields rather than raw text, with consent captured and every call written to a tamper-evident audit log.

  • 31 document types read by models trained on Indian layouts and scripts
  • Named fields in the response, not a blob of raw text to parse yourself
  • Built for Indian document layouts, regional scripts and phone-camera captures
  • Consent artefact on every call and a tamper-evident audit trail

Reference

What each API returns

The endpoint and the fields that come back, so you can size the integration before you write any code.

APIEndpointKey fields returned
Aadhaar MaskingPOST /v1/documents/aadhaar/maskMasked document (last 4 digits visible) · Detected-number locations · Masking audit record
Document OCRPOST /v1/documents/ocrStructured fields (name, DOB, number, address…) · Document classification · Confidence scores · Tamper / authenticity signals
PAN OCRPOST /v1/ocr/panPAN number · Cardholder name · Date of birth · Document quality score · Tamper/quality flags
Aadhaar OCRPOST /v1/ocr/aadhaarAadhaar number (maskable) · Name · Date of birth · Address · Document quality flags
Passport OCRPOST /v1/ocr/passportPassport number · Name and gender · Date of birth · Address · Expiry date and place of birth
Voter ID OCRPOST /v1/ocr/voter-idEPIC number · Name · Date of birth · Document quality score · Tamper/quality flags
Driving License OCRPOST /v1/ocr/driving-licenseLicence number · Name · Date of birth · Expiry date · Document quality flags
Bank Statement OCRPOST /v1/ocr/bank-statementAccount holder and account number · IFSC and bank name · Transaction date, description and amount · Running balance · Document quality flags
Bank Cheque OCRPOST /v1/ocr/bank-chequeAccount number · IFSC code and bank name · Payee name and cheque number · Document quality flags
Cancelled Cheque OCRPOST /v1/ocr/cancelled-chequeAccount number · IFSC code and bank name · Account holder name (if printed) · Document quality flags
Salary Slip OCRPOST /v1/ocr/salary-slipEmployer name and employee ID · Earnings breakdown · Deductions breakdown · Net pay and pay period · Document quality flags
ITR OCRPOST /v1/ocr/itrPAN and filer name · Assessment year · Gross total income · Tax paid and refund details · Document quality flags
Invoice OCRPOST /v1/ocr/invoiceVendor name and GSTIN · Invoice number and date · Line items and total amount · Tax breakup (CGST/SGST/IGST) · Document quality score
Balance Sheet OCRPOST /v1/ocr/balance-sheetTotal assets and liabilities · Equity and reserves · Key line-item breakdown · Reporting period and currency · Document quality score
Utility Bill OCRPOST /v1/ocr/utility-billCustomer name and address · Service provider and account number · Bill date and due date · Billed amount · Document quality score
Insurance Policy OCRPOST /v1/ocr/insurance-policyInsurer name and policy number · Policyholder name · Sum assured and premium amount · Policy start and expiry dates · Document quality score
Mutual Fund OCRPOST /v1/ocr/mutual-fundFund house and scheme name · Folio number and investor name · Unit balance and NAV · Current market value · Document quality score
Passbook OCRPOST /v1/ocr/passbookAccount holder name · Account number and IFSC · Bank and branch name · Latest balance and transaction date · Document quality score
Pension Certificate OCRPOST /v1/ocr/pension-certificatePensioner name and PPO number · Sanctioning authority · Pension amount and category · Date of sanction · Document quality score
Death Certificate OCRPOST /v1/ocr/death-certificateDeceased name and registration number · Date and place of death · Issuing municipal or registrar authority · Date of registration · Document quality score
Shop Establishment OCRPOST /v1/ocr/shop-establishmentBusiness name and registration number · Registered address · Issuing authority and state · Validity or renewal date · Document quality score
KYC Form OCRPOST /v1/ocr/kyc-formCustomer name and address · PAN, Aadhaar or other ID numbers entered · Date of birth and contact details · Signature and form completeness status · Document quality score
Loan Agreement OCRPOST /v1/ocr/loan-agreementBorrower & lender name · Loan amount & currency · Tenure & interest rate · Repayment schedule · Field-level confidence scores
Legal Document OCRPOST /v1/ocr/legal-documentFull extracted text · Parties & signatories · Key dates & clause references · Document type classification · Processing status (sync/async)
Udyam Certificate OCRPOST /v1/ocr/udyam-certificateUdyam Registration Number (URN) · Enterprise name & type · Enterprise category (micro/small/medium) · Major activity · Registration date
GST Certificate OCRPOST /v1/ocr/gst-certificateGSTIN · Legal & trade name · Business constitution · Registration date · Principal place of business
Certificate of Incorporation OCRPOST /v1/ocr/incorporation-certificateCorporate Identification Number (CIN) · Registered company name · Company type & category · Date of incorporation · Registrar of Companies (RoC) jurisdiction
Credit Card OCRPOST /v1/ocr/credit-cardCard number · Cardholder name · Expiry date · Issuing network · Field-level confidence scores
Document to Text OCRPOST /v1/ocr/document-to-textFull extracted text · Per-line/word confidence scores · Detected language · Layout metadata
Document Quality CheckPOST /v1/ocr/document-quality-checkOverall quality score · Blur, glare & lighting flags · Crop / edge-detection status · Resolution assessment · Retake recommendation
Document IdentificationPOST /v1/ocr/document-identificationDetected document type · Classification confidence score · Side detection (front/back, where applicable) · Unsupported/ambiguous flag

What is a document OCR API, and how is it different from open-source OCR?

Optical character recognition turns pixels into characters. That is the easy half, and open-source engines like Tesseract or EasyOCR do it competently. The hard half is everything after: knowing that this rectangle is an Aadhaar and that one is a PAN, that the twelve digits in the corner are the Aadhaar number rather than an enrolment ID, that a Devanagari name and a Latin name on the same card refer to the same person, and that the document in front of you has been re-photographed off a screen.

A document OCR API sells you the second half. You send an image, you get named fields. There is no layout template to maintain when a state changes its driving-licence design, no regional-script model to fine-tune, and no separate tamper-detection step to build.

The honest trade-off: open-source OCR is free and runs entirely on your own hardware, which matters if data residency rules out sending documents anywhere. An API costs per call and puts a third party in the path of personal data. Which one is right depends on volume, the breadth of document types you handle, and whether you have the in-house computer-vision capacity to keep templates current.

Which Indian documents can be read via API?

Identity documents — Aadhaar, PAN, passport, voter ID and driving licence — plus their masked variants where regulation requires the number be redacted before storage.

Banking and financial documents: bank statements, passbooks, cheques and cancelled cheques, salary slips, ITR acknowledgements, balance sheets, credit-card statements and mutual-fund statements.

Business and statutory documents: GST certificates, Udyam registration certificates, incorporation certificates, shop-establishment licences, loan agreements and legal documents.

Two utility endpoints sit alongside them: document identification, which tells you what a file is before you route it, and document quality check, which rejects a blurred or cropped capture before it reaches a reviewer.

How accurate is OCR on Indian documents?

Accuracy is a property of the document and the capture, not of the API alone, so a single headline percentage is close to meaningless. A flatbed scan of a fresh PAN card and a phone photograph of a laminated Aadhaar taken in a branch at dusk are different problems.

The variables that actually move accuracy: capture resolution and glare, whether the document is an original or a photocopy of a photocopy, regional-script fields where the same name appears in two scripts, laminated cards that reflect flash, and older documents whose print has faded.

This is why the quality-check endpoint exists as a separate call. Rejecting a bad capture at the point of collection — while the customer is still in front of you — costs far less than discovering the problem in a review queue three days later.

Should you build OCR in-house or buy an API?

The build case is strongest when your document mix is narrow and stable. If you process two document types at high volume and their layouts rarely change, a fine-tuned open-source model on your own hardware is cheaper per call and keeps every image inside your network — which can be the deciding factor where data residency is contested.

The buy case strengthens with breadth and churn. Thirty-one document types means thirty-one layout families, several of which change when a state or an issuing authority redesigns a form. Each redesign is a silent accuracy regression until someone notices, and noticing usually means a customer complained. Maintaining that is a standing engineering commitment, not a project.

The cost comparison people get wrong is the review queue. An OCR system that is five points less accurate does not cost you five points of compute — it costs you the salaried human who reconciles every field it got wrong, at a volume that scales with your growth rather than with your infrastructure. Model that before comparing per-call prices.

The third option is worth naming: use open-source for the high-volume narrow case and an API for the long tail. There is no rule requiring one answer for every document type.

How should OCR fit into an onboarding flow?

The sequence that works is capture, check, extract, verify. Take the image, run the quality check while the customer is still present, extract the fields, then verify the extracted identifiers against source records before anything is approved.

Running the quality check first is the step teams skip and then regret. A blurred capture rejected in two seconds at the counter costs nothing; the same capture discovered in a review queue on Thursday costs a callback, a re-collection and a customer who has already started an application somewhere else.

Document identification belongs early too, particularly in flows where customers upload whatever they have. Routing on what the file actually is, rather than on the field the customer selected, removes a whole class of mis-filed uploads.

Extraction should pre-fill, never auto-approve on its own. OCR tells you what the document says. Verification tells you whether that is true. Approving on the first without the second is how a cleanly-read cancelled PAN gets through.

Is Aadhaar OCR legal, and how does DPDP apply?

Reading an Aadhaar with OCR is not the same act as authenticating one against UIDAI. OCR extracts what is printed on the card; it does not confirm with the issuing authority that the number is live and belongs to that person. If you need authoritative confirmation, that is an Aadhaar verification call, not an OCR call.

Under India's Digital Personal Data Protection Act, 2023, an Aadhaar image is personal data and, in practice, is treated with the care its sensitivity warrants. That means a lawful purpose, consent captured against that purpose, and only the fields you actually need retained.

Masking exists for that last point. Where you need to evidence that a document was seen without retaining the full number, the masking endpoint redacts the Aadhaar number in the stored artefact. Specific retention periods and notice requirements turn on the DPDP Rules and your own regulator's directions — confirm those with counsel rather than taking a vendor page as authority, this one included.

Compare

Aadhaar OCR vs Aadhaar XML vs DigiLocker vs offline eKYC

Four different ways to get Aadhaar data into your system, routinely confused because all four end with the same fields on screen. They differ in who vouches for the data and what the customer has to do.

MethodWho vouches for the dataCustomer effortBest for
OCR from an imageNobody — it is what the card saysPhotograph a cardFast capture, human review to follow
Aadhaar XML / offline eKYCUIDAI, via a digital signatureDownload a file and share a share-codeAssurance without an online auth call
DigiLockerThe issuing authority, via a signed documentLog in and grant accessMultiple documents in one consented flow
Online Aadhaar authenticationUIDAI, in real timeOTP or biometricHighest assurance, tightest eligibility rules

OCR is the fastest and the weakest evidentially. Pairing it with a verification call is the common pattern: OCR to capture and pre-fill, verification to confirm.

Terms

Terms worth getting right

The distinctions that decide whether a flow stands up under examination.

OCR vs ICR
OCR reads printed characters. ICR — intelligent character recognition — targets handwriting, which is materially harder and less reliable on forms filled in at a branch counter.
Masked Aadhaar
An Aadhaar image with the first eight digits obscured, leaving the last four visible. Used where you must evidence that a document was seen without retaining the full number.
Field extraction vs full-text OCR
Full-text OCR returns everything it can read as a string. Field extraction returns named values — name, number, date of birth — which is what a downstream system can actually consume without a parser.

FAQ

AI Document Intelligence & OCR — common questions

Yes. FinHub by Habilelabs provides document OCR APIs covering 31 Indian document types — identity, banking, tax, insurance and business registration documents — through a single integration, aimed at banks, NBFCs, insurers and fintechs operating in India.

Try it against your own documents

Sandbox access with your real document mix, so you can measure accuracy on your captures rather than ours.