DPDP Compliant Indian Passport OCR
Process highly sensitive Indian passport back-page data with total peace of mind. Our API keeps data for at most 24 hours, which helps with privacy and DPDP Act obligations.
200 free credits = 100 Passport scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

The Risk of Storing Back-Page PII
With the enforcement of India's Digital Personal Data Protection (DPDP) Act, storing or mishandling Personally Identifiable Information (PII)—especially dense back-page data like residential addresses, father's name, and file numbers—exposes businesses to severe regulatory penalties. Relying on legacy OCR vendors that save your images to train their models is a massive compliance risk. For comprehensive compliance strategies in global user onboarding, explore our travel identity verification solutions.
StructOCR: 24-Hour Data Retention at the Edge
StructOCR keeps uploaded images and results for at most 24 hours for quality spot-checks, then deletes them. Powered by our core Passport OCR engine, your images are sent over HTTPS and processed on Cloudflare's edge network. Because we deliver a pure, lightweight API rather than a restrictive SDK, integration is completely within your control. Your users' documents are kept for at most 24 hours for quality spot-checks, then deleted.
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 Industry Applications
Regulated Financial Services (Banks & NBFCs)
Process complex KYC workflows without creating third-party data liabilities. Scale your operations globally with borderless payment options. View our API pricing (USDT/Crypto supported for international SaaS teams).
Healthcare Onboarding
Extract identity and residential address data for patient records while maintaining strict medical privacy standards.
Telecom SIM Activation
Instantly verify proof of address (PoA) from the passport back page at the point of sale, completely eliminating manual data entry.
Enterprise HR Tech
Manage employee background checks and document verification securely without expanding your organization's attack surface.
Technical Specs
- 24-Hour Data Retention: Images and JSON are deleted within 24 hours (DPDP).
- Edge Architecture: Cloudflare deployment ensures processing occurs physically closer to the request origin.
- Input Flexibility: Seamlessly accepts direct File Uploads, Base64 strings, or Image URLs.
- Format Agnostic: Pure API architecture completely eliminates SDK bloat and version conflicts.
Key Features
- Full Back Page Data: Extracts Address, PIN, Father Name, Mother Name, Spouse Name, and File Number with pinpoint accuracy.
- Address Normalization: Handles multi-line Indian residential addresses, cleanly separating street, locality, and PIN codes.
- Rapid Response: Highly optimized inference models prevent timeouts in complex secure KYC pipelines.
Integration & AI Prompts
Call the API directly using raw files, Base64 strings, or Image URLs. For deep dive integration specs, consult our official Passport OCR Developer Documentation.
import requests
import base64
# 📚 Developer Docs: https://structocr.com/developers/passport-ocr
# Note: StructOCR is API-first. It natively supports File Uploads,
# Base64-encoded strings, and direct Image URLs.
# Below is a secure Base64 implementation.
with open("india_passport_back.jpg", "rb") as image_file:
base64_image = base64.b64encode(image_file.read()).decode('utf-8')
url = "https://api.structocr.com/v1/passport/india/back-page"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"img": base64_image
}
try:
# Data is processed at the edge; images are deleted within 24 hours
print("Processing Indian Passport Data...")
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get('success'):
print("✅ Secure Extraction Complete!\n")
# Extract Core Information
core_data = result['data']
print(f"Name: {core_data.get('given_names')} {core_data.get('surname')}")
print(f"Passport No: {core_data.get('passport_number')}")
# Extract India-Specific Back Page Data
back_page = core_data['country_specific']['last_page']
print(f"Address: {back_page.get('address')}")
print(f"Father Name: {back_page.get('father_name')}")
else:
print(f"❌ Extraction Failed: {result.get('error')} - {result.get('message')}")
except Exception as e:
print(f"Error: {e}")Standardized JSON Output
Securely receive the structured payload and immediately map it to your encrypted 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
Do you provide an SDK for mobile integration?
StructOCR is intentionally designed as an API-first platform rather than providing proprietary SDKs. This allows you to use your preferred language wrappers and eliminates app size bloat, while natively supporting file uploads, Base64, and URLs directly from your backend.
How does the API handle complex, multi-line Indian addresses on the back page?
Our models are specifically trained on the layout typography of Indian passports. It captures the entire address block and structural elements like the PIN code with high fidelity, regardless of line breaks.
Is the API suitable for enterprise compliance audits?
Yes. We hold SOC 2 Type II, and images are deleted within 24 hours, which helps with DPDP compliance requirements.
Explore More Travel & KYC Solutions
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.
Proof of Address (PoA) OCR India
Automate PoA verification. Extract and validate permanent residential addresses from Indian passport back pages. API-first integration with 24-hour data retention.
Remote Hiring Identity OCR API
Automate global remote hiring with our identity OCR API; images are deleted within 24 hours. Extract passport data securely without SDKs. Upload an image to test our free live demo.
REST API for Global Passport MRZ
Extract global passport MRZ data instantly via our fast REST API. No SDK required. Upload an image to test our live demo for free.
Right to Work Passport Verification API
Automate global HR compliance. Extract passport data instantly with our OCR API; images are deleted within 24 hours. No SDK required. Upload an image to test our free live demo.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
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.
Extracting ECR Status & File Numbers: Generic OCR vs. StructOCR Indian Passport API
Learn why generic text extractors fail to capture critical Indian KYC fields like ECR status and File Numbers, and how a specialized API structures this data automatically.
Heavy KYC SDKs vs. StructOCR Passport API for Mobile Apps
Discover why modern app developers are abandoning bulky on-device OCR SDKs in favor of lightweight, edge-deployed Passport APIs.
Add Passport OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a Lovable.dev app through a secure server-side function for travel and KYC flows.
Add Passport OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a Replit application. Build travel, hospitality, and global KYC flows using Replit Agent and Secrets.
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.