Kenya Driving Licence OCR API
Read the Kenyan smart 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

What Makes the Kenyan smart driving licence Hard to Parse
The Kenyan smart driving licence is issued by the National Transport and Safety Authority (NTSA). NTSA issues smart driving licences that show the licence number, the holder's ID number and the licence classes. Boda-boda and delivery platforms, lenders and insurers all collect them, usually from phone photos taken outdoors.
One API Call, Named Fields
The StructOCR Driver License OCR API returns the licence number, the holder's name, ID number where printed, date of birth, issue and expiry dates and licence classes. 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.
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 Kenya
Boda-boda and Delivery Platforms
Onboard riders with their licence classes and expiry date captured from a photo.
Asset Finance and Lending
Prefill borrower details from the licence.
Motor Insurance
Collect driver details for policies and claims.
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, ID number where printed, date of birth, issue and expiry dates and licence classes.
- Normalized dates: Dates are returned as YYYY-MM-DD.
- Good to know: Checking a licence against NTSA records is a separate step; the API extracts the printed data.
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 Kenyan smart driving licence, with fictional values.
{
"success": true,
"data": {
"type": "drivers_license",
"country_code": "KEN",
"region": null,
"document_number": "DL1234567",
"personal_number": "12345678",
"surname": "OTIENO",
"given_names": "BRIAN",
"sex": null,
"date_of_birth": "1993-04-18",
"place_of_birth": null,
"date_of_issue": "2022-06-01",
"date_of_expiry": "2025-05-31",
"date_of_first_issue": null,
"issuing_authority": null,
"address": null,
"vehicle_class": "A2, B"
}
}Frequently Asked Questions
Can I test the Kenyan smart 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.
Does it read the older paper licences?
The API is built for card-format licences. Test older documents in the live demo before relying on them.
Is the 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
Malaysian Lesen Memandu OCR API
Extract the IC number, identity fields, and vehicle classes from Malaysian driving licenses (Lesen Memandu). Test our edge-routed API with a free image upload.
Liquor Store Age Verification with ID Barcode Scanning
Scan US driver licenses and state ID cards for liquor retailers. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Philippine LTO Driver License OCR API
Accurately extract data from Philippine LTO driver's licenses. Parse restriction codes, conditions, and identity fields via our edge-routed API. Test for free.
Mexico Driving Licence (Licencia de Conducir) OCR API
Extract the licence number, the holder's name, date of birth, issue and expiry dates, CURP where printed and the licence type from the Mexican licencia de conducir as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.
Dutch Driving Licence (Rijbewijs) OCR API
Extract the licence number, surname and first names, date and place of birth, issue and expiry dates, issuing municipality and categories from the Dutch rijbewijs as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.
Nigeria Driver's Licence OCR API
Extract the licence number, the holder's name, date of birth, issue and expiry dates, address where printed and the licence class from the Nigerian driver's licence as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.
Notary and Loan Signing ID Capture with PDF417
Scan US driver licenses and state ID cards for notaries and signing agents. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Pawn Shop and Secondhand Dealer Seller ID Capture
Scan US driver licenses and state ID cards for pawn shops and secondhand dealers. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Pharmacy Prescription Pickup ID Scanning with PDF417
Scan US driver licenses and state ID cards for pharmacy pickup. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
Plasma Donation Center Donor ID Check-In with PDF417
Scan US driver licenses and state ID cards for plasma donation centers. Pre-fill AAMVA fields from the PDF417 barcode and route unreadable cards to a retake.
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 Container OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a v0 by Vercel app. Build logistics and yard management tools with zero backend.
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.