V
VinApi
Available on RapidAPI

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.

99.9%
Uptime
Stable
JSON Schema
Complete
Documentation
Included
Support

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.

POST /identity/document/ocr
Key Features

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

Document type (PASSPORT, DRIVER_LICENSE, UNKNOWN)Person: fullName, firstName, lastName, dateOfBirth, sex, addressDriver license: licenseNumber, class, issueDate, expiryDate, restrictions, endorsementsPassport: passportNumber, issueDate, expiryDateChecks: isExpired, isAdult, mrzDetected, imageQualityErrors array with code and message for unreadable/unsupported images

Is this API right for you?

Built for
  • 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
Not designed for
  • 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
Sample Response

See what you get back

Clean, structured JSON. Predictable schema. No surprises.

POST /identity/document/ocr
200 OK
{
  "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

KYC onboarding flows needing name, DOB, and document dates in a structured schema
Identity verification pipelines with document type detection
Back-office review tools needing standardized fields and validation checks
Form auto-fill from document photos
Systems requiring consistent handling for unreadable or unsupported uploads

Up and running in minutes

No sales calls. No contracts. Subscribe on RapidAPI and start making requests.

1

Subscribe on RapidAPI

Create a free RapidAPI account and subscribe. Start with the free tier.

2

Get your API key

Copy your API key from the RapidAPI dashboard. Instant access.

3

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.

Free tier
No contracts
Cancel anytime