Thailand TM30 Foreign Guest Reporting with Passport OCR
Extract passport fields from the guest’s photo, review them, and use the structured data to complete the TM30 report. OCR captures the data; your compliance process stays in charge of decisions.
200 free credits = 100 Passport scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

The Requirement
Thailand’s TM30 notification requires the owner or manager of a residence to report foreign nationals staying there to immigration. Hosts re-type passport data from photos sent over chat apps, which delays reports and introduces errors in names and numbers.
Capture Once, Confirm, Then Report
Extract passport fields from the guest’s photo, review them, and use the structured data to complete the TM30 report. The passport OCR API returns structured JSON, so the same record can feed your forms, reports, and audit trail. Check the current TM30 process and deadlines with Thai Immigration.
Live Demo: Passport scanner
No registration required. Upload a file to test the extraction.
Drop files here or click to browse
JPG · PNG · PDF · TIFF · up to 500 files · max 4.5 MB each
No document handy?
Workflow Applications
Hotel and hostel reporting
Pre-fill passport_number, nationality, date_of_birth, date_of_expiry and require confirmation before saving.
Condo and villa rentals
Ask for a clearer image when the document is cropped, blurred, or covered by glare.
Property managers
Keep extracted data separate from approval, reporting, and eligibility decisions.
Technical Specs
- Endpoint: POST https://api.structocr.com/v1/passport
- Inputs: JPG, PNG, WebP, or PDF as Base64 JSON; maximum 4.5MB
- Cost: 2 credits per successful request; failures are not billed
- Output: Structured JSON with normalized names, numbers, and ISO dates
- Decision boundary: OCR extracts printed data and does not verify identity, authenticity, or legal eligibility
- Regulations change: Confirm current requirements with the relevant authority before relying on any workflow
Key Features
- Data minimization: Store only the fields the regulation or process requires.
- Confirmation step: Let the customer or staff correct extracted fields before submission.
- Retention policy: Delete or mask document images according to your documented schedule.
- Independent decisions: Check the current TM30 process and deadlines with Thai Immigration.
Server-Side Integration
Send the passport image from your backend and keep only the fields your process needs.
import base64
import os
import requests
with open("passport.jpg", "rb") as image_file:
image = base64.b64encode(image_file.read()).decode("ascii")
response = requests.post(
"https://api.structocr.com/v1/passport",
headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
json={"img": image},
timeout=30,
)
if response.ok:
data = response.json()["data"]
print("passport_number:", data.get("passport_number"))
print("nationality:", data.get("nationality"))
print("date_of_birth:", data.get("date_of_birth"))
print("date_of_expiry:", data.get("date_of_expiry"))
else:
print("Retake or review:", response.json().get("error"))Illustrative Response
Wholly fictional data showing the response shape. It is not a real person’s document.
{
"success": true,
"data": {
"passport_number": "SAMPLE",
"nationality": "SAMPLE",
"date_of_birth": "1990-01-01",
"date_of_expiry": "1990-01-01"
}
}Frequently Asked Questions
Does OCR make us compliant?
No. OCR speeds up data capture. Check the current TM30 process and deadlines with Thai Immigration.
Which fields are relevant here?
Usually passport_number, nationality, date_of_birth, date_of_expiry. Collect only what your obligation requires.
What if the photo is unreadable?
The API returns an error instead of guessing; ask for a new photo of the full document without glare.
Explore More Travel & KYC Solutions
International Student Admissions Passport OCR
How university admissions offices can capture passport data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.
Visa Application Form Prefill with Passport OCR
How visa agencies and immigration services can capture passport data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.
Passport OCR for Neo-Banks: 24-Hour Retention, SOC 2 Type II
Passport OCR API for neo-bank onboarding: MRZ and VIZ fields as JSON, SOC 2 Type II, and images deleted within 24 hours. No SDK needed. Upload an image to test free.
Automated Hotel Check-In Passport Scanner API
Streamline hotel check-ins with our automated passport scanner API. Extract global guest data instantly without SDKs. Upload an image to test our free live demo.
Cruise Passenger Passport Data Capture with OCR
How cruise lines and port agents can capture passport data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.
Crypto KYC Passport API (No SDK)
Passport OCR API for Web3 and Crypto KYC, with 24-hour data retention. Extract global MRZ and VIZ data instantly without SDK bloat. Upload an image to test our free live demo.
Currency Exchange Bureau Customer ID Capture with OCR
How currency exchange bureaus can capture passport data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.
DPDP Compliant Indian Passport OCR API
DPDP-friendly OCR API for Indian passports, with 24-hour data retention. Securely extract back-page PII (Address, Parents' Names) for KYC workflows. File, Base64, and URL supported.
GDPR Compliant Passport OCR API
Extract passport data securely with our OCR API; images are deleted within 24 hours. Upload an image to test our free live demo.
Hostel Guest Passport Check-In with OCR
How hostels and budget accommodations can capture passport data with OCR for compliance workflows, with confirmation steps and clear limits on what OCR does.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Tesseract & PassportEye vs. StructOCR Passport API
A technical evaluation for developers deciding between open-source MRZ scanners and a dedicated cloud-based Passport OCR API.
Add Passport OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a v0 by Vercel app through a secure Next.js server route.
AWS Textract vs. StructOCR API for Indian Passport Back Page Extraction
Why generic OCR fails at parsing the back page of Indian passports, and how a dedicated KYC API instantly extracts structured addresses, PIN codes, and family details.
AWS Textract & Google Vision vs. StructOCR Passport API
How AWS Textract AnalyzeID, Google Cloud Vision OCR, and the StructOCR Passport API differ for passport data, quoting each vendor’s own documentation.
Add Passport OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API into a Bolt.new app. Build travel, hospitality, and global KYC flows right in your browser.
Add Passport OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API using the Cursor AI code editor. Build travel, hospitality, and global KYC flows rapidly.
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.