Colombia Cédula OCR Python SDK

Instantly extract data from Colombian Identity Cards (Cédula de Ciudadanía) using our native Python library.

James | Technical LeadUpdated 2026-06-04
AI extracting data from a Colombia ID card
StructOCR engine analyzing a Colombian Cédula de Ciudadanía in real-time.

Parsing Cédula de Ciudadanía Challenges

The Colombian Cédula de Ciudadanía poses unique OCR challenges. Accurately extracting the Número Único de Identificación Personal (NUIP), parsing complex Spanish multi-line structures, and handling holographic overlays require highly specialized computer vision models to ensure accurate data capture.

Why StructOCR for Colombia

StructOCR's model is specifically trained on a large dataset of Latin American ID images, ensuring high accuracy for national id ocr extraction. The v1.4.0 Python SDK simplifies the integration process, while our Cloudflare Workers infrastructure ensures ultra-low latency processing. With just a few lines of code, you can extract structural data, including the NUIP mapped directly to the personal number field, to fully automate your verification workflows.

Common Use Cases in Colombia

  • Digital Onboarding: Verify users for Fintech apps, digital wallets, and banking services across Colombia.
  • Telecom & Utility Registration: Automate document parsing for mobile SIM card sales and essential service applications.
  • Notary & Legal Tech: Speed up identity verification for contract signing and legal document processing.

Live Demo: ID card scanner

No registration required. Upload a file to test the extraction.

1
Upload
2
Results

Drop files here or click to browse

JPG · PNG · WebP  ·  up to 500 files · max 4.5 MB each

No files selected
Need more testing? Create a free account to get 200 free credits (equals 100 National ID scans).

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

# 💰 Note: Deposit via Crypto (USDT/USDC) to automatically receive a 10% credit bonus.
# Initialize with your API Key
client = StructOCR("YOUR_API_KEY_HERE")

def scan_colombia_id():
    # Note: Supports JPG, PNG, WebP (Max 4.5MB)
    # Target: Cédula de Ciudadanía
    image_path = "colombia_national_id.jpg"

    try:
        print(f"Scanning {image_path}...")
        
        # The SDK handles file upload and API communication
        # It automatically detects that this is a Colombian 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("✅ Colombia Extraction Successful!")
            
            # Basic Identity
            print(f"Region:      {data.get('country_code')}")
            print(f"Name:        {data.get('given_names')} {data.get('surname')}")
            
            # Critical Field: NUIP (Personal Identification Number)
            print(f"NUIP:        {data.get('personal_number')}")
            
            # Demographics
            print(f"DOB:         {data.get('date_of_birth')} ({data.get('sex')})")
            print(f"Birthplace:  {data.get('place_of_birth')}")
            
        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_colombia_id()

Technical Specs

  • Latency: < 4s (Average)
  • Uptime: 99.9% SLA
  • Security: AES-256 Encryption & SOC2 Compliant
  • Input: JPG, PNG, WebP (Max 4.5MB)
  • Output: JSON (Structured Data)

Key Features

  • Native Spanish Support: Reads Spanish names, special characters, and regional formatting seamlessly.
  • NUIP Extraction: Automatically extracts and validates the Número Único de Identificación Personal (NUIP).
  • Date Normalization: Standardizes issue dates and birth dates into a consistent `YYYY-MM-DD` format.
  • Smart Crop & Blur Detection: Rejects blurry images and removes background noise automatically to ensure high precision.

JSON Response Example

The SDK returns a Python dictionary matching this JSON structure.

{
  "success": true,
  "data": {
    "type": "national_id",
    "country_code": "COL",
    "nationality": "COLOMBIANA",
    "document_number": "1098765432",
    "card_series": "",
    "personal_number": "1098765432",
    "surname": "GARCÍA PÉREZ",
    "given_names": "CARLOS ARTURO",
    "sex": "M",
    "date_of_birth": "1992-08-15",
    "place_of_birth": "BOGOTÁ, D.C.",
    "address": null,
    "date_of_issue": "2010-08-20",
    "date_of_expiry": null,
    "issuing_authority": "REGISTRADURÍA NACIONAL DEL ESTADO CIVIL",
    "additional_fields": {
      "phone_number": null,
      "tramite_number": null,
      "ejemplar": null,
      "mrz_line_1": null,
      "mrz_line_2": null,
      "mrz_line_3": null
    }
  }
}

Frequently Asked Questions

Does the Python SDK handle image uploads?

Yes, the SDK automatically handles base64 encoding and file uploads.

Is data stored?

No. Images are processed in-memory and deleted immediately to comply with global data privacy regulations and Latin American data protection standards.

How to handle errors?

The SDK result dictionary contains a 'success' boolean and an 'error' code (e.g., FILE_TOO_LARGE) if failed.

You May Also Like

Related tutorials, platform guides, and comparisons

Country Tutorial

Ukraine Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Ukraine passports with a server-side integration.

Python · Passport
Country Tutorial

Morocco Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Morocco passports with a server-side integration.

Python · Passport
Country Tutorial

Ghana Ghana Card OCR Python SDK

Python Tutorial: Automate KYC in Ghana. Extract data, Personal ID Number, and validate TD1 MRZ from Ghana Card using StructOCR Python SDK.

Python · ghana card
Country Tutorial

Ukraine National ID OCR Python SDK

Python Tutorial: Automate KYC in Ukraine. Extract data from National ID using StructOCR Python SDK. Supports native text and MRZ extraction.

Python · National ID
Country Tutorial

Bangladesh Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Bangladesh passports with a server-side integration.

Python · Passport
Country Tutorial

Sweden Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Sweden passports with a server-side integration.

Python · Passport
Country Tutorial

Brazil CIN OCR Python SDK: Extract CPF & MRZ

Python Tutorial: Automate KYC in Brazil. Extract Portuguese text, CPF numbers, and validate TD1 MRZ from the new CIN using the StructOCR Python SDK.

Python · carteira de identidade (cin)
Country Tutorial

Bangladesh Smart NID OCR Python SDK

Python Tutorial: Automate KYC in Bangladesh. Extract complex Bengali text and decode 2D barcodes from Smart NIDs using StructOCR Python SDK.

Python · National ID
Country Tutorial

Belgium eID OCR Python SDK

Python Tutorial: Automate KYC in Belgium. Extract data from Electronic Identity Card (eID) using StructOCR Python SDK. Supports native text, National Register Number, and MRZ extraction.

Python · eid
Country Tutorial

Bulgaria Lichna karta (Лична карта) OCR Python SDK

Python Tutorial: Automate KYC in Bulgaria. Extract Cyrillic/Latin text, EGN (ЕГН), and validate TD1 MRZ from Lichna karta using StructOCR Python SDK.

Python · lichna karta (лична карта)

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

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.

Instant Access Cancel Anytime 99.9% Uptime