Driver License Verification API

Extract every field from a driver's licence, run the checks you can do from the card itself, and hand clean data to the records check your process requires. Upload a licence below to try 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 a driver licence photo turned into JSON fields for verification checks.

"Verification" Means Three Different Checks

When teams search for a driver license verification API they usually need some mix of three things: reading the licence (who is this, which licence number, which classes, when does it expire), checking that the card is consistent with itself, and confirming the licence against the issuing authority's records. The first two can be done from an image of the card; the third needs access to an authority database, which is available only through authorized providers and differs by country and state.

Where StructOCR Fits

The StructOCR Driver License OCR API handles the first step and much of the second. It returns the licence number, name, date of birth, address, issue and expiry dates and classes as JSON, so your rules can reject expired licences or the wrong class automatically. For US and Canadian licences, the PDF417 API decodes the AAMVA barcode on the back, and you can compare it with the front. It does not query DMV, DVLA or other government records; pair it with an authorized records-check provider where your regulations require one.

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).

Checks You Can Run on the Extracted Data

Expiry and Class Rules

Reject licences whose date_of_expiry has passed, or whose vehicle_class does not cover the vehicle being rented or driven.

Front vs Barcode Comparison (US/Canada)

Compare the name, date of birth and licence number on the front with the AAMVA record decoded from the back. A mismatch is a strong reason for manual review. See the US driver license scanner.

Document Discriminator Capture

Store the Document Discriminator (DD) printed on US licences; some verification services ask for it. Read more about DD extraction.

Data for a Records Check

Pass the extracted licence number, name and date of birth to your records-check provider instead of asking users to type them.

Technical Specs

  • Endpoints: POST /v1/driver-license (front, global) and POST /v1/driver-license-pdf417 (US/Canada barcode)
  • 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

  • Normalized fields: One JSON structure for licences from many countries, with dates as YYYY-MM-DD.
  • Barcode decoding: AAMVA PDF417 data from the back of US and Canadian licences.
  • Clear boundaries: Extraction and card-level checks only; no government database lookups.

Integration & AI Prompts

Install the official SDK, extract the fields, then apply your rules. Request and response details are in the driver license API reference.

# pip install structocr
import os
from datetime import date
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"]
    expired = data.get("date_of_expiry") and date.fromisoformat(data["date_of_expiry"]) < date.today()
    print(data["document_number"], "EXPIRED" if expired else "valid until " + str(data.get("date_of_expiry")))

Standardized JSON Output

An illustrative response with fictional values.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "USA",
    "region": "CA",
    "document_number": "F1234567",
    "personal_number": null,
    "surname": "SMITH",
    "given_names": "JOHN",
    "sex": "M",
    "date_of_birth": "1990-01-01",
    "place_of_birth": null,
    "date_of_issue": "2022-01-01",
    "date_of_expiry": "2027-01-01",
    "date_of_first_issue": null,
    "issuing_authority": null,
    "address": "123 SAMPLE ST, SACRAMENTO, CA 95814",
    "vehicle_class": "C"
  }
}

Frequently Asked Questions

Does the API check the licence with the DMV or DVLA?

No. It reads the licence and returns the data. Confirming a licence against government records requires an authorized records-check provider; StructOCR gives you the clean data to send to it.

What can I verify from the image alone?

Expiry, licence class, internal consistency (for US and Canadian licences, the front against the PDF417 barcode) and whether required fields are present and legible.

Can I test it for free?

Yes. Use the live demo on this page without an account, or sign up for 200 free credits, enough for 100 licence scans through the API.

Explore More Driver License OCR Solutions

SOLUTION

Equipment Rental License Intake with PDF417

Use PDF417 and AAMVA parsing for equipment rental. Pre-fill document_number, date_of_expiry, vehicle_class, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

EU Driving Licence OCR API

Accurately parse numbered fields (1, 4a, 9) from European driving licences. Try our fast, edge-routed OCR API with a free image upload test.

Driver License OCR
SOLUTION

Event and Concert Entry ID Scanning with PDF417

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

Driver License OCR
SOLUTION

Fintech KYC Form Prefill from Driver License PDF417

Use PDF417 and AAMVA parsing for financial onboarding. Pre-fill given_names, surname, address, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

Fleet Driver Onboarding with PDF417 and AAMVA Data

Use PDF417 and AAMVA parsing for fleet administration. Pre-fill vehicle_class, restrictions, endorsements, handle unreadable barcodes, and keep API credentials server-side.

Driver License OCR
SOLUTION

French Driving Licence (Permis de Conduire) OCR API

Extract the licence number, nom and prénoms, date and place of birth, issue and expiry dates, issuing authority and categories from the French permis de conduire as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

German Driving Licence (Führerschein) OCR API

Extract the licence number, surname and first names, date and place of birth, issue and expiry dates, issuing authority and classes from the German Führerschein as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR
SOLUTION

Gym Membership Sign-Up with ID Barcode Prefill

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

Driver License OCR
SOLUTION

Patient Registration Data Capture from Driver License PDF417

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

Driver License OCR
SOLUTION

Hotel Guest Registration with a Driver License Barcode API

Use PDF417 and AAMVA parsing for hospitality check-in. Pre-fill given_names, surname, address, handle unreadable barcodes, and keep API credentials server-side.

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