DocsOCR Passport API
OCR Passport API
Extract Machine Readable Zone (MRZ), full name, nationality, and expiry info from worldwide standard booklets/passports.
POST
http://178.105.157.85:3000/api/ocr?type=PASSPORTRequest Example
cURL
curl -X POST \
"http://178.105.157.85:3000/api/ocr?type=PASSPORT" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@/path/to/document.jpg"Authentication Header
Authorization: Bearer YOUR_API_KEY
Generate an API key from your Dashboard → API Keys panel. For testing server/sandbox local environments, key verification is bypassed.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
image | File | Yes | Passport data page photo (JPG, PNG) |
enhance | Boolean | No | Improve readability on reflection glares |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | Bearer YOUR_API_KEY (Optional for local sandbox) |
Content-Type | String | Yes | multipart/form-data |
Response Example
JSON
{
"success": true,
"data": {
"passport_number": "A12345678",
"full_name": "SANDI SAPUTRO",
"nationality": "INDONESIAN",
"birth_date": "14-05-1990",
"gender": "MALE",
"issue_date": "20-11-2020",
"expiry_date": "20-11-2030",
"issuing_country": "IDN"
},
"confidence": 96.88,
"processing_time": 0.38
}Rate Limit
Depending on your plan. Check your dashboard for current limits.