Passport & ID OCR API

Extract structured identity data from passports and ID cards, with built-in MRZ validation.

One synchronous API call, one JSON response — no OCR infrastructure to maintain.

No credit card. API access is set up manually.

POST /v1/scan · image → JSON
{
  "success": true,
  "document": {
    "type": "passport",
    "issuing_country": "TUR",
    "document_number": "U12345678",
    "first_name": "AHMET",
    "last_name": "YILMAZ",
    "...": "..."
  }
}

One API. One response. No OCR infrastructure to maintain.

MRZ extraction Field-level validation Human-review signal Simple JSON response Synchronous API
Built for identity documents

Passports and ID cards, read automatically.

Passport MRZ

Full 2-line MRZ extraction.

ID card MRZ

3-line MRZ extraction.

Field validation

ICAO checksum verification on every field.

Automatic alignment

Corrects rotation and perspective automatically — a safety net for sideways or upside-down photos.

Extraction alone isn't the answer

OCR isn't enough.

image
OCR
validation
JSON

Extraction alone tells you what a document says. Validation tells you whether to trust it.

Every field ships with a pass/fail check — plus a single review_recommended flag when something's worth a second look.

Quick start

One request in, one response out.

No job creation, polling, or webhooks — the same three snippets as the docs' Quick Start.

curl https://misfora.com/v1/scan \
  -H "Authorization: Bearer msf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -F "file=@passport.jpg"
import requests

response = requests.post(
    "https://misfora.com/v1/scan",
    headers={"Authorization": "Bearer msf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"},
    files={"file": open("passport.jpg", "rb")},
)
response.raise_for_status()
print(response.json())
const fs = require("fs");

const form = new FormData();
form.append("file", fs.readFileSync("passport.jpg"), "passport.jpg");

const res = await fetch("https://misfora.com/v1/scan", {
  method: "POST",
  headers: { Authorization: "Bearer msf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" },
  body: form,
});
console.log(await res.json());

Full request/response reference, every field, and every error code: read the docs.

Access

Standard access & Enterprise.

Standard access

Limits sized to your use case, agreed when we set up your account — no fixed public tier to pick from.

Request API access
Enterprise

Higher volume, and a response schema mapped to your own systems if the default JSON shape doesn't fit your pipeline as-is.

Talk to us
Before you integrate

Try it before you integrate.

Want to see it work first? Run a scan on our free public scanner — same OCR pipeline as the API, no signup required.

Try the Free Scanner
FAQ

Questions

What documents are supported?+
Passports and ID cards with a machine-readable zone (MRZ). See the full list of supported documents and countries.
How fast is a typical response?+
In our own testing, most requests finish in 600–2500ms, with a median around 1100ms. Actual latency depends heavily on image size and quality, so treat this as a rough indication rather than a guarantee.
Do you store uploaded documents?+
No — images exist only for the duration of the request and are discarded once processing finishes. Nothing is written to a database or cloud storage.
Does the API validate MRZ check digits?+
Yes, on every extracted field — see the docs for exactly which.
What's the difference between TD1 and TD3?+
ICAO terms for the two MRZ formats: TD3 is the 2-line format used on passports, TD1 is the 3-line format used on ID cards. In API terms — TD3 → type: "passport", TD1 → type: "id_card".
Does the photo need to be perfectly aligned?+
No — Misfora automatically detects the document and corrects rotation and perspective, including sideways or upside-down photos. A well-aligned, well-lit photo still recognizes more reliably, but this works as a safety net, not a requirement.
Is there an SDK?+
Not yet — cURL, Python, and JavaScript examples are in the docs.
Do you offer enterprise plans?+
Yes — custom volume and, if you need it, a custom response schema. See Enterprise above.

Ready to integrate?

Request API access