Looking to implement seamless ID document scanning on your website or app? Meet DOCSCAN, PixLab's developer-first, SDK-free REST API that extracts structured data from government-issued IDs - all in a single API call.
What is DOCSCAN?
DOCSCAN is a high-performance REST API endpoint from the PixLab Vision Platform designed for document scanning, facial extraction, and structured ID data retrieval.
It supports over 11,000 official ID types - passports, national IDs, driver's licenses, visas, and more - from 200+ countries and territories.
Whether you’re building ID scanning flows, onboarding forms, or access control systems, DOCSCAN provides a fast and reliable foundation.
Why Developers Love DOCSCAN
- ✅ SDK-Free: Works with any language or backend that can make HTTPS requests - no libraries, no vendor lock-in.
- 🌍 Global Coverage: Supports official ID formats from nearly every country on earth.
- 💡 Automatic Field Extraction: Get structured data like full name, birthdate, nationality, and document number from a single image.
- 🧠 Built-In Face Detection: Crop the user's face from their ID automatically.
- ⚡ Fast JSON Responses: Typical processing time is under 5 seconds.
Step 1: Get an API Key
Start by creating a free account at PixLab Console to obtain your API key.
Step 2: Make Your First API Call (GET)
Here's how to make a simple DOCSCAN request using Python:
import requests
req = requests.get(
'https://api.pixlab.io/docscan',
params={
'img': 'https://i.stack.imgur.com/oJY2K.png', # Publicly accessible image URL
'type': 'passport', # Document type
'key': 'YOUR_PIXLAB_API_KEY' # Replace with your API key
}
)
reply = req.json()
if reply['status'] != 200:
print(reply['error'])
else:
print("Face Crop URL:", reply['face_url'])
print("MRZ Raw Text:", reply['mrz_raw_text'])
print("Full Name:", reply['fields']['fullName'])
print("Date of Birth:", reply['fields']['dateOfBirth'])
📌 Want to upload local files directly? Use a POST request instead.
Step 3: Upload a Local ID (POST Example)
import requests
req = requests.post(
'https://api.pixlab.io/docscan',
files={'file': open('./local_passport.png', 'rb')},
data={
'type': 'passport',
'key': 'YOUR_PIXLAB_API_KEY'
}
)
reply = req.json()
if reply['status'] != 200:
print(reply['error'])
else:
print("Face Crop URL:", reply['face_url'])
print("Document Number:", reply['fields']['documentNumber'])
print("Expiry Date:", reply['fields']['dateOfExpiry'])
Response Breakdown
DOCSCAN responds with a structured JSON object. Key fields include:
-
status
: HTTP code (e.g. 200) -
fields
: Extracted data like full name, birthdate, sex, nationality -
face_url
: Cropped face from the ID -
mrz_raw_text
: Machine-readable zone text block
See full reference here: DOCSCAN API Docs
Supported Documents
DOCSCAN supports:
- Passports (MRZ & non-MRZ)
- National IDs
- Driver's Licenses
- Residence permits
- Birth & death certificates
All supported across 200+ countries. View the full list here.
Bonus: No Storage by Default
All processing happens in RAM, and documents are never stored unless you choose to connect your own AWS S3 bucket.
Try It Out
Start scanning today:
Whether you're building a fintech onboarding flow or automating ID checks at scale, DOCSCAN is the drop-in solution for developers who want power, speed, and flexibility - without dealing with heavy SDKs or complex setup.
Happy scanning! 🔍
Top comments (0)