← Projects

Identity Card OCR API

A Dockerized REST API that extracts structured data from Indonesian government documents using EasyOCR and OpenCV.

The API accepts base64-encoded images or PDFs and returns clean, structured JSON. For image-based documents — KTP (national ID), NPWP (tax ID), and land certificates — EasyOCR handles text recognition with OpenCV preprocessing to handle low-quality scans. Post-processing cleans common OCR artifacts (misread characters, stray symbols) before returning fields like NIK, name, or NPWP number.

PDF-based permit documents (KKPR, PKPLH, SKKL) are parsed with pdfminer.six to detect whether a specific permit is present and extract its reference number. The whole service runs in a single Docker container, making it easy to drop into any stack regardless of the client's language or infrastructure.

Demo — extracting NIK and name from a KTP scan