Vietnam Driving Licence (Giấy Phép Lái Xe) OCR API
Read the Vietnamese driving licence (giấy phép lái xe) 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

What Makes the Vietnamese driving licence (giấy phép lái xe) Hard to Parse
The Vietnamese driving licence (giấy phép lái xe) is issued by the Vietnamese road traffic authorities. The Vietnamese PET-card licence (bằng lái xe) shows a 12-digit licence number, the holder's name in Vietnamese with diacritics, date of birth, nationality, address and the licence class. Many holders also carry older licence formats, and classes were restructured in 2025, so older and newer class codes appear side by side.
One API Call, Named Fields
The StructOCR Driver License OCR API returns the licence number, the holder's name, date of birth, nationality, address, issue and expiry dates and licence class. Vietnamese cards print dates as DD/MM/YYYY; the API returns them 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.
Drop files here or click to browse
JPG · PNG · PDF · TIFF · up to 500 files · max 4.5 MB each
No document handy?
Where Teams Use It in Vietnam
Ride-hailing and Delivery
Onboard drivers with their licence class and expiry date captured from a photo.
Vehicle Rental
Check the licence class before renting out a motorbike or car.
Lending and Insurance
Prefill borrower or policyholder details from the licence.
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, date of birth, nationality, address, issue and expiry dates and licence class.
- Normalized dates: Vietnamese cards print dates as DD/MM/YYYY; the API returns them as YYYY-MM-DD.
- Good to know: Older and newer class codes can both appear. Map them to your own rules rather than assuming one scheme.
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 Vietnamese driving licence (giấy phép lái xe), with fictional values.
{
"success": true,
"data": {
"type": "drivers_license",
"country_code": "VNM",
"region": null,
"document_number": "012345678901",
"personal_number": null,
"surname": "NGUYỄN",
"given_names": "VĂN AN",
"sex": null,
"date_of_birth": "1995-05-19",
"place_of_birth": null,
"date_of_issue": "2022-08-10",
"date_of_expiry": "2032-08-10",
"date_of_first_issue": null,
"issuing_authority": null,
"address": "SỐ 1, PHỐ MẪU, HÀ NỘI",
"vehicle_class": "B2"
}
}Frequently Asked Questions
Can I test the Vietnamese driving licence (giấy phép lái xe) 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.
Are Vietnamese diacritics kept?
Names and addresses are returned as printed, including diacritics.
Do older licence formats work?
The API is built for the card format. Test older documents in the live demo before relying on them.
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
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.
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.
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.
Apartment Leasing Form Prefill from Driver License PDF417
Use PDF417 and AAMVA parsing for property leasing. Pre-fill given_names, surname, address, handle unreadable barcodes, and keep API credentials server-side.
Australian Driver Licence OCR API
Extract the licence number, the holder's name, date of birth, residential address, expiry date and licence class from the Australian driver licence as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.
Auto Dealership Finance Desk License Scanning with PDF417
Scan US driver licenses for dealership finance offices. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Bank Branch Account Opening with ID Barcode Prefill
Scan US driver licenses and state ID cards for bank branch account opening. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Bar and Nightclub ID Scanner API Using PDF417
Scan US driver licenses and state ID cards for bars and nightclubs. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
RV and Boat Rental License Scanning with PDF417
Scan US driver licenses for RV and boat rentals. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Brazilian CNH OCR API
Extract CPF, RG, and identity fields from Brazilian Carteira Nacional de Habilitação (CNH) instantly. High-accuracy OCR API deployed on edge networks for fast LatAm eKYC.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Driver's License OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Bolt.new app. Build car rental and mobility onboarding flows right in your browser.
Add Driver's License OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API using the Cursor AI code editor. Build car rental and mobility onboarding flows rapidly.
Add Driver's License OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Lovable.dev app. Build car rental and mobility onboarding flows with zero backend.
Add Driver's License OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Replit application. Build car rental and mobility onboarding flows using Replit Agent and Secrets.
Add Driver's License OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a v0 by Vercel app. Build car rental and mobility onboarding flows with zero backend.
Add Passport OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a v0 by Vercel app through a secure Next.js server route.
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.