Automated Document Discriminator (DD) Extraction

Strengthen your fraud prevention and identity verification flows. Accurately extract the highly secure Document Discriminator (DD) and audit numbers from any US driver's license. Upload an image below to test the extraction accuracy for free.

Diagram showing the OCR API scanning the bottom edge of a US driver's license to pinpoint and extract the Document Discriminator (DD).

Why is the Document Discriminator (DD) Hard to Extract?

The Document Discriminator (DD)—also known as the audit number or item number—is a critical security feature on modern US driver's licenses. Issuing states use this unique string to track the physical card's manufacturing and issuance, making it essential for detecting counterfeit IDs. However, extracting it is notoriously difficult for standard OCR tools. The DD is often printed in a microscopic font, placed vertically on the edges, or buried within complex holographic backgrounds that vary wildly across all 50 states. To see how our models bypass these optical challenges to isolate secure fields, explore our core driver license OCR infrastructure.

Precision Extraction on the Edge

StructOCR solves the DD extraction problem by utilizing layout-aware AI models that understand the specific topography of each state's ID. Delivered as a pure REST API, you are not forced to install bulky, performance-draining SDKs into your frontend applications. Our core infrastructure is deployed on Cloudflare's global edge network, ensuring ultra-low latency for every request. The API offers maximum flexibility for developers, natively supporting direct file uploads, Base64-encoded strings, and image URLs.

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 · WebP  ·  up to 500 files · max 4.5 MB each

No files selected
Need more testing? Create a free account to get 200 free credits (equals 100 Driver License scans).

Critical Use Cases for DD Extraction

Advanced KYC & Fraud Prevention

Stop synthetic identity fraud. By extracting the DD and cross-referencing it with AAMVA or state DMV databases, financial institutions can verify that the physical card presented was genuinely issued by the state. Review our pricing plans to integrate secure KYC checks.

Mobility & Fleet Onboarding

Car rental agencies and gig-economy platforms must ensure drivers hold valid, non-revoked licenses. Extracting the DD provides the necessary audit trail for compliance and insurance underwriting. Discover more about our mobility driver verification solutions.

Regulated Retail & Age Verification

For delivery of age-restricted goods (alcohol, cannabis, pharmaceuticals), scanning the front of the ID to capture both the Date of Birth and the DD ensures the highest level of compliance and regulatory protection.

Technical Specs

  • Targeted Extraction: Uses semantic mapping to locate the Document Discriminator (DD) reliably, outputting it to the standardized `card_security_number` field.
  • Architecture: Delivered entirely as an API rather than an SDK, deployed on Cloudflare Workers for instant routing and execution.
  • Input Versatility: Fully supports multipart file uploads, raw Base64-encoded strings, and direct image URLs.
  • Automated Cleansing: The API natively cleans up malformed Base64 strings (e.g., stripping newlines) to prevent integration friction.

Key Features

  • Full Profile Extraction: Alongside the DD, it captures the Driver's License Number, Full Name, Address, and standardized Dates (YYYY-MM-DD).
  • State Agnostic: Automatically recognizes and parses layouts from all 50 US states without requiring manual state selection.
  • Format Normalization: Translates complex, varied US state abbreviations and date formats into a single, predictable JSON schema.

Integration & AI Prompts

Integrating DD extraction takes minutes. Our endpoint automatically sanitizes Base64 payloads (removing illegal whitespaces) and processes files up to 4.5MB. For complete payload parameters, check our developer documentation. You can also pass the prompt below to your AI coding assistant.

import requests
import base64

# 1. Prepare Base64 Image of the US Driver's License
with open("us_id_sample.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"
}

# Send pure Base64 string directly to the API
payload = {
    "img": base64_image 
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()

if result.get('success'):
    data = result['data']
    print(f"✅ State: {data['region']}")
    print(f"✅ License Number: {data['document_number']}")
    print(f"✅ Document Discriminator (DD): {data['extra_details']['card_security_number']}")

Standardized JSON Output

The Document Discriminator (DD) is safely extracted and normalized into the `extra_details.card_security_number` field, ready for your backend fraud-check logic.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "USA",
    "region": "TX",
    "document_number": "12345678",
    "personal_number": null,
    "surname": "DOE",
    "given_names": "JONATHAN MICHAEL",
    "sex": "M",
    "date_of_birth": "1988-07-22",
    "place_of_birth": null,
    "date_of_issue": "2022-03-14",
    "date_of_expiry": "2028-07-22",
    "date_of_first_issue": null,
    "issuing_authority": "Texas DPS",
    "address": "456 LONGHORN DR, AUSTIN, TX 78701",
    "vehicle_class": "C",
    "extra_details": {
      "card_security_number": "0001234567890123"
    }
  }
}

Frequently Asked Questions

Can I test the Document Discriminator extraction for free?

Yes! We offer a free image upload testing widget at the top of this page. You can upload a photo of your US driver's license to instantly see how accurately the API extracts the DD and other fields.

Do I need to implement an SDK for this to work?

No, StructOCR operates purely as an API. You do not need to install any heavy SDKs. You can simply pass a file upload, a Base64-encoded string, or an image URL directly to our endpoint.

What exactly is the Document Discriminator (DD)?

The Document Discriminator (DD) is a unique audit number printed on US driver's licenses. Unlike the main driver's license number (which stays with the driver), the DD tracks the specific physical card. It is widely used by financial and rental institutions to verify that an ID is not counterfeit.

Explore More Drivers-license Solutions

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.

Drivers-license
SOLUTION

Malaysian Lesen Memandu (Driving License) 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.

Drivers-license
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.

Drivers-license
SOLUTION

Indonesian SIM (Surat Izin Mengemudi) OCR API

Extract NIK, identity, and category data from Indonesian driver's licenses (Surat Izin Mengemudi). Test our low-latency, edge-routed API with a free image upload.

Drivers-license
SOLUTION

UK Driving Licence OCR & Field Extraction API

Accurately parse numbered fields (like Field 5 and Field 8) from UK driving licences. Try our fast, Cloudflare-routed OCR API with a free image upload test.

Drivers-license
SOLUTION

US Driver License Scanner API

Extract data from all 50 US state driver's licenses with our fast OCR API. Try our free image upload tool and easily parse the Document Discriminator (DD) and identity fields.

Drivers-license
SOLUTION

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.

Drivers-license
SOLUTION

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.

Drivers-license

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 99.9% Uptime