🪪 Thai National ID Card OCR
1.25 ICper request (front)|0.75 ICper request (back)
Welcome to Thai National ID Card OCR API, version 3.5, an AI product developed by iApp Technology Co., Ltd. Our API is designed to extract text information from both the front and back face of Thai National ID card images with high accuracy and speed. Our API supports JPEG, JPG, PNG, HEIC, HEIF, and PDF file formats and can process an ID card image in 1-2 seconds.
Try Demo
Try Our AI Demo
Login or create a free account to use this AI service demo and explore our powerful APIs.
Get 100 Free Credits (IC) when you sign up!
Offer ends December 31, 2025
Getting Started
-
Prerequisites
- An API key from iApp Technology
- Thai national ID card images (front/back)
- Supported file formats: JPEG, JPG, PNG, HEIC, HEIF, PDF
- Maximum file size: 10MB
-
Quick Start
- Fast processing (1-2 seconds per card)
- High accuracy text extraction (98.13% at character level)
- Support for multiple file formats
-
Key Features
- Detailed field extraction including:
- ID number
- Full name (Thai and English)
- Date of birth
- Religion
- Address
- Issue and expiry dates
- Support for both front and back of ID cards
- Option to return original OCR text and processed images
- Flexible JSON response format
- Detailed field extraction including:
-
Security & Compliance
- GDPR and PDPA compliant
- No data retention after processing
How to get API Key?
Please visit API Key Management page to view your existing API key or request a new one.
Example
Front side
Request:
curl -X POST https://api.iapp.co.th/v3/store/ekyc/thai-national-id-card/front
-H "apikey: YOUR_API_KEY"
-F "file=@/path/to/idcard.jpg"
Response:
{
"address": "XXXXXX XXXX X ต.หนองปรือ อ.บางละมุง จ.ชลบุรี",
"alley": "",
"detection_score": 0.981011797984441,
"district": "บางละมุง",
"en_dob": "XX Mar 1957",
"en_expire": "XX Mar 2025",
"en_fname": "XXXXXX",
"en_init": "Mrs.",
"en_issue": "26 Jul 2016",
"en_lname": "Lopez",
"en_name": "Mrs. XXXXXX Lopez",
"error_message": "",
"face": "/9j/4AAQ...UAFFFFAH/9k=", # Base64 of photo's image
"gender": "Female",
"home_address": "XXXXX XXX",
"house_no": "XXXXXX",
"id_number": "34117XXXXXX334",
"id_number_status": 1,
"lane": "",
"postal_code": "20150", # Automatic Retrieve from Database
"process_time": 1.3018648624420166, # Seconds
"province": "ชลบุรี",
"religion": "",
"request_id": null,
"road": "",
"sub_district": "หนองปรือ",
"th_dob": "XX มี.ค. 2500",
"th_expire": "XX มี.ค. 2568",
"th_fname": "XXXXX",
"th_init": "นาง",
"th_issue": "XX ก.ค. 2559",
"th_lname": "โลเปซ",
"th_name": "นาง XXXXX โลเปซ",
"village": "",
"village_no": "7",
"confidence": {
"id_number": 0.95,
"th_name": 0.95,
"th_fname": 0.95,
"th_lname": 0.95,
"en_name": 0.95,
"en_fname": 0.95,
"en_lname": 0.95,
"th_dob": 0.9,
"en_dob": 0.9,
"th_issue": 0.9,
"en_issue": 0.9,
"th_expire": 0.9,
"en_expire": 0.9,
"address": 0.95,
"gender": 0.95,
"religion": 0.9
}
}
Backside
Request:
curl --location --request POST 'https://api.iapp.co.th/v3/store/ekyc/thai-national-id-card/back' \
--header 'apikey: {Your API Key}' \
--form 'file=@"path/to/id-card-back.jpg"'
Response:
{
"back_number": "JT0-XXXXXXX-05",
"detection_score": 0.99846746524175,
"process_time": 1.370201416015625
}
Features & Capabilities
Core Features
- High accuracy text extraction (98.13% character-level accuracy)
- Fast processing time (1-3 seconds per card)
- Support for multiple file formats (JPEG, JPG, PNG, HEIC, HEIF, PDF)
- Automatic card cropping and rotation
- Return bounding boxes and scores for fields
- Return base64 images of card and fields
- Return raw OCR text
- Support for back card side without chip
Supported Fields
Front Side
| Field | Type | Description |
|---|---|---|
| address | String | Address on the ID card |
| detection_score | float | Detection score of a related field |
| district | String | District name on the ID card |
| en_dob | String | Date of birth, in English |
| en_expire | String | Date of expiry, in English |
| en_fname | String | English given name |
| en_init | String | Name title, in English |
| en_issue | String | Date of issue, in Thai |
| en_lname | String | English surname |
| en_name | String | English given name and surname |
| error_message | String | Error message |
| face | String | Base64 character string converted from the image |
| gender | String | Gender |
| home_address | String | Home address on the ID card |
| id_number | String | National ID number |
| postal_code | String | Postal Code |
| process_time | String | Processing time (Sec.) |
| province | String | Province name on the ID card |
| religion | String | Religion on the ID card |
| sub_district | String | Sub district name on the ID card |
| th_dob | String | Date of birth, in Thai |
| th_expire | String | Date of expiry, in Thai |
| th_fname | String | Thai given name |
| th_init | String | Name title, in English |
| th_issue | String | Date of issue |
| th_lname | String | Thai surname |
| th_name | String | Thai given name and surname |
| confidence | Object | Confidence scores (0-1) for each extracted field |
Back side
| Field | Type | Description |
|---|---|---|
| back_number | String | Laser number on back of ID card |
Common Response Fields
| Field | Type | Description |
|---|---|---|
| detection_score | Float | Confidence score (0-1) |
| error_message | String | Error message if request fails |
| process_time | Float | Processing time in seconds |
