Skip to main content

📚 Thai Bank Book OCR

📚 สมุดบัญชีธนาคาร

Version Status New

Welcome to Thai Bank Book OCR API, version 2.0, an AI product developed by iApp Technology Co., Ltd. Our API is designed to extract text information from Thai bank book images with high accuracy and speed. The API supports JPEG, JPG, PNG file formats and can process bank book images in 1-2 seconds.

Try Demo

Visit our API Portal to test the Bank Book OCR API with your own images.

Getting Started

  1. Prerequisites

    • An API key from iApp Technology
    • Thai bank book images
    • Supported file formats: JPEG, JPG, PNG
    • Maximum file size: 2MB
  2. Quick Start

    • Fast processing (1-2 seconds per image)
    • High accuracy text extraction (93% overall accuracy)
    • Support for multiple Thai banks
  3. Key Features

    • Detailed field extraction including:
      • Bank name
      • Account number
      • Account name
      • Bank branch
    • Signature detection
    • Reason codes for failure cases
    • Flexible JSON response format
  4. Security & Compliance

    • GDPR and PDPA compliant
    • No data retention after processing
How to get API Key?

Please visit API Portal to view your existing API key or request a new one.

Code Examples

Bank Book Sample

Bank Book Example

Request:

    curl -X POST https://api.iapp.co.th/bank-book/v2.0/ocr
-H "apikey: YOUR_API_KEY"
-F "file=@/path/to/bankbook.jpg"

Response:

{
"status": "success",
"processing_time": 1.2,
"bank_name": "ไทยพาณิชย์ (SCB)",
"account_number": "XXX-X-XXXXX-X",
"account_name": "บริษัท ไอแอพพ์เทคโนโลยี จำกัด",
"bank_branch": "ฟิวเจอร์ พาร์ค รังสิต",
"signature_detected": true
}

Features & Capabilities

Core Features

  • Text extraction from bank book images
  • Signature detection
  • Multiple bank support
  • Fast processing time
  • High accuracy

Supported Fields

  • Bank name
  • Account number
  • Account name
  • Bank branch
  • Signature verification

Supported Banks

  • SCB
  • Bangkok Bank
  • Krungthai Bank
  • Kasikorn Bank
  • Krungsri Bank (Bank of Ayudhya)
  • TMB Bank

API Reference

Recognizing Bank Book

Code Examples

Python

    import requests

url = "https://api.iapp.co.th/bank-book/v2.0/ocr"
payload = {}
files = {"file": ("bankbook.jpg", open("bankbook.jpg", "rb"))}
headers = {"apikey": "YOUR_API_KEY"}

response = requests.post(url, headers=headers, data=payload, files=files)
print(response.json())

JavaScript

const axios = require("axios")
const FormData = require("form-data")
const fs = require("fs")

let data = new FormData()
data.append("file", fs.createReadStream("bankbook.jpg"))

let config = {
method: "post",
url: "https://api.iapp.co.th/bank-book/v2.0/ocr",
headers: {
apikey: "YOUR_API_KEY",
...data.getHeaders(),
},
data: data,
}

axios(config)
.then((response) => console.log(response.data))
.catch((error) => console.log(error))

PHP

<?php
$curl = curl_init();

$file = new CURLFile('bankbook.jpg');

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iapp.co.th/bank-book/v2.0/ocr',
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' => $file),
CURLOPT_HTTPHEADER => array(
'apikey: YOUR_API_KEY'
),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

Swift

import Foundation

let headers = [
"apikey": "YOUR_API_KEY"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.iapp.co.th/bank-book/v2.0/ocr")! as URL)

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest) { (data, response, error) -> Void in
if let error = error {
print(error)
} else {
if let data = data {
do {
let json = try JSONSerialization.jsonObject(with: data, options: [])
print(json)
} catch {
print(error)
}
}
}
}
dataTask.resume()

Kotlin

val client = OkHttpClient()

val requestBody = MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("file", "bankbook.jpg",
File("bankbook.jpg").asRequestBody("image/jpeg".toMediaTypeOrNull())
)
.build()

val request = Request.Builder()
.url("https://api.iapp.co.th/bank-book/v2.0/ocr")
.addHeader("apikey", "YOUR_API_KEY")
.post(requestBody)
.build()

client.newCall(request).execute().use { response ->
println(response.body?.string())
}

Java

OkHttpClient client = new OkHttpClient().newBuilder().build();

RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("file", "bankbook.jpg",
RequestBody.create(MediaType.parse("image/jpeg"), new File("bankbook.jpg")))
.build();

Request request = new Request.Builder()
.url("https://api.iapp.co.th/bank-book/v2.0/ocr")
.addHeader("apikey", "YOUR_API_KEY")
.post(body)
.build();

Response response = client.newCall(request).execute();
System.out.println(response.body().string());

Dart

var request = http.MultipartRequest('POST',
Uri.parse('https://api.iapp.co.th/bank-book/v2.0/ocr'));

request.files.add(await http.MultipartFile.fromPath('file', 'bankbook.jpg'));
request.headers.addAll({
'apikey': 'YOUR_API_KEY'
});

var response = await request.send();
var responseBody = await response.stream.bytesToString();
print(responseBody);

Limitations and Best Practices

Limitations

  • Maximum file size: 10MB
  • Supported file formats: JPEG, JPG, PNG
  • Supports Thai bank books only
  • Handwritten signature detection only

Best Practices

  • Ensure good lighting conditions
  • Avoid tilted or rotated images
  • Keep bank book flat when capturing
  • Ensure all text is clearly visible
  • Avoid shadows and glare

Accuracy & Performance

Overall Accuracy

  • Version 2.0: 93%
  • Bank Name: 99.5%
  • Account Number: 96.82%
  • Account Name: 52.56%
  • Bank Branch: 63.12%

Processing Speed

  • Average: 1-2 seconds per image
  • Depends on image size and quality

Factors Affecting Accuracy

  • Image quality
  • Lighting conditions
  • Image orientation
  • Text clarity
  • Bank book condition

History

Version 2.0 (August 2022)

  • Added signature detection
  • Overall accuracy improved to 93%
  • Added API option for signature detection

Version 1.3 (June 2022)

  • Added reason codes
  • Improved bank branch and account name recognition
  • Overall accuracy: 90%

Version 1.2 (May 2022)

  • Improved bank branch and account name recognition
  • Overall accuracy: 85%

Version 1.1 (April 2022)

  • Improved account number recognition by 8%
  • Improved bank name recognition by 4%
  • Overall accuracy: 78%

Version 1.0 (March 2022)

  • Initial release
  • Support for major Thai banks
  • Basic field extraction capabilities
  • Overall accuracy: 74.85%

Pricing

AI API Service NameEndpointIC Per RequestOn-Premise
Book Bank OCRiapp_book_bank_ocr_v11.25 IC/RequestContact