Identity / VisionFree tier available

ID Document OCR API: Parse Passports, ID Cards and Licenses with Checksum Verification

Parse passports, ID cards, driving licenses and residence permits into clean JSON. Deterministic, checksum-verified extraction: MRZ check digits, national ID validators and cross-checks back every response with an ok / review / rejected verdict. Photos, scans or PDFs. 200+ countries. No LLM, no data retention.

See It in Action

Real examples of text extraction from handwritten notes, printed documents, and multilingual content.

Input ImageGreek specimen
Passport — input
OCR ResultExtracted
Passport — result

Features

Checksum-Verified, Not Guessed

Deterministic engine: ICAO 9303 MRZ check digits, national ID validators (Aadhaar Verhoeff, Spanish DNI, Romanian CNP...) and MRZ-to-printed-zone cross-checks. Never a silently wrong value.

4 Document Types, 200+ Countries

ID cards, passports, driving licenses and residence permits across Latin, Greek, Cyrillic, Arabic and Devanagari scripts.

A Verdict on Every Response

ok / review / rejected, backed by check digits: automate the ok responses and route the rest to a human. Expired documents are flagged separately.

Built for Phone Photos

Send several smartphone shots in any order: the engine groups them by side, votes field by field, and a checksum-verified value can never be outvoted by a blurry shot.

Photos, Scans and PDFs

A scanner PDF parses directly, one page per side. HEIC is converted and EXIF rotation corrected server-side. One side alone is often enough.

Private by Design

No LLM in the loop and no data retention: images and extracted values are never stored or logged. Failed requests are never billed.

What Developers Build with This ID Parsing API

KYC onboarding, age checks, check-in flows: everywhere an identity document has to become trustworthy data.

KYC & Customer Onboarding

Automate the ok verdicts and route only the review cases to your compliance team: every automated value is backed by check digits.

See the endpoint docs

Fraud Screening

Failed MRZ checksums, MRZ/printed-zone mismatches, impossible dates and invented country codes are surfaced on every response.

See fraud detection in action

Hotel & Car-Rental Check-in

Guests photograph their ID at the desk or in your app: send 2-3 phone shots of each side and the vote beats any single blurry capture.

See how photos are sent

Form Auto-Fill

Names, dates and document numbers land in your form in ISO format, with a trust level on every field to decide what needs confirmation.

See the response format

Age Verification

birth_date arrives checksum-verified from the MRZ, or derived from national ID numbers that encode it (Romanian CNP, Estonian isikukood...).

Start with 30 free requests

Back-Office Document Intake

Scanner PDFs with front and back parse in one call, one page per side. No conversion step, encrypted PDFs cleanly refused.

See PDF support

API Reference

2 endpoints, simple integration. Here's everything you need.

Supported Content Types

multipart/form-dataapplication/jsonapplication/x-www-form-urlencoded
POSThttps://id-document-ocr-verification.p.rapidapi.com/parse-id

Extract verified fields from an ID card, passport, driving license or residence permit. Send 1-6 images or a PDF (one image per page), in any order: front, back, or several shots of the same side. The engine groups the images by side, votes field by field between duplicates and cross-checks both sides. File upload, base64 or URL.

imagesfile

Image or PDF file(s), repeat the field (multipart/form-data). JPEG, PNG, WebP, HEIC, TIFF, BMP, GIF, PDF. 6 images max in total (PDF pages included), 4 MB each.

image_urlsstring[]

Public image URLs fetched server-side (JSON body), or repeatable image_urls form field. Use instead of a file upload.

Provide files OR URLs, not both. Smartphone EXIF rotation is auto-corrected and iPhone HEIC is converted server-side.

