Netherlands Identiteitskaart OCR Python SDK
Instantly extract data from Dutch IDs using our native Python library.
Parsing Identiteitskaart Challenges
Netherlands Identiteitskaart poses OCR challenges due to variations in layout, especially with newer and older card designs. Additionally, the print quality on some cards can be inconsistent, leading to difficulties in accurate text recognition.
Why StructOCR for Netherlands
StructOCR's model is specifically trained on a large dataset of Dutch Identiteitskaart images, ensuring high accuracy for national id ocr extraction. The Python SDK simplifies the integration process with just a few lines of code, allowing you to quickly extract data, including the 14 digits structure of the ID, and automate your workflows.
Common Use Cases in Netherlands
- Digital Onboarding: Verify users for Fintech apps in Netherlands.
- Telecom Registration: Automate SIM card registration with Identiteitskaart.
- Hotel Check-in: Speed up guest registration workflows.
Python SDK Integration
Install the SDK via pip: `pip install structocr`. Then use the following code.
Prerequisite: Python 3.6+ and `structocr` library installed.
from structocr import StructOCR
# Get 200 free credits:
# 👉 https://structocr.com/register
# Initialize with your API Key
client = StructOCR("YOUR_API_KEY_HERE")
def scan_netherlands_id():
# Note: Supports JPG, PNG, WebP (Max 4.5MB)
# Target: Identiteitskaart
image_path = "netherlands_national_id.jpg"
try:
print(f"Scanning {image_path}...")
# The SDK handles file upload and API communication
# It automatically detects that this is a Dutch 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("✅ Netherlands 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')}")
# MRZ Extraction
additional = data.get('additional_fields', {})
if additional.get('mrz_line_1'):
print("\n🔍 MRZ Data Found:")
print(additional.get('mrz_line_1'))
print(additional.get('mrz_line_2'))
print(additional.get('mrz_line_3') or "")
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_netherlands_id()Technical Specs
- •Latency: < 4s (Average)
- •Availability: Served from Cloudflare's global edge network
- •Security: AES-256 Encryption & SOC2 Compliant
- •Input: JPG, PNG, WebP (Max 4.5MB)
- •Output: JSON (Structured Data)
Key Features
- •Native Script Support: Reads English and local characters.
- •MRZ Extraction: Automatically parses Machine Readable Zone (MRZ) lines for enhanced data validation and identity verification.
- •Blur Detection: Automatically rejects blurry images.
- •Fraud Check: Validates Identiteitskaart number format.
- •Smart Crop: Removes background noise automatically.
JSON Response Example
The SDK returns a Python dictionary matching this JSON structure.
{
"success": true,
"data": {
"type": "national_id",
"country_code": "NLD",
"nationality": "NEDERLANDSE",
"document_number": "SPECI2014",
"card_series": "",
"personal_number": "123456782",
"surname": "DE VRIES",
"given_names": "JAN",
"sex": "M",
"date_of_birth": "1990-05-15",
"place_of_birth": "'S-GRAVENHAGE",
"address": "Kalverstraat 10, 1012 PD Amsterdam",
"date_of_issue": "2020-01-01",
"date_of_expiry": "2030-01-01",
"issuing_authority": "Burgemeester van Amsterdam",
"additional_fields": {
"phone_number": null,
"tramite_number": null,
"ejemplar": null,
"mrz_line_1": "I<NLDSPECI2014<<<<<<<<<<<<<<<<",
"mrz_line_2": "9005152M3001014NLD123456782<<0",
"mrz_line_3": "DE<VRIES<<JAN<<<<<<<<<<<<<<<<<"
}
}
}Frequently Asked Questions
Does the Python SDK handle image uploads?
Yes, the SDK automatically handles base64 encoding and file uploads.
Is data stored?
Only briefly. Uploaded images and results are kept for at most 24 hours for quality spot-checks, then deleted.
How to handle errors?
The SDK result dictionary contains a 'success' boolean and an 'error' message if failed.
You May Also Like
Related tutorials, platform guides, and comparisons
Netherlands Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Netherlands passports with a server-side integration.
Indonesia KTP (e-KTP) OCR Python SDK
Python Tutorial: Automate KYC in Indonesia. Extract data from KTP (e-KTP) using StructOCR Python SDK. Supports native text.
Senegal Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Senegal passports with a server-side integration.
Panama Documento de Identidad OCR API
Python Tutorial: Automate KYC in Panama. Extract data from the Panamanian Documento de Identidad using the StructOCR API. Supports file uploads, Base64, and URLs. Try our free upload test today!
Uganda National ID Card OCR Python SDK
Python Tutorial: Automate KYC in Uganda. Extract data from National ID Card using StructOCR Python SDK. Supports native text and MRZ extraction.
Czech Republic Občanský průkaz OCR Python SDK
Python Tutorial: Automate KYC in the Czech Republic. Extract Czech text with diacritics, Rodné číslo, and validate TD1 MRZ from Občanský průkaz.
Morocco CNIE OCR Python SDK
Python Tutorial: Automate KYC in Morocco. Extract data from CNIE using StructOCR Python SDK. Supports native text and MRZ extraction.
Nigeria NIN Slip OCR Python SDK
Python Tutorial: Automate KYC in Nigeria. Extract data from NIN Slip using StructOCR Python SDK. Supports native text.
Malaysia MyKad OCR Python SDK
Python Tutorial: Automate KYC in Malaysia. Extract data from the Malaysian Identity Card (MyKad) using StructOCR Python SDK. Supports NRIC extraction and multi-line address parsing.
Mexico INE OCR API & Python SDK
Python Tutorial: Automate KYC in Mexico. Extract data from INE cards using our SDK. Upload your ID image to test the OCR engine live—no signup required. Supports native text and MRZ.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
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 Receipt OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR receipt API into a Lovable.dev app. No backend required — just paste a prompt and add your API key.
Add VIN OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR VIN scanner API into a Lovable.dev app. Build automotive and fleet tools with zero backend required.
Manual TOS Entry vs. Container OCR Automation API
Analyzing the ROI and operational efficiency of replacing manual gate checkers with an automated Container OCR API in logistics yards.
OpenALPR vs. StructOCR API for VIN Decoding
Why traditional License Plate Recognition (ALPR) engines are not suitable for scanning Vehicle Identification Numbers (VINs).
Add Container OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Replit application. Build logistics and yard management tools 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.