Saint Lucia passport OCR API

Send a photo of a Saint Lucian passport and get structured data back in the same HTTP response — the machine-readable zone parsed, the ICAO 9303 check digits verified and the visual fields extracted. No SDK to install, no queue to poll.

Recognising a Saint Lucia passport

A Saint Lucia passport follows the ICAO 9303 standard: a two-line, 44-character machine-readable zone (format TD3) printed at the foot of the data page, above the human-readable visual inspection zone. Its first five characters are P<LCA — the document code, then the issuing state as the ISO 3166-1 alpha-3 code LCA. The API reads both zones, cross-checks the MRZ check digits, and returns one response shape with every key present.

Saint Lucia is LC in an alpha-2 list and LCA in the zone: here the longer code is the shorter one with A after it. That holds for this pair and not as a rule, so deriving one from the other is a bug waiting for the first country it does not fit.

Machine-readable zones issued by Saint Lucia

9303 defines three zone layouts, and the API reads all three. Below is one invented holder — she is nobody, and paradeigma is the Greek word for example — in each layout, with LCA as the issuing state. Every check digit is computed from the characters beside it rather than typed in, so each zone here validates.

TD3 — Saint Lucia passport

2 lines of 44. Nationality LCA. Issuing state and nationality are both LCA: a passport certifies the nationality of the state that issued it.

P<LCAPARADEIGMA<<ELENI<SOFIA<<<<<<<<<<<<<<<<
AM73045184LCA9403084F3203101PN48291630<<<<72

TD2 — Travel document issued by Saint Lucia

2 lines of 36. Nationality GRC. Issued by LCA to a GRC national, so the two codes differ. The name has 31 characters here instead of the passport's 39.

I<LCAPARADEIGMA<<ELENI<SOFIA<<<<<<<<
TR61850420GRC9403084F2911043<<<<<<<2

TD1 — Identity card or residence permit issued by Saint Lucia

3 lines of 30. Nationality GRC. Three lines of 30, with the name on a line of its own. The document code is ID — 9303 part 5 fixes the first character as A, C or I and leaves the second to the issuing state.

IDLCAAK472913<4PN48291630<<<<<
9403084F3405204GRC<<<<<<<<<<<9
PARADEIGMA<<ELENI<SOFIA<<<<<<<

No check digit covers the issuing state: on all three layouts the arithmetic runs over the document number, the dates and the optional data, never over the three characters that say who issued the document. A zone whose digits all pass has not proved it came from Saint Lucia — the visual zone and the document's own security features do that.

Paste an MRZ into the MRZ checker to validate its check digits, or build one with the MRZ generator.

Fields you get back

Every recognised Saint Lucian passport returns the same structured fields. A value that could not be read is null, never a missing key.

  • Surname and given names
  • Date of birth and sex
  • Document number and personal number
  • Nationality and issuing state (LCA)
  • Issue and expiry dates, days remaining
  • The MRZ verdict, and the lines it was read from

See every field in the document field explorer.

Make the call

Run this against the public sandbox — no registration, real recognition, free for a limited number of documents and 10 requests per hour per IP. Swap the sandbox key for your own live key to keep recognising Saint Lucian passports.

curl -X POST https://api.doc.cheap/v1/scans \
  -H "Authorization: Bearer sk_sandbox_public" \
  -H "Content-Type: application/json" \
  -d "{\"image\": \"$(base64 < document.jpg | tr -d '\n')\"}"

Where this is documented

This page covers what is specific to Saint Lucia. The four pages below carry everything that is not.

  • Recognize a passport

    The call above with a real document, in curl, JavaScript and Python, and every key of the answer read out.

  • The MRZ and the visual zone

    Why a document prints the same facts twice, which zone to believe when they disagree, and what the check digits above can and cannot prove.

  • Field languages and scripts

    The zone is Latin transliteration; the visual zone is not. Which reading carries the original script, and how a language identifier resolves to a language.

  • Errors

    Every error code the API can answer with, in one table: what causes it, whether a retry can succeed, and whether the call was billed.

Start recognising Saint Lucian passports

First successful call in under 60 seconds, 1¢ per document, and the document image is never stored.

You pay only for documents we actually recognise.

Blurry photo, no document in frame, unknown type — free. You never pay for a failed scan.