Thailand Driving Licence OCR API

Read the Thai driving licence from a photo and get the licence number, name, dates and classes as structured JSON. Upload an image below to test it free.

200 free credits = 100 Driver License scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

Diagram of the API reading a Thai driving licence and returning the fields as JSON.

What Makes the Thai driving licence Hard to Parse

The Thai driving licence is issued by the Department of Land Transport (DLT). Thai licences are printed in Thai and English and show the licence number, the holder's 13-digit national ID number and the licence type, such as a private car or motorcycle licence. Platforms that onboard drivers or renters need the English fields as structured data.

One API Call, Named Fields

The StructOCR Driver License OCR API returns the licence number, the holder's name in English, ID number, date of birth, issue and expiry dates and licence type. Dates are returned as YYYY-MM-DD. Send a JPG, PNG, WebP or PDF as Base64 JSON or as a multipart upload; there is no SDK to embed in your app, although official Python and Node.js SDKs are available. Step-by-step code is in the Python guide. Usage is billed per successful scan with pay-as-you-go pricing.

Live Demo: Driver License OCR Scanner

No registration required. Upload a file to test the extraction.

1
Upload
2
Results
↑

Drop files here or click to browse

JPG · PNG · PDF · TIFF  ·  up to 500 files · max 4.5 MB each

No document handy?

No files selected
Need more testing? Create a free account to get 200 free credits (equals 100 Driver License scans).

Where Teams Use It in Thailand

Ride-hailing and Delivery

Onboard drivers with their licence type and expiry date.

Car and Motorbike Rental

Read the licence at pickup and check it is still valid.

Insurance

Prefill driver details for motor policies.

Technical Specs

  • Endpoint: POST https://api.structocr.com/v1/driver-license
  • Input: JPG, PNG, WebP or PDF up to 4.5 MB, as Base64 JSON or multipart upload
  • Price: 2 credits per successful scan; new accounts get 200 free credits (100 scans)
  • Retention: Images and results are kept for at most 24 hours for quality spot-checks, then deleted

Key Features

  • Named fields: The licence number, the holder's name in English, ID number, date of birth, issue and expiry dates and licence type.
  • Normalized dates: Dates are returned as YYYY-MM-DD.
  • Good to know: The national ID number is sensitive. Mask or discard it unless your process needs it.

Integration & AI Prompts

Install the official SDK and pass a photo of the licence. Full request and response details are in the driver license API reference.

# pip install structocr
import os
from structocr import StructOCR

client = StructOCR(api_key=os.environ["STRUCTOCR_API_KEY"])
result = client.scan_driver_license("licence.jpg")

if result.get("success"):
    data = result["data"]
    print(data["document_number"], data["surname"], data["date_of_expiry"])

Standardized JSON Output

An illustrative response for a Thai driving licence, with fictional values.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "THA",
    "region": null,
    "document_number": "12345678",
    "personal_number": "1234567890123",
    "surname": "SUKSAWAT",
    "given_names": "SOMCHAI",
    "sex": null,
    "date_of_birth": "1990-12-05",
    "place_of_birth": null,
    "date_of_issue": "2022-12-05",
    "date_of_expiry": "2027-12-05",
    "date_of_first_issue": null,
    "issuing_authority": null,
    "address": null,
    "vehicle_class": "PRIVATE CAR"
  }
}

Frequently Asked Questions

Can I test the Thai driving licence scan for free?

Yes. Upload a photo in the live demo on this page without an account, or create an account to get 200 free credits, enough for 100 licence scans through the API.

Is Thai text returned?

Names are returned in English as printed. Thai text is not returned as a separate field.

Is the national ID number returned?

When it is printed and legible it is returned as personal_number.

Do I need an SDK?

No. It is a plain REST API that accepts Base64 JSON or a multipart upload. Official Python and Node.js SDKs are available if you prefer them.

Explore More Driver License OCR Solutions

SOLUTION

Turkey Driving Licence (Sürücü Belgesi) OCR API

Extract the licence number, surname and name, date and place of birth, issue and expiry dates, T.C. Kimlik No. where printed and classes from the Turkish sürücü belgesi as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

UAE Driving Licence OCR API

Extract the licence number, the holder's name, nationality where printed, date of birth, issue and expiry dates, the issuing authority and the permitted vehicle categories from the UAE driving licence as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

UK Driving Licence OCR API

Extract name, licence number (field 5), address (field 8), dates and categories from UK DVLA driving licences as JSON. Free upload test and 100 free API scans.

Driver License OCR
SOLUTION

US Driver License Scanner API & SDK

Scan US driver's licenses from all 50 states with a REST API or our Python and Node SDKs. Extract name, DOB, address and the Document Discriminator (DD). 100 free scans.

Driver License OCR
SOLUTION

Vape and Tobacco Shop ID Verification with PDF417

Scan US driver licenses and state ID cards for vape and tobacco retailers. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.

Driver License OCR
SOLUTION

Vehicle Test-Drive License Scanning with PDF417

Use PDF417 and AAMVA parsing for automotive dealerships. Pre-fill document_number, given_names, surname, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

Vietnam Driving Licence (Giấy Phép Lái Xe) OCR API

Extract the licence number, the holder's name, date of birth, nationality, address, issue and expiry dates and licence class from the Vietnamese driving licence (giấy phép lái xe) as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

Visitor Management with Driver License PDF417 Data

Use PDF417 and AAMVA parsing for visitor registration. Pre-fill given_names, surname, document_number, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

Age Verification Data Capture with a PDF417 API

Use PDF417 and AAMVA parsing for age-gated commerce. Pre-fill date_of_birth, date_of_expiry, document_number, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

Alcohol Delivery Age Checks with an ID Barcode API

Scan US driver licenses and state ID cards for alcohol delivery. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.

Driver License OCR

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime No Credit Card