Philippines Driver License OCR with Node.js SDK

Send a LTO driver's license to the official Node.js SDK and receive normalized identity, validity and licence fields.

Philippines driver license OCR workflow
A server-side Node.js SDK workflow for Philippines driver licence data.

Reading Philippines Driver Licenses

LTO cards include identity data together with agency code, expiry date and permitted vehicle categories. Manual transcription adds delays and creates avoidable formatting errors when a team needs to move licence data into onboarding, rental or mobility systems.

A Server-Side Node.js SDK Workflow

The StructOCR driver license endpoint accepts a Base64-encoded image or PDF and returns normalized fields that are visible on the document. Typical results include the document number, holder name, dates, issuing region, address and vehicle class; optional fields may be null when they are absent or unreadable.

Common Integration Scenarios

  • Vehicle rental: Pre-fill customer and licence details before a vehicle handover.
  • Driver onboarding: Move visible licence fields into a review queue without retyping the card.
  • Fleet operations: Capture licence classes and validity dates for internal driver records.

Live Demo: Driver License OCR 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 Driver License scans).

Philippines Driver License OCR with Node.js SDK

The official Node.js SDK reads a supported local file and calls /v1/driver-license. Open the TypeScript + Express tab for a server route using the same SDK method.

Prerequisite: `npm install structocr`; set the server-side `STRUCTOCR_API_KEY` environment variable.

Prefer another stack? Open the Python SDK + FastAPI integration.

const StructOCR = require("structocr");

const client = new StructOCR(process.env.STRUCTOCR_API_KEY);

async function main() {
  const result = await client.scanDriverLicense("driver-license.jpg");

  if (result.success) {
    const data = result.data;
    console.log(data.document_number);
    console.log(data.given_names, data.surname);
  } else {
    console.error(result.error);
  }
}

main().catch(console.error);

Technical Specs

  • Endpoint: POST /v1/driver-license
  • Input: Base64-encoded JPG, PNG, WebP, or PDF in JSON (Max 4.5MB)
  • Authentication: Server-side x-api-key header handled by the SDK
  • Cost: 2 credits per scan
  • Output: Structured JSON

Key Features

  • Regional output: Returns country and issuing region when visible.
  • Licence fields: Extracts document number, validity dates and vehicle class when present.
  • Identity fields: Returns the printed holder name, birth details and address when readable.
  • Optional details: Preserves supported country-specific fields under extra_details.

JSON Response Example

Fields are returned when present and legible on the submitted licence; country-specific details may appear in extra_details.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "PHL",
    "region": "National Capital Region",
    "document_number": "N01-23-456789",
    "personal_number": null,
    "surname": "SANTOS",
    "given_names": "MARIA LUZ",
    "sex": "F",
    "date_of_birth": "1993-08-16",
    "place_of_birth": "MANILA",
    "date_of_issue": "2024-08-16",
    "date_of_expiry": "2029-08-16",
    "date_of_first_issue": "2018-04-09",
    "issuing_authority": "LAND TRANSPORTATION OFFICE",
    "address": "QUEZON CITY, METRO MANILA",
    "vehicle_class": "A/A1/B/B1/B2",
    "extra_details": {}
  }
}

Frequently Asked Questions

Which fields can the Philippines driver license API return?

The response can include country_code, region, document_number, personal_number, surname, given_names, sex, birth details, issue and expiry dates, issuing_authority, address, vehicle_class and extra_details. Fields not present or not legible can be null.

Can I use the other SDK language?

Yes. This tutorial has a paired Python and FastAPI version linked in the integration section.

You May Also Like

Related tutorials, platform guides, and comparisons

Country Tutorial

Philippines Driver License OCR with Python SDK

Extract structured fields from a Philippines LTO driver's license with the StructOCR Python SDK and FastAPI.

Python · Driver License
Tutorial

Node.js Driver License Verification API

Stop manual driver license checks. Our Node.js API delivers verified data in JSON within <4s, secured by AES-256 encryption and SOC2 compliance. Achieve 98.5% uptime. Upload an image for a free test!

Node.js · Driver License
Country Tutorial

Australia Driver License OCR with Node.js SDK

Extract structured fields from a Australia state or territory driver licence with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

US Driver License OCR with Node.js SDK

Extract structured fields from a United States state-issued driver license with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

Canada Driver License OCR with Node.js SDK

Extract structured fields from a Canada provincial driver licence with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

UK Driver License OCR with Node.js SDK

Extract structured fields from a United Kingdom photocard driving licence with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

Brazil Driver License OCR with Node.js SDK

Extract structured fields from a Brazil Carteira Nacional de Habilitação (CNH) with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

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.

Node.js · National ID
Country Tutorial

UK Driver License OCR with Python SDK

Extract structured fields from a United Kingdom photocard driving licence with the StructOCR Python SDK and FastAPI.

Python · Driver License
Country Tutorial

Canada Driver License OCR with Python SDK

Extract structured fields from a Canada provincial driver licence with the StructOCR Python SDK and FastAPI.

Python · Driver License

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