Irish Passport OCR with Python SDK

Read a supported Irish passport image or PDF in a server-side Python SDK integration.

Irish passport OCR workflow
Structured passport extraction for documents issued by Ireland.

Extracting Data from Irish Passports

Irish passports combine printed identity fields, dates and a machine-readable zone on a security-patterned page. Capture quality, glare and perspective can make manual entry or plain text OCR difficult to use in a repeatable backend workflow.

Passport Extraction with the Python SDK

The StructOCR passport endpoint returns normalized passport fields from a readable Base64-encoded image or PDF. Your application can use the result to pre-fill a form or send it to a review step without maintaining its own field-parsing rules.

Common Integration Scenarios

  • Travel onboarding: Pre-fill passport details before the traveller confirms them.
  • Customer records: Move visible identity and expiry information into an internal review workflow.
  • Document intake: Return consistent JSON to a small-volume application or operations team.

Live Demo: Passport 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 Passport scans).

Irish Passport OCR with Python SDK

The official Python SDK reads a supported local file and calls /v1/passport. Open the FastAPI tab for a server route using the same SDK method.

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

Prefer another stack? Open the Node.js SDK + Express integration.

import os
from structocr import StructOCR

client = StructOCR(os.environ["STRUCTOCR_API_KEY"])
result = client.scan_passport("passport.jpg")

if result.get("success"):
    data = result["data"]
    print(data.get("document_number") or data.get("passport_number"))
    print(data.get("given_names"), data.get("surname"))
else:
    print(result.get("error"))

Technical Specs

  • Endpoint: POST /v1/passport
  • 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

  • Passport fields: Returns document number, holder name, nationality and birth details when visible.
  • Validity dates: Extracts issue and expiry dates when present and readable.
  • Issuing data: Includes country code, place of birth and issuing authority when available.
  • Server-side SDK: Encodes the local file and sends the JSON request from your backend.

JSON Response Example

This sample shows the normalized fields returned for a readable Irish passport; unavailable fields can be null.

{
  "success": true,
  "data": {
    "type": "passport",
    "country_code": "IRL",
    "nationality": "IRISH",
    "passport_number": "P1234567",
    "surname": "DOE",
    "given_names": "ALEX",
    "sex": "X",
    "date_of_birth": "1990-01-01",
    "place_of_birth": "DUBLIN",
    "date_of_issue": "2024-05-10",
    "date_of_expiry": "2034-05-09",
    "issuing_authority": "PASSPORT SERVICE"
  }
}

Frequently Asked Questions

Can the API scan a PDF of a Irish passport?

Yes. The endpoint accepts a Base64-encoded JPG, PNG, WebP or PDF up to 4.5MB. Keep the API key on the server.

Does OCR replace document verification?

No. OCR extracts readable fields. Use your own review, identity and compliance controls when authenticity or eligibility decisions are required.

You May Also Like

Related tutorials, platform guides, and comparisons

Country Tutorial

Irish Passport OCR with Node.js SDK

Use the StructOCR Node.js SDK and TypeScript + Express to extract visible identity, validity and MRZ fields from Irish passports.

Node.js · Passport
Country Tutorial

France Passport OCR with Python SDK

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

Python · Passport
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

Bulgaria Passport OCR with Python SDK

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

Python · Passport
Country Tutorial

Mexico Passport OCR with Python SDK

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

Python · Passport
Country Tutorial

Vietnam Passport OCR with Python SDK

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

Python · Passport
Country Tutorial

Côte d'Ivoire Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Côte d'Ivoire passports with a server-side integration.

Python · Passport
Country Tutorial

Colombia Passport OCR with Node.js SDK

Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Colombia passports.

Node.js · Passport
Country Tutorial

Chile Passport OCR with Node.js SDK

Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Chile passports.

Node.js · Passport
Country Tutorial

Côte d'Ivoire Passport OCR with Node.js SDK

Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Côte d'Ivoire passports.

Node.js · Passport

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