Skip to content
Constaia

A European alternative to AWS Textract for ID documents

What Amazon Textract AnalyzeID covers, what you have to build on top to validate European ID cards, residence permits and passports, and when an EU-hosted validation API with verdicts is the better fit.

By Constaia team5 min read

Also in: Español

Amazon Textract is one of the most widely used document extraction services, and if you already run on AWS it's the natural choice. For identity documents it has a dedicated operation, AnalyzeID. This article explains what it does, what you'd need to build on top to validate European documents, and when an API like Constaia may fit better. We try to be fair: there are cases where Textract is the better choice.

As of September 2026

AWS pricing and features change. Everything we cite comes from the AWS documentation and pricing page linked in the sources; check them before you decide.

What Textract AnalyzeID does

According to the AWS documentation, AnalyzeID extracts information from passports, driver's licenses and other identity documentation issued by the US Government. It returns three kinds of data:

  • normalised key-value pairs (date of birth, date of issue, document number…),
  • implied fields without an explicit key (name, address, issuing authority),
  • and the full text of the document.

Each field has a confidence score, and you can send the front and back of a license in the same request.

On price, AWS lists AnalyzeID at $0.025 per page in the first tier (up to 100,000 pages a month, US West (Oregon) reference) plus a three-month free tier for new accounts on several features (Textract pricing). In Europe, Textract has endpoints in Frankfurt, Ireland, London, Paris and Spain (Textract endpoints).

What's left to build for European documents

AWS's own documentation focuses AnalyzeID on US documents. For a Spanish DNI, a residence card or a European passport, the usual route is the generic operations (text, forms, queries) plus your own code. This is what's typically missing:

1. Knowing which document it is

OCR gives you text; it doesn't say "this is a residence card, not a national ID" or "this is a driving licence, not what you asked for". You need classification, and a decision about what to do with documents you don't recognise.

2. Deterministic validation

  • Check characters such as the Spanish NIF/NIE letter (modulo 23 against the official table, Ministry of the Interior).
  • MRZ: ICAO 9303 check digits (weights 7-3-1, modulo 10) and consistency between the MRZ and the printed data (ICAO Doc 9303).
  • Dates: expiry against a reference date, minimum or maximum age.

None of this is hard, but it has to be written, tested and maintained for every document type and country.

3. The decision

What your application actually needs is an answer: do I accept this document for this person? That means matching the holder against your data (accents, surname order, typos), turning confidence scores into a decision, and telling the user what went wrong in their language.

4. Privacy

AWS states that its AI services may use and store customer content for service improvement, possibly in a different Region from the one you use, and that you can opt out with an AWS Organizations policy (AI services opt-out policies). It's configurable, but it's one more step to know about, apply and document if you process EU residents' identity documents. And if you upload documents to S3 for analysis, deleting them is up to you.

How Constaia approaches it

Constaia starts from a different question: not "what text is on this?" but "is this the document I expected, and does it work?". You tell it what you expect and which rules to apply:

curl https://api.constaia.com/v1/analyze \
  -H "Authorization: Bearer $CONSTAIA_API_KEY" \
  -F file=@nie.jpg \
  -F 'options={
    "expect": ["es_dni", "es_nie", "eu_id_card", "passport"],
    "checks": {
      "not_expired": true,
      "min_age_years": 18,
      "holder": { "full_name": "Anna Kowalska" }
    },
    "storage": "none",
    "language": "en"
  }'

You get the detected type, fields with confidence, each check (check letter, MRZ, expiry, holder) and a verdict of valid, invalid or review with reasons, such as "Holder does not match" or "Expired on 15/06/2020".

Textract (AnalyzeID + generic operations)Constaia
ID documents covered by the dedicated operationUS Government-issued documentsSpanish and EU ID documents, passports, residence permits, Americas IDs and US documents; 167 types in total
Document type classificationTo buildIncluded, with "not recognised" as an explicit outcome
Deterministic checks (NIF/NIE, MRZ, dates)To buildIncluded at no extra cost
Verdict and readable reasonsTo buildIncluded, in the requested language
Matching against the expected holderTo buildchecks.holder
Document storageIn your S3, managed by youNot stored by default (storage: "none")
Use of content for service improvementConfigurable via opt-out policyNot used to train models (DPA)
Price$0.025/page (AnalyzeID, first tier)1 credit per document up to 2 pages; 150 free per month; plans and top-ups in EUR or USD
EcosystemAll of AWS: IAM, S3, Lambda, queuesJS/PHP/Python SDKs, widget, webhooks, Make/Zapier/n8n, MCP

When Textract is the better choice

  • You're all-in on AWS and need high-volume extraction of many document kinds (tables, forms, expenses) from a single provider.
  • Your case is US documents only and extracted fields are enough.
  • You have a team to build and maintain classification, rules and decisions, and you want to control all of it.

When Constaia fits better

  • You validate European documents (ID cards, residence permits, passports) or long-tail Spanish documents (medical certificates, child-protection certificates, receipts, invoices).
  • You need an explainable decision for the end user, not just fields.
  • You want no document storage without configuring anything, and EU processing.
  • You'd rather not manage an AWS account for this, or your team works in PHP, Python or JavaScript and wants it integrated in an afternoon.

Constaia isn't biometric KYC either: it does no face matching and doesn't guarantee that a document is genuine. If you need that, look for a specialised provider.

There's a shorter comparison with prices on our Constaia vs AWS Textract page.

Summary

  • Textract AnalyzeID is built for US identity documents and returns fields with confidence.
  • For European documents you'll need to build classification, validation, a decision layer and a privacy setup.
  • Constaia ships those pieces, with a verdict and reasons, and doesn't store documents by default.

To compare it with your own documents, create a free account: 150 documents a month and test keys that don't use credits.

Sources

  1. 01AWS — Amazon Textract, analyzing identity documents (AnalyzeID)
  2. 02AWS — Amazon Textract pricing
  3. 03AWS — Amazon Textract endpoints and quotas
  4. 04AWS Organizations — AI services opt-out policies
  5. 05ICAO — Doc 9303, Part 5 (TD1)
  6. 06Spanish Ministry of the Interior — NIF/NIE check character calculation