Philippines UMID OCR Python SDK
Instantly extract data from Filipino IDs using our native Python library.

Parsing UMID Challenges
1. Lamination & Wear: UMID cards are often laminated, causing glare that obstructs standard OCR engines. Years of use can also lead to faded text and scratches, making data extraction unreliable. 2. Unstructured Address: The address field on a UMID card is a multi-line, free-text block with various local abbreviations (e.g., Brgy., Blk, St.). Parsing this into structured components is a significant challenge for generic OCR tools.
Why StructOCR for Philippines
Our AI model is specifically pre-trained on tens of thousands of Filipino documents, including various generations of the UMID card, making it an effective national id ocr solution. It intelligently handles glare, wear-and-tear, and accurately performs information parsing for complex Filipino addresses. The Python SDK abstracts all the complexity, allowing you to integrate robust UMID OCR into your application in minutes.
Common Use Cases in Philippines
- Fintech & e-Wallet KYC: Onboard and verify users for financial apps in seconds, complying with BSP regulations.
- Automated SIM Registration: Streamline the mandatory SIM card registration process by extracting data from UMID.
- Digital Loan Applications: Accelerate loan processing by automatically populating applicant data from their ID.
Live Demo: ID card scanner
No registration required. Upload a file to test the extraction.
Drop files here or click to browse
JPG · PNG · WebP · up to 500 files · max 4.5 MB each
Python SDK Integration
Install the SDK via pip: `pip install structocr`. Then use the following code to extract data.
Prerequisite: Python 3.6+ and the `structocr` library installed.
Prefer another stack? Open the Node.js SDK + Express integration.
from structocr import StructOCR
# 💰 Save 30%+ vs competitors. Get 200 free credits instantly:
# 👉 https://structocr.com/register
# Initialize with your API Key
client = StructOCR("YOUR_API_KEY_HERE")
def scan_philippines_id():
# Note: Supports JPG, PNG, WebP (Max 4.5MB)
# Target: UMID
image_path = "philippines_national_id.jpg"
try:
print(f"Scanning {image_path}...")
# The SDK handles file upload and API communication
# It automatically detects that this is a Filipino document
result = client.scan_national_id(image_path)
# Check success flag (SDK returns a dict matching the JSON response)
if result.get('success'):
data = result['data']
print("✅ Philippines Extraction Successful!")
# Basic Identity
print(f"Region: {data.get('country_code')} (Series: {data.get('card_series')})")
print(f"Name: {data.get('given_names')} {data.get('surname')}")
print(f"ID Number: {data.get('document_number')}")
# Critical Field: Personal Identity Number (CNP/CPF/NIN)
print(f"Personal #: {data.get('personal_number')}")
# Demographics
print(f"DOB: {data.get('date_of_birth')} ({data.get('sex')})")
print(f"Address: {data.get('address')}")
else:
print(f"❌ Extraction Failed: {result.get('error')}")
except Exception as e:
# Handle SDK or Network errors
print(f"An error occurred: {e}")
if __name__ == "__main__":
scan_philippines_id()Technical Specs
- •Latency: < 3s (Average)
- •Uptime: 99.9% SLA
- •Security: AES-256 Encryption & SOC2, GDPR Compliant
- •Input: JPG, PNG, WebP (Max 4.5MB)
- •Output: Structured JSON
Key Features
- •CRN Checksum Validation: Performs algorithmic checks on the Common Reference Number (CRN) to flag invalid formats.
- •Glare & Blur Detection: Automatically rejects low-quality images to ensure high accuracy and prevent fraudulent submissions.
- •Smart Cropping: Auto-detects and crops the ID card from any background, improving focus and recognition rates.
- •Address Parsing: Intelligently structures the full address into components like street, city, and barangay.
JSON Response Example
A successful API call returns a Python dictionary that mirrors this JSON structure. Note that UMID cards do not have expiry dates, issue dates, or a Machine Readable Zone (MRZ), so these fields are returned as null inside the response and the `additional_fields` object.
{
"success": true,
"data": {
"type": "national_id",
"country_code": "PHL",
"nationality": "FILIPINO",
"document_number": "CRN-0033-1234567-8",
"card_series": "",
"personal_number": "CRN-0033-1234567-8",
"surname": "DELA CRUZ",
"given_names": "JUAN",
"sex": "M",
"date_of_birth": "1988-11-23",
"place_of_birth": "",
"address": "123 RIZAL AVE, BRGY. SAN ROQUE, PASAY CITY, METRO MANILA",
"date_of_issue": null,
"date_of_expiry": null,
"issuing_authority": "Republic of the Philippines",
"additional_fields": {
"mrz_line_1": null,
"mrz_line_2": null,
"mrz_line_3": null,
"tramite_number": null,
"ejemplar": null,
"phone_number": null
}
}
}Frequently Asked Questions
Does the Python SDK handle different UMID card versions?
Yes, our model is trained on all versions of the UMID card, including the older SSS-issued and newer GSIS-issued cards.
Does the UMID card contain an MRZ?
No, standard Philippine UMID cards do not have a Machine Readable Zone (MRZ). Consequently, our API will return null for MRZ fields within the `additional_fields` object when parsing UMIDs.
How is data privacy handled for Filipino users?
We are fully compliant with the Philippines Data Privacy Act (RA 10173). Images are processed in-memory and permanently deleted post-extraction. We do not store any personal data.
Can I get a free trial API key for testing?
Absolutely. You can sign up on our dashboard and get a free API key with test credits to integrate and evaluate the SDK.
You May Also Like
Related tutorials, platform guides, and comparisons
Philippines Driver License OCR with Python SDK
Extract structured fields from a Philippines LTO driver's license with the StructOCR Python SDK and FastAPI.
Philippines Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Philippines passports with a server-side integration.
Philippines Driver License OCR with Node.js SDK
Extract structured fields from a Philippines LTO driver's license with the StructOCR Node.js SDK and TypeScript + Express.
Philippines PhilID OCR with Node.js SDK
Extract PhilSys Card Number, names, dates and other visible fields from Philippine Identification Card (PhilID) with the StructOCR Node.js SDK and Express.
Italy Carta di Identità OCR Python SDK
Python Tutorial: Automate KYC in Italy. Extract data from Carta di Identità Elettronica (CIE) using StructOCR Python SDK. Supports native text, Codice Fiscale, and MRZ extraction.
Serbia Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Serbia passports with a server-side integration.
Uzbekistan ID Karta OCR Python SDK
Python Tutorial: Automate KYC in Uzbekistan. Extract data from ID Karta using StructOCR Python SDK. Supports native text and MRZ parsing.
Vietnam CCCD OCR Python SDK
Python Tutorial: Automate KYC in Vietnam. Extract data from the Vietnamese Identity Card (Căn cước công dân / CCCD) using StructOCR Python SDK. Supports native text, diacritics, and MRZ extraction.
Vietnam Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Vietnam passports with a server-side integration.
Vietnam Passport OCR with Node.js SDK
Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Vietnam passports.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add National ID OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Bolt.new app. Build KYC and identity verification flows right in your browser.
Add National ID OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API using the Cursor AI code editor. Build KYC and identity verification flows rapidly.
Add National ID OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Lovable.dev app. Build KYC and identity verification flows with zero backend.
Add National ID OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Replit application. Build KYC and identity verification flows using Replit Agent and Secrets.
Add National ID OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a v0 by Vercel app. Build KYC and identity verification flows with zero backend.
VIN Barcode Scanner vs. VIN OCR API: Which is Better for Mobile Apps?
Deciding between local VIN barcode scanners and cloud-based VIN OCR API for your mobile app? Learn why OCR is the required fallback for damaged or chassis-stamped VINs.
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.