Bank Passbook OCR API

The Bank Passbook OCR API allows users to extract bank passbook details automatically from uploaded passbook images or documents using OCR technology. It retrieves structured information such as account holder name, account number, IFSC code, branch details, transaction information, and other available banking details quickly and accurately in JSON format.

API Details

Request URL

POST
https://g99.in/api/ocr/passbookocr
Copied!

Request Body Parameters

Type Name Optional Description
File file Required Upload the Bank Pass Book image.

Request Header Parameters

Type Name Value / Description Optional
String Content-Type multipart/form-data Required

Sample Code

request.php
Copied!
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://g99.in/api/ocr/passbookocr',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('file'=> new CURLFILE(' --Uploaded File Path-- ')),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
request.py
Copied!
import requests

url = "https://g99.in/api/ocr/passbookocr"

payload = {}
files=[
  ('file',('Screenshot 2026-03-27 171219.png',open(' --Uploaded File Path-- ','rb'),'image/png'))
]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
request.cs
Copied!
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://g99.in/api/ocr/passbookocr");
var content = new MultipartFormDataContent();
content.Add(new StreamContent(File.OpenRead(" --Uploaded File Path-- ")), "file", " --Uploaded File Path-- ");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Response

HTTP status code 200

Key Type Description
customerId String Unique customer identification number assigned by the bank.
name String Name of the account holder.
accountNumber String Bank account number of the customer.
address String Residential address of the account holder.
branch String Name of the bank branch.
ifsc String IFSC code of the bank branch.
micr String MICR code used for banking transactions and cheque processing.
branchAddress String Address of the bank branch.
opened Date Date on which the bank account was opened.

Sample Response

Sample response for valid document

response.json
Copied!
{
    "valid": true,
    "message": null,
    "data": {
        "customerId": "3333094444",
        "name": "Reena",
        "accountNumber": "1234567890",
        "address": "1, Main Road Prakash Nagar Rajahnundry East Godavari D ist. Andhra Pradesh 533113",
        "branch": "PRAKASH NAGAR(1220)",
        "ifsc": "IDIB000P121",
        "micr": null,
        "branchAddress": "1, Main Road Prakash Nagar Rajahnundry East Godavari D ist. Andhra Pradesh 533113",
        "opened": "14/02/2020"
    }
}

Error Response

Parameter Type Description
status Number Unique error codes for different errors. Always available.
message String Error message describing the error. Always Available.
error Boolean True / False for different errors. Always available.

Error Codes

HTTP Status Error Code Error Message
400 4001 Malformed data or missing required parameter values.
400 4002 File size exceeds 10MB limit.
400 4003 Only JPEG and PNG images are supported.
400 4004 Invalid or corrupted image.
400 4005 Minimum image size should be 200 X 200 pixels.
500 5001 Document processing service is currently unavailable. Please try again later.

Sample Error Response

response.json
Copied!
{
  "message": "Invalid or corrupted image.",
  "status": 4004,
  "error": True
}

Constraints

  • Only JPEG, PNG images are supported.

  • Minimum image size is 200x200 png for better identification and parsing.

  • Maximum allowed image size is 10 MB.