📊 NCB Credit Report OCR
ยินดีต้อนรับสู่ NCB Credit Report OCR API ซึ่งเป็นส่วนหนึ่งของ iApp Any Documents OCR โดย บริษัท ไอแอพพ์เทคโนโลยี จำกัด แยกข้อมูลเมตาของรายงาน ข้อมูลประจำตัวเจ้าของ และสรุปต่อบัญชีจากรายงานของ National Credit Bureau (บริษัท ข้อมูลเครดิตแห่งชาติ) รวมถึงรายงาน PDF หลายหน้า
ลองใช้ Demo!
ทดลองใช้ AI Demo
เข้าสู่ระบบหรือสร้างบัญชีฟรีเพื่อใช้งาน AI Demo และสำรวจ API ที่ทรงพลังของเรา
รับ 50 เครดิตฟรี (IC) เมื่อสมัครสมาชิก!
โปรโมชันหมดเขต 31 ธันวาคม 2568
เริ่มต้นใช้งาน
-
ข้อกำหนดเบื้องต้น
- คีย์ API จาก iApp Technology
- ไฟล์เอกสาร: รายงานเครดิต NCB (รายงานข้อมูลเครดิต (เครดิตบูโร))
- รูปแบบไฟล์ที่รองรับ: PDF, JPG, JPEG, PNG, WEBP
- ขนาดไฟล์สูงสุด: 50MB
-
เริ่มต้นใช้งานอย่างรวดเร็ว
POSTครั้งเดียวพร้อมmultipart/form-data- เอาต์พุต JSON แบบมีโครงสร้าง พร้อมคะแนนความเชื่อมั่นต่อฟิลด์
- ไฟล์ PDF หลายหน้าจะถูกรวมเข้าด้วยกันในรายการ
docsเดียว
-
คุณสมบัติหลัก
- การแยกข้อมูลระดับฟิลด์พร้อมคะแนนความเชื่อมั่น
- เอาต์พุตภาษาไทยและอังกฤษผ่าน
target_lang - ข้อความ OCR ดิบแบบเลือกได้ผ่าน
return_ocr - รองรับทั้งภาพถ่ายและ PDF ที่สแกน
-
ความปลอดภัยและการปฏิบัติตามกฎระเบียบ
- เป็นไปตาม GDPR และ PDPA
- Endpoint API ที่ปลอดภัย
- ไม่มีบันทึกข้อมูลหลังการประมวลผล
โปรดไปที่หน้า การจัดการ API Key เพื่อดู API Key ที่มีอยู่ของคุณ หรือขอใหม่
Endpoint API
| Endpoint | Method | คำอธิบาย | ค่าใช้จ่าย |
|---|---|---|---|
/ocr/v3/ncb-credit-report/file/v3/store/ocr/ncb-credit-report | POST | แยกข้อมูลเมตาของรายงาน ข้อมูลประจำตัว และสรุปต่อบัญชีจากรายงานเครดิต NCB | 1 IC ต่อหน้า |
ทั้งสองรูปแบบมีความเหมือนกัน ไม่มีรูปแบบ base64 สำหรับ Endpoint นี้ — รองรับเฉพาะการอัปโหลดไฟล์
คำขอ
ส่วนหัวของคำขอ
| ส่วนหัว | ค่า | จำเป็น |
|---|---|---|
apikey | คีย์ API iApp ของคุณ | ใช่ |
เนื้อหาคำขอ (multipart/form-data)
| พารามิเตอร์ | ประเภท | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|
file | ไฟล์ (ทำซ้ำได้) | — | จำเป็น. ไฟล์เอกสาร หน้า PDF จะถูกประมวลผลโดยอัตโนมัติ |
return_ocr | บูลีน | false | รวมข้อความ OCR ดิบในการตอบกลับ |
target_lang | สตริง | th | ภาษาของค่าที่แยกออกมา: th หรือ en |
include_confidence | บูลีน | true | รวมคะแนนความเชื่อมั่นต่อฟิลด์ (0.00–1.00) |
cURL
curl -X POST "https://api.iapp.co.th/ocr/v3/ncb-credit-report/file" \
-H "apikey: YOUR_API_KEY" \
-F "file=@/path/to/document.pdf" \
-F "target_lang=th" \
-F "include_confidence=true"
การตอบกลับ
{
"docs": [
{
"message": "success",
"raw": {},
"processed": {
"report_number": "123456789",
"reference_number": "MOBILE_APP-001",
"query_date": "24 ต.ค. 2562 11:09:43",
"id_card_number": "1100000000001",
"full_name": "นาย สมชาย ตัวอย่าง",
"date_of_birth": "11 เม.ย. 2529",
"total_accounts": 6,
"accounts_under_dispute": 0,
"accounts": [
{
"lender_name": "ธนาคารตัวอย่าง",
"credit_type": "สินเชื่อที่อยู่อาศัย",
"account_status": "ปกติ",
"credit_limit": 3000000,
"outstanding_balance": 2500000
}
]
},
"confidence": {
"report_number": 0.95,
"reference_number": 0.95,
"query_date": 0.95,
"id_card_number": 0.95,
"full_name": 0.95,
"date_of_birth": 0.95
},
"process_ms": 4120
}
],
"docs_count": 1,
"process_ms": 4300
}
ส่วนหัวการตอบกลับ iapp-input-pages จะรายงานจำนวนหน้าที่ถูกเรียกเก็บเงิน
ฟิลด์ที่รองรับ
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| report_number | String | หมายเลขรายงาน |
| reference_number | String | หมายเลขอ้างอิง |
| query_date | String | วันที่และเวลาที่ขอรายงาน |
| id_card_number | String | เลขประจำตัวประชาชนไทย 13 หลักของเจ้าของข้อมูล |
| full_name | String | ชื่อ-นามสกุลเต็มของเจ้าของข้อมูล |
| date_of_birth | String | วันเกิด |
| total_accounts | Integer | จำนวนบัญชีสินเชื่อทั้งหมด |
| accounts_under_dispute | Integer | จำนวนบัญชีที่อยู่ระหว่างการโต้แย้ง |
| accounts | Array | สรุปต่อบัญชี — แต่ละรายการมี lender_name, credit_type, account_status, credit_limit, outstanding_balance |
การจัดการข้อผิดพลาด
| สถานะ | ความหมาย |
|---|---|
| 400 | นามสกุลไฟล์ไม่รองรับ หรือไฟล์ใหญ่เกิน 50MB |
| 401 | apikey ขาดหายไปหรือไม่ถูกต้อง |
| 402 | ยอดเครดิตคงเหลือไม่เพียงพอ |
| 404 | ประเภทเอกสารใน URL ไม่รู้จัก |
| 422 | ไม่ได้แนบไฟล์มากับคำขอ |
| 500 | ข้อผิดพลาดในการประมวลผล — การตอบกลับมีรหัสข้อผิดพลาดที่จะแจ้งให้ฝ่ายสนับสนุนทราบ |
ตัวอย่างโค้ด
Python
import requests
url = "https://api.iapp.co.th/ocr/v3/ncb-credit-report/file"
headers = {"apikey": "YOUR_API_KEY"}
files = {"file": open("document.pdf", "rb")}
data = {"target_lang": "th", "include_confidence": "true"}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(result["docs"][0]["processed"])
print(result["docs"][0]["confidence"])
JavaScript
const form = new FormData();
form.append("file", fileInput.files[0]);
form.append("target_lang", "th");
form.append("include_confidence", "true");
const res = await fetch("https://api.iapp.co.th/ocr/v3/ncb-credit-report/file", {
method: "POST",
headers: { apikey: "YOUR_API_KEY" },
body: form,
});
const result = await res.json();
console.log(result.docs[0].processed);
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.iapp.co.th/ocr/v3/ncb-credit-report/file");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["apikey: YOUR_API_KEY"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
"file" => new CURLFile("/path/to/document.pdf"),
"target_lang" => "th",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Java
OkHttpClient client = new OkHttpClient();
RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("file", "document.pdf",
RequestBody.create(new File("/path/to/document.pdf"),
MediaType.parse("application/pdf")))
.addFormDataPart("target_lang", "th")
.build();
Request request = new Request.Builder()
.url("https://api.iapp.co.th/ocr/v3/ncb-credit-report/file")
.addHeader("apikey", "YOUR_API_KEY")
.post(body)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
Swift
let url = URL(string: "https://api.iapp.co.th/ocr/v3/ncb-credit-report/file")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("YOUR_API_KEY", forHTTPHeaderField: "apikey")
let boundary = UUID().uuidString
request.setValue("multipart/form-data; boundary=\(boundary)",
forHTTPHeaderField: "Content-Type")
var data = Data()
let fileData = try Data(contentsOf: URL(fileURLWithPath: "/path/to/document.pdf"))
data.append("--\(boundary)\r\n".data(using: .utf8)!)
data.append("Content-Disposition: form-data; name=\"file\"; filename=\"document.pdf\"\r\n\r\n".data(using: .utf8)!)
data.append(fileData)
data.append("\r\n--\(boundary)--\r\n".data(using: .utf8)!)
URLSession.shared.uploadTask(with: request, from: data) { responseData, _, _ in
if let responseData, let json = String(data: responseData, encoding: .utf8) {
print(json)
}
}.resume()
Kotlin
val client = OkHttpClient()
val body = MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart(
"file", "document.pdf",
File("/path/to/document.pdf").asRequestBody("application/pdf".toMediaType())
)
.addFormDataPart("target_lang", "th")
.build()
val request = Request.Builder()
.url("https://api.iapp.co.th/ocr/v3/ncb-credit-report/file")
.addHeader("apikey", "YOUR_API_KEY")
.post(body)
.build()
client.newCall(request).execute().use { response ->
println(response.body?.string())
}
Dart
import 'package:http/http.dart' as http;
final request = http.MultipartRequest(
'POST',
Uri.parse('https://api.iapp.co.th/ocr/v3/ncb-credit-report/file'),
);
request.headers['apikey'] = 'YOUR_API_KEY';
request.fields['target_lang'] = 'th';
request.files.add(
await http.MultipartFile.fromPath('file', '/path/to/document.pdf'),
);
final response = await request.send();
print(await response.stream.bytesToString());