India Driving Licence OCR API

Read the Indian 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 Indian driving licence and returning the fields as JSON.

What Makes the Indian driving licence Hard to Parse

The Indian driving licence is issued by the Regional Transport Offices (RTOs) of each state, with records held in the national Sarathi system. Indian driving licence numbers combine a state code, an RTO code, the year of issue and a serial number (for example MH01 20190012345), and the same number may be printed with or without spaces and hyphens. Layouts differ between states and between older laminated cards and newer smart cards, and classes such as MCWG and LMV are often listed with their own validity.

One API Call, Named Fields

The StructOCR Driver License OCR API returns the licence number, the holder's name, date of birth, father's or guardian's name where printed, address, issue and validity dates and vehicle classes. Indian 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.

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 India

Ride-hailing and Delivery

Onboard driver partners with their licence number, classes and validity.

Vehicle Rental and Self-Drive

Check the licence class and validity before handing over a car or two-wheeler.

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, father's or guardian's name where printed, address, issue and validity dates and vehicle classes.
  • Normalized dates: Indian cards print dates as DD-MM-YYYY; the API returns them as YYYY-MM-DD.
  • Good to know: Licence numbers may be printed with spaces or hyphens. Normalize them before you look them up in your own records or with a verification provider.

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 Indian driving licence, with fictional values.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "IND",
    "region": "MH",
    "document_number": "MH0120190012345",
    "personal_number": null,
    "surname": "SHARMA",
    "given_names": "RAHUL",
    "sex": null,
    "date_of_birth": "1990-08-15",
    "place_of_birth": null,
    "date_of_issue": "2019-05-02",
    "date_of_expiry": "2039-05-01",
    "date_of_first_issue": null,
    "issuing_authority": null,
    "address": "FLAT 4, SAMPLE ROAD, MUMBAI 400001",
    "vehicle_class": "MCWG, LMV"
  }
}

Frequently Asked Questions

Can I test the Indian 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.

Do licences from every state work?

The API reads the printed fields from Indian driving licences and returns one JSON structure. Layouts vary by state, so test the cards your users hold in the live demo.

Does it verify the licence with Sarathi?

No. It extracts the printed data; verifying a licence record is a separate step.

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

Insurance Customer Intake with Driver License PDF417

Use PDF417 and AAMVA parsing for insurance intake. Pre-fill document_number, address, date_of_birth, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

International Visitor Car Rental License OCR

How car rental companies serving tourists can capture driver licence data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.

Driver License OCR
SOLUTION

Israel Driving Licence OCR API

Extract the licence number, the holder's name in Latin script, ID number, date of birth, issue and expiry dates and licence grades from the Israeli 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

Italian Driving Licence (Patente di Guida) OCR API

Extract the licence number, cognome and nome, date and place of birth, issue and expiry dates, issuing office and categories from the Italian patente di guida as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

Japan Driving Licence (運転免許証) OCR API

Extract the licence number, the holder's name, date of birth, address, issue and expiry dates and licence categories from the Japanese 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

Kenya Driving Licence OCR API

Extract the licence number, the holder's name, ID number where printed, date of birth, issue and expiry dates and licence classes from the Kenyan smart 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

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.

Driver License OCR
SOLUTION

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.

Driver License OCR
SOLUTION

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.

Driver License OCR
SOLUTION

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.

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