Identity Document OCR API
Extract identity fields from document images (passport, driver license, national ID) and return structured JSON including name, DOB, address, document metadata, and validation checks.
Identity Document OCR API for extracting structured identity fields from passport, driver license, and national ID images.
Extract identity fields from document images (passport, driver license, national ID) and return structured JSON including name, DOB, address, document metadata, and validation checks.
Endpoint
Upload an identity document image and receive structured OCR output.
Built for production systems
Stable Schemas
Fixed contract that does not change between requests or model updates. Your parsers stay stable.
Document-Aware Output
Document type detection (passport vs driver license vs unknown). Unrelated document objects are null.
Predictable Failure Modes
Explicit errors instead of partial or invented data. meta.documentType UNKNOWN, confidence 0, errors[] with code and message.
Validation Checks
Operational signals: isExpired, isAdult, mrzDetected, imageQuality for decision-ready workflows.
Clear Null Handling
When fields are missing or unreadable, you get explicit nulls—no guessing or partial data.
Production-Ready Contract
Deterministic behavior suitable for audits, retries, and downstream systems at scale.
Data returned
Is this API right for you?
- KYC onboarding flows that need name, DOB, and document dates in a structured schema
- Identity verification pipelines that need document type detection (passport vs driver license)
- Back-office review tools that need standardized fields + validation checks
- Form auto-fill experiences from document photos
- Systems that need consistent handling for unreadable/unsupported uploads
- Authenticity / fraud detection (holograms, tampering, liveness, spoofing)
- Government/DMV lookup or access to proprietary databases
- Guaranteed extraction of every field from every country/state format
- Returning raw OCR text blocks or full-page text transcripts
- Face match or biometric identity verification
See what you get back
Clean, structured JSON. Predictable schema. No surprises.
{
"meta": {
"requestId": "1de3ea378fe6302ff6c4c213d1961f5a",
"documentType": "DRIVER_LICENSE",
"country": "US",
"state": "CA",
"confidence": 0.95
},
"person": {
"fullName": "IMA CARDHOLDER",
"firstName": "IMA",
"lastName": "CARDHOLDER",
"dateOfBirth": "1977-08-31",
"sex": "F",
"address": {
"line1": "2570 24TH STREET",
"line2": null,
"city": "ANYTOWN",
"state": "CA",
"postalCode": "95818",
"country": null
}
},
"driverLicense": {
"licenseNumber": "11234568",
"class": "C",
"issueDate": null,
"expiryDate": "2014-08-31",
"restrictions": null,
"endorsements": null
},
"passport": null,
"nationalId": null,
"checks": {
"isExpired": true,
"isAdult": true,
"mrzDetected": false,
"imageQuality": "GOOD"
},
"errors": []
}Why teams choose this API
Stable schemas
Schema does not change between requests or model updates. Normalized, decision-ready JSON for long-running production systems.
Predictable failure modes
Explicit errors instead of partial or invented data. Clear null handling when fields are missing or unreadable.
Boring, predictable, easy to operate
Hardened interface for production identity workflows—not just extracted text. Built for scale, audits, and downstream systems.
Common use cases
Up and running in minutes
No sales calls. No contracts. Subscribe on RapidAPI and start making requests.
Subscribe on RapidAPI
Create a free RapidAPI account and subscribe. Start with the free tier.
Get your API key
Copy your API key from the RapidAPI dashboard. Instant access.
Make your first call
Hit the endpoint and get structured JSON back immediately.
Ready to integrate?
Identity Document OCR API for extracting structured identity fields from passport, driver license, and national ID images.. Start with the free tier on RapidAPI.