Right-to-Work Passport Verification API
Scale your global hiring compliantly. Automate employee identity verification and Right-to-Work checks with a secure passport OCR API; images are deleted within 24 hours.
200 free credits = 100 Passport scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

The Compliance Nightmare of Remote Hiring
For global HR platforms and Employer of Record (EOR) services, verifying a candidate's legal Right-to-Work is a critical compliance bottleneck. Manually reviewing international passports is slow, but more importantly, storing applicant passport images on traditional cloud servers exposes your organization to severe GDPR and DPDP privacy violations. For a broader look at securing global user onboarding, explore our travel identity verification solutions.
StructOCR: GDPR-Compliant Edge Parsing
Designed for modern HR infrastructure, our core Passport OCR engine keeps images for at most 24 hours for quality spot-checks, then deletes them. By accepting secure Base64 image streams directly to our Cloudflare edge nodes, we extract the necessary MRZ and VIZ identity data. Once the JSON response is delivered, the candidate's images are kept for at most 24 hours for quality spot-checks, then deleted. Our pure REST API eliminates the need for bulky mobile SDKs, allowing seamless integration directly into your web-based HR dashboards.
Live Demo: Passport scanner
No registration required. Upload a file to test the extraction.
Drop files here or click to browse
JPG · PNG · PDF · TIFF · up to 500 files · max 4.5 MB each
No document handy?
Core HR & Compliance Applications
Employer of Record (EOR) Onboarding
Verify remote hires across 195+ countries instantly. For global SaaS operators, we natively support borderless USDT/Crypto payments. View our straightforward API pricing.
Applicant Tracking Systems (ATS)
Autofill candidate profiles directly from passport uploads during the application phase without persisting the raw images.
Gig Economy Worker Verification
Automate fleet and contractor onboarding at scale by programmatically verifying identity and document validity before activation.
Automated Expiry Tracking
Extract strict ISO 8601 formatted expiry dates to trigger automated alerts in your HR system before a foreign worker's visa or passport expires.
Technical Specs
- 24-Hour Data Retention: Images and results are deleted within 24 hours (GDPR/DPDP).
- API-First Architecture: 100% RESTful HTTP integration ensures perfect compatibility with web-based HR portals and ATS platforms without SDK bloat.
- Edge Processing: Sub-1.2s latency globally, powered by Cloudflare's distributed edge network.
- Strict Normalization: Forces all dates (`date_of_expiry`) into deterministic ISO 8601 formatting to prevent backend calculation errors.
Key Features
- Universal Nationality Parsing: Accurately extracts and standardizes the 3-letter ISO country code to instantly verify employment eligibility regions.
- MRZ + VIZ Dual Engine: Automatically extracts the Machine Readable Zone and intelligently falls back to the Visual Inspection Zone for worn or low-quality uploads.
- Base64 Native: Stream candidate data securely without ever exposing sensitive PII to intermediary AWS S3 URLs.
Integration & AI Prompts
Integrate directly into your HR backend using standard HTTP requests. Avoid exposing candidate PII by passing Base64 directly to the API. For complete payload schemas, consult our Passport OCR Developer Documentation.
import requests
import base64
from datetime import datetime
# 📚 Developer Docs: https://structocr.com/developers/passport-ocr
# Note: StructOCR is API-first. Send Base64 natively from your
# HR platform backend to maintain strict GDPR compliance.
with open("candidate_passport.jpg", "rb") as image_file:
base64_image = base64.b64encode(image_file.read()).decode('utf-8')
url = "https://api.structocr.com/v1/passport"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"img": base64_image
}
try:
# Processed at the edge; images are deleted within 24 hours
print("Verifying Candidate Right-to-Work...")
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get('success'):
print("✅ Verification Data Extracted!\n")
core = result['data']
expiry = core.get('date_of_expiry')
print(f"Candidate: {core.get('given_names')} {core.get('surname')}")
print(f"Nationality: {core.get('nationality')} ({core.get('country_code')})")
print(f"Expiry: {expiry}")
# Simple compliance check logic
if datetime.strptime(expiry, "%Y-%m-%d") > datetime.now():
print("Compliance: 🟢 Document Valid for Employment")
else:
print("Compliance: 🔴 Action Required - Document Expired")
else:
print(f"❌ Extraction Failed: {result.get('error')} - {result.get('message')}")
except Exception as e:
print(f"Error: {e}")Standardized JSON Output
Receive deterministic, cleanly structured compliance data ready for immediate insertion into your employee records database.
{
"success": true,
"data": {
"type": "passport",
"country_code": "IND",
"nationality": "INDIAN",
"passport_number": "Z1234567",
"surname": "SHARMA",
"given_names": "RAHUL",
"sex": "M",
"date_of_birth": "1988-07-22",
"place_of_birth": "NEW DELHI",
"date_of_issue": "2021-04-10",
"date_of_expiry": "2031-04-09",
"issuing_authority": "MINISTRY OF EXTERNAL AFFAIRS",
"country_specific": {
"last_page": {
"father_name": "AMIT SHARMA",
"mother_name": "SITA SHARMA",
"spouse_name": "PRIYA SHARMA",
"address": "FLAT 4B, GREENWOOD APARTMENTS, NEW DELHI PIN: 110001, INDIA",
"old_passport_number": "P7654321",
"old_passport_issue_date": "2010-01-05",
"old_passport_issue_place": "DELHI",
"file_no": "DL1076071103622",
"ecr_status": null
}
}
}
}Frequently Asked Questions
How does StructOCR ensure GDPR compliance for remote hiring?
Images are kept for at most 24 hours for quality spot-checks, then deleted. We never use customer data to train our AI models.
Why is an API-first approach better than an SDK for HR software?
Most modern HR platforms and ATS systems are web-based dashboards where deploying native iOS/Android SDKs is impossible. A pure REST API allows your engineering team to integrate passport verification seamlessly into any web app, backend server, or custom workflow simply by sending HTTP requests.
Can the API reliably extract nationality and expiry dates?
Yes. The API is optimized to extract the 3-letter ISO country code and strictly normalizes all expiry dates into the ISO 8601 `YYYY-MM-DD` format. This allows your HR backend to programmatically determine work eligibility and set up automated expiry reminders without human intervention.
Explore More Travel & KYC Solutions
Passport OCR for Neo-Banks: 24-Hour Retention, SOC 2 Type II
Passport OCR API for neo-bank onboarding: MRZ and VIZ fields as JSON, SOC 2 Type II, and images deleted within 24 hours. No SDK needed. Upload an image to test free.
Automated Hotel Check-In Passport Scanner API
Streamline hotel check-ins with our automated passport scanner API. Extract global guest data instantly without SDKs. Upload an image to test our free live demo.
Crypto KYC Passport API (No SDK)
Passport OCR API for Web3 and Crypto KYC, with 24-hour data retention. Extract global MRZ and VIZ data instantly without SDK bloat. Upload an image to test our free live demo.
DPDP Compliant Indian Passport OCR API
DPDP-friendly OCR API for Indian passports, with 24-hour data retention. Securely extract back-page PII (Address, Parents' Names) for KYC workflows. File, Base64, and URL supported.
GDPR Compliant Passport OCR API
Extract passport data securely with our OCR API; images are deleted within 24 hours. Upload an image to test our free live demo.
India Passport Address Extraction API
Extract highly complex address blocks and PII from Indian passport back pages. OCR API built for global KYC workflows, with 24-hour data retention. Supports Base64, URLs, and direct file uploads.
Indian Passport OCR for KYC
Automate digital KYC. Extract MRZ, family, and address details from Indian Passports for RBI compliance. Upload a test image for a free live API demo.
Indian Passport Family Details OCR
Extract Father, Mother, and Spouse names from the back page of Indian passports for background verification. API-first integration with 24-hour data retention.
ISO 8601 Passport Date Parsing API
Stop writing complex regex. Automatically extract and normalize passport dates to strict ISO 8601 (YYYY-MM-DD) format. Upload an image to test our free live demo.
Passport VIZ Extraction API for Airlines
Automate airline check-ins by extracting both MRZ and VIZ passport data instantly via a pure REST API. Upload an image to test our free live demo today.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Tesseract & PassportEye vs. StructOCR Passport API
A technical evaluation for developers deciding between open-source MRZ scanners and a dedicated cloud-based Passport OCR API.
Add Passport OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a v0 by Vercel app through a secure Next.js server route.
AWS Textract vs. StructOCR API for Indian Passport Back Page Extraction
Why generic OCR fails at parsing the back page of Indian passports, and how a dedicated KYC API instantly extracts structured addresses, PIN codes, and family details.
AWS Textract & Google Vision vs. StructOCR Passport API
How AWS Textract AnalyzeID, Google Cloud Vision OCR, and the StructOCR Passport API differ for passport data, quoting each vendor’s own documentation.
Add Passport OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a Bolt.new app. Build travel, hospitality, and global KYC flows right in your browser.
Add Passport OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API using the Cursor AI code editor. Build travel, hospitality, and global KYC flows rapidly.
From tutorial to production in 5 minutes.
You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.