Response Schema
{
  "result": {
    "document_type": "passport",
    "country": "GRC",
    "fields": {
      "last_name":       {"value": "ELLINAS",    "status": "mrz_confirmed"},
      "first_name":      {"value": "GEORGIOS",   "status": "mrz_confirmed"},
      "birth_date":      {"value": "1965-04-04", "status": "mrz_only"},
      "document_number": {"value": "AE0000005",  "status": "mrz_only"},
      "expiry_date":     {"value": "2012-08-28", "status": "mrz_confirmed"},
      "nationality":     {"value": "GRC",        "status": "mrz_only"},
      "sex":             {"value": "M",          "status": "mrz_only"}
    },
    "verdict": {
      "status": "ok",
      "is_expired": true,
      "mrz_present": true,
      "mrz_checks": {"document_number": true, "birth_date": true,
                     "expiry_date": true, "composite": true},
      "mismatched_fields": [],
      "missing_critical_fields": [],
      "consistency_issues": []
    }
  },
  "meta": {"engine_version": "1.3.2", "elapsed_ms": 1240, "images": 1}
}
GEThttps://id-document-ocr-verification.p.rapidapi.com/health

Service health check. Returns the engine version.

Response Schema
{"status": "ok", "engine": "1.3.2"}

Response

200

Returns JSON with every extracted field (value, trust level), plus a verdict object: ok (every checksum and cross-check passed, safe to automate), review (route to a human) or rejected (the MRZ fails multiple integrity checks).

Quick Start

Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.

# Parse an ID card, front and back
curl -X POST "https://id-document-ocr-verification.p.rapidapi.com/parse-id" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: id-document-ocr-verification.p.rapidapi.com" \
  -F "images=@id_front.jpg" -F "images=@id_back.jpg"

# Parse from a public URL
curl -X POST "https://id-document-ocr-verification.p.rapidapi.com/parse-id" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: id-document-ocr-verification.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{"image_urls": ["https://demo.ai-engine.net/id-document-parser-api/sample-passport.png"]}'

# Several smartphone shots, any order: voted field by field
curl -X POST "https://id-document-ocr-verification.p.rapidapi.com/parse-id" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: id-document-ocr-verification.p.rapidapi.com" \
  -F "images=@front_1.jpg" -F "images=@front_2.jpg" \
  -F "images=@back_1.jpg" -F "images=@back_2.jpg"

Pricing

Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.

Free

Basic

$0Free

30 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Pro

$9.99/mo

1,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support
Recommended

Ultra

$39.99/mo

5,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Mega

$129.99/mo

20,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Frequently Asked Questions

Is there a free ID document OCR API?
Yes. The Basic plan includes 30 free requests a month on the full engine: all document types, MRZ verification, verdicts and PDF input. Subscribe to the free plan on RapidAPI to get an API key and test it on your own documents.
How is this different from a generic OCR API or an LLM?
Generic OCR returns raw text; an LLM returns plausible JSON that can silently invent a digit. This API validates ICAO 9303 MRZ check digits, national ID checksums and cross-checks the machine-readable zone against the printed zone, then tells you in the verdict whether the data can be trusted automatically. A wrong value never comes back marked ok.
What does the verdict mean?
ok: every critical field was extracted and every checksum and cross-check passed, safe for automated use. review: something needs a human (missing field, failed check digit, MRZ/visual mismatch, unknown document model). rejected: the MRZ is present but fails multiple integrity checks. is_expired is a separate flag: an expired but authentic document still parses ok.
Can I send only one side of the document?
Yes. Even without the MRZ side, most European ID cards, permits and licenses still yield names, dates and numbers with the correct country. Sending both sides (front first) unlocks the MRZ cross-checks and extra fields.
Does it accept PDFs and iPhone photos?
Yes. A scanner PDF is parsed directly, one page per side (6 pages max; encrypted PDFs are refused with a clear error). iPhone HEIC is converted server-side and EXIF rotation is auto-corrected, so phone photos work as-is. Send 2-3 shots of each side in any order: they are grouped automatically and voted field by field.
Is the data stored anywhere?
No. There is no LLM in the loop and no data retention: images and extracted values are never stored or logged. Only anonymous metrics (timing, document type, verdict) are kept to operate the service. Failed requests are never billed.

Start Using ID Document OCR & Verification Today

Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.