AWS Textract & Google Vision vs. StructOCR Passport API
What each API returns for a passport photo, what it covers, and what it costs, with vendor statements quoted from their own docs.
Executive Summary for Developers
Google Cloud Vision’s OCR features return the text on a passport and where it sits, so field parsing and MRZ handling stay in your code. AWS Textract’s AnalyzeID returns normalized fields, including the MRZ code, but its documentation describes it for identity documents issued by the US Government. StructOCR’s Passport API returns one fixed JSON schema for passports from many issuing countries, at 2 credits per successful request. Vendor statements on this page are quoted from their own documentation as checked on October 17, 2026.
Side by Side
| Topic | AWS Textract AnalyzeID | Google Cloud Vision OCR | StructOCR Passport API |
|---|---|---|---|
| Passports covered | “Amazon Textract can extract relevant information from passports, driver licenses, and other identity documentation issued by the US Government using the AnalyzeID API.” AWS docs | “TEXT_DETECTION detects and extracts text from any image.” Google docs | Passports from many issuing countries; country_code returns the 3-letter ISO code. |
| What you get back | “Following is a list of normalized fields for U.S Passports: … Document Number — DOCUMENT_NUMBER … MRZ Code — MRZ_CODE” AWS docs | “The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.” Google docs | Fixed fields such as passport_number, surname, given_names, sex, and dates in YYYY-MM-DD. |
| Price | “The pricing per page in the US West (Oregon) Region for 100,000 pages is $0.025 per page for up to 100,000 pages.” AWS pricing | “Pricing is tiered - the first 1000 units used each month are free, units 1001 to 5,000,000 are priced as marked … Text Detection … $1.50” Google pricing | 2 credits per successful request, about $0.012 to $0.02 per passport depending on the credit package. Failed requests are not billed. |
| File limits | “For synchronous operations, JPEG, PNG, PDF, and TIFF files have a limit of 10 MB in memory.” AWS docs | “Image file size … 20 MB” Google docs | JPG, PNG, or WebP sent as Base64 JSON; maximum 4.5MB. |
Text Detection Is Not Field Extraction
A general OCR feature such as Google Cloud Vision’s TEXT_DETECTION returns the words on the page and their positions. To fill a check-in or onboarding form you still have to find the passport number, split names, convert dates, and decide what to do with the MRZ lines. AWS Textract’s AnalyzeID goes further and returns normalized fields, including the MRZ code, but AWS documents it for US Government identity documents, so travellers with other passports fall outside it.
One Schema for Passports from Many Countries
StructOCR’s Passport API takes one Base64 image in a JSON request and returns a fixed set of fields: passport_number, surname, given_names, nationality, country_code, sex, and dates in YYYY-MM-DD. Fields that are obscured or missing come back as null rather than as guesses. See the Passport API docs for the full schema and error codes.
What the StructOCR Response Looks Like
An abridged 200 OK response from the Passport API.
{
"success": true,
"data": {
"type": "passport",
"country_code": "USA",
"nationality": "UNITED STATES OF AMERICA",
"passport_number": "987654321",
"surname": "DOE",
"given_names": "JOHN",
"sex": "M",
"date_of_birth": "1980-01-15",
"date_of_expiry": "2030-01-14"
}
}Ready to Build with StructOCR?
Get your API key in under a minute. New users receive 200 free credits to test Passport, VIN, License Plate, Container, Receipt, HIN, Driver License, ID Card, Vehicle Registration, Weighbridge Ticket, ATM Cassette and Invoice OCR APIs.
✓ No credit card required · ✓ Instant API key · ✓ Full API access