US Driver License Scanner API
Automate identity verification across all 50 states. Instantly parse complex, state-specific layouts to extract critical data—including the Document Discriminator (DD), dates, and address. Upload a photo of a US license below to test the extraction for free.

The Challenge of 50 Different State Layouts
Unlike countries with a single national ID, the United States has 50 different state issuing authorities, each with its own driver's license design. While AAMVA standards exist for barcodes, the visual front of the cards varies wildly. Furthermore, high-security fields like the Document Discriminator (DD) or audit number are often printed in tiny fonts near the bottom edge or integrated into complex background holograms. Standard OCR engines struggle to consistently locate these fields or convert the US standard MM/DD/YYYY dates into database-friendly formats. To see how our layout-aware models handle this immense variance, explore our core driver license OCR infrastructure.
A Unified, Edge-Routed API Solution
Our US Driver License OCR engine dynamically identifies the issuing state and applies the correct extraction map. Delivered as a pure REST API, it allows you to bypass bloated SDK integrations. Simply send a direct file upload or a Base64-encoded string, and our Cloudflare-hosted edge network processes the image with ultra-low latency. Whether the image is a pristine flatbed scan or a glare-heavy smartphone photo, the API normalizes the output instantly.
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 · WebP · up to 500 files · max 4.5 MB each
Ready to use this in production? Get 20 free API calls — no credit card needed.
Get 20 Free API Calls →Core US Market Applications
Car Rental & Mobility
Eliminate long lines at the rental counter. Allow customers to scan their US driver's licenses via your app, instantly verifying the ID and pre-filling the rental agreement. Read more about our mobility driver verification solutions.
Age Verification & Retail
Ensure compliance for age-restricted deliveries (alcohol, vaping, or pharmaceuticals). Our API instantly extracts and standardizes the Date of Birth (DOB), allowing your system to automatically calculate age without manual human review.
Fintech & Digital Banking (KYC)
Streamline user onboarding for digital wallets and neobanks. Extract the address and Document Discriminator (DD) to cross-reference with public records and prevent identity fraud. Explore our flexible pricing plans to scale your KYC pipeline.
Technical Specs
- Document Discriminator (DD) Extraction: Precisely locates the audit number or DD often found near the bottom or side of the card, mapped safely to the `card_security_number` field.
- Universal US Support: Built to process current and legacy license formats from all 50 states, plus Washington D.C. and US territories.
- Date Standardization: Natively converts the standard American `MM/DD/YYYY` text into ISO-compliant `YYYY-MM-DD` strings for immediate database ingestion.
- Edge Performance: API traffic is routed via Cloudflare, ensuring maximum uptime and low-latency responses for North American servers.
Key Features
- Address Parsing: Captures the full residential street address, city, and zip code.
- Vehicle Classifications: Extracts commercial (CDL) or standard vehicle class letters (e.g., Class C, Class A).
- Flexible Data Inputs: Supports direct file uploads, Base64 strings, or URLs. No heavy mobile SDKs required.
Integration & AI Prompts
Send images directly via Base64 or multipart file uploads. Our API cleans up illegal whitespaces automatically, ensuring your payloads succeed. For comprehensive endpoints and error code references, consult our developer documentation.
import requests
import base64
# 1. Prepare Base64 Image of the US Driver's License
with open("us_license_california.jpg", "rb") as image_file:
base64_image = base64.b64encode(image_file.read()).decode('utf-8')
url = "https://api.structocr.com/v1/driver-license"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
# Direct Base64 injection
payload = {
"img": base64_image
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get('success'):
data = result['data']
print(f"✅ Extracted Region/State: {data['region']}")
print(f"✅ Extracted License Number: {data['document_number']}")
print(f"✅ Document Discriminator (DD): {data['extra_details']['card_security_number']}")Standardized JSON Output
Notice how state variations are handled seamlessly. The issuing state is captured in `region`, while the critical Document Discriminator (DD) is reliably stored inside `extra_details.card_security_number`.
{
"success": true,
"data": {
"type": "drivers_license",
"country_code": "USA",
"region": "CA",
"document_number": "F1234567",
"personal_number": null,
"surname": "SMITH",
"given_names": "JESSICA LYNN",
"sex": "F",
"date_of_birth": "1992-04-12",
"place_of_birth": null,
"date_of_issue": "2021-08-15",
"date_of_expiry": "2026-04-12",
"date_of_first_issue": null,
"issuing_authority": "California DMV",
"address": "1234 SUNSET BLVD, LOS ANGELES, CA 90026",
"vehicle_class": "C",
"extra_details": {
"fathers_name": null,
"mothers_name": null,
"rg_number": null,
"card_security_number": "12/345/67890"
}
}
}Frequently Asked Questions
Can I test the US driver's license scanner before buying?
Yes! You can use the free image upload testing tool at the top of this page. Simply upload a picture of a sample US license to evaluate the extraction speed and accuracy.
Does the API extract the Document Discriminator (DD)?
Yes. The Document Discriminator (DD) is a crucial security feature on modern US licenses. Our system extracts it and returns it in the `extra_details.card_security_number` field of the JSON payload.
Do I need to force my users to download an SDK to scan their ID?
No. Our solution is a pure API. Users can simply take a photo using their native browser or mobile camera, and you can send the Base64 image directly to our endpoint. This drastically reduces your app's payload size and integration time.
Explore More Drivers-license Solutions
Brazilian CNH (Driver's License) 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.
Automated CPF Extraction from Brazilian Driver Licenses
Accurately extract the CPF (Tax ID) and RG from Brazilian driver licenses (CNH). Try our free image upload tool and integrate our fast, edge-routed OCR API.
Automated Document Discriminator (DD) Extraction
Instantly extract the Document Discriminator (DD) and audit numbers from US driver's licenses. Test our edge-routed OCR API for free using image uploads.
Precise Data Extraction and Seamless
Integration with AI-powered OCR API.
Empower your solutions with automated data extraction by
integrating best-in class StructOCR via API seamlessly.
No credit card required • Full API access included