National ID Card OCR API Pricing and Cost per Scan
What national id card OCR costs with StructOCR: 2 credits per successful scan, prepaid credits that never expire, and no charge for failed requests.
What Drives OCR Cost
OCR pricing differs by whether failed requests are billed, whether credits expire, minimum monthly commitments, and the price per document type. Those terms matter more than the headline rate.
How StructOCR Prices It
Each successful national id card request costs 2 credits. Credits are prepaid from $5, never expire, and are only deducted for successful (200 OK) responses. See the full pricing page and start with 200 free credits.
Where This Fits
- Pilot: 200 free credits cover a realistic test on your own images before you pay anything.
- Steady volume: Larger packages lower the cost per credit, and unused credits carry over indefinitely.
- Enterprise: Contact sales for custom volume pricing and support terms.
Track Cost in Your Code
Each successful response consumes a fixed number of credits, so cost per document is predictable.
Prerequisite: Python 3.9+, `pip install requests`, and a STRUCTOCR_API_KEY
import base64
import os
import requests
with open("id-card.jpg", "rb") as image_file:
image = base64.b64encode(image_file.read()).decode("ascii")
response = requests.post(
"https://api.structocr.com/v1/national-id",
headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
json={"img": image},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]
print("document_number:", data.get("document_number"))
print("surname:", data.get("surname"))
print("given_names:", data.get("given_names"))
print("date_of_birth:", data.get("date_of_birth"))Technical Specs
- •Endpoint: POST https://api.structocr.com/v1/national-id
- •Authentication: x-api-key request header
- •Inputs: JPG, PNG, or WebP as Base64 JSON; maximum 4.5MB
- •Price: 2 credits per successful request; failed requests are not billed
- •Free trial: 200 free credits on sign-up, no credit card required
- •Mini ($5): about $0.0200 per national id card
- •Starter ($15): about $0.0167 per national id card
- •Business ($29): about $0.0145 per national id card
- •Pro ($99): about $0.0116 per national id card
Key Features
- •No subscription: Buy credit packages when you need them.
- •No expiry: Purchased credits are yours until used.
- •Failures are free: Errors, timeouts, and unreadable images are not billed.
- •Crypto bonus: Paying with USDT or USDC adds a 10% credit bonus.
Billable Response
Only a successful response like this consumes credits. Field values are illustrative.
{
"success": true,
"data": {
"document_number": "…",
"surname": "…",
"given_names": "…",
"date_of_birth": "…"
}
}Frequently Asked Questions
How much does one national id card scan cost?
2 credits, which is roughly $0.0116 on the $99 package and $0.02 on the $5 package.
Am I charged when OCR fails?
No. Only successful extractions are billed.
Do credits expire?
No. Purchased credits never expire.
You May Also Like
Related tutorials, platform guides, and comparisons
Egypt ID OCR API & Python SDK
Python tutorial: read Egyptian national IDs, including the 14-digit national number (century, date of birth, governorate, gender and check digit), as JSON. Test the ID OCR engine free.
Tunisia CIN (Carte d'Identité Nationale) OCR Python SDK
Python Tutorial: Automate KYC in Tunisia. Extract data from CIN (Carte d'Identité Nationale) using StructOCR Python SDK. Supports native text.
Peru DNI OCR: Extract Fields with Python
Extract visible fields from Peru dni images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.
Côte d'Ivoire CNI (Carte Nationale d'Identité) OCR Python SDK
Python Tutorial: Automate KYC in Côte d'Ivoire. Extract French text, NNI, and validate TD1 MRZ from the ONECI CNI using StructOCR Python SDK.
Nigeria National ID OCR with Node.js SDK
Extract National Identification Number (NIN), names, dates and other visible fields from National Identity Card with the StructOCR Node.js SDK and Express.
Node.js National ID OCR API
Extract National ID data with our Node.js SDK. Upload an image for a free test! Get clean, validated JSON output from any ID card image. Integrate KYC in minutes.
Saudi Arabia National ID & Iqama OCR Python SDK
Python Tutorial: Automate KYC in Saudi Arabia. Extract data from National IDs and Iqamas using the StructOCR Python SDK. Supports bilingual (Arabic/English) text, 10-digit ID numbers, and 3-line MRZ extraction.
Philippines PhilID OCR with Node.js SDK
Extract PhilSys Card Number, names, dates and other visible fields from Philippine Identification Card (PhilID) with the StructOCR Node.js SDK and Express.
Pakistan CNIC OCR with Node.js SDK
Extract CNIC number, names, dates and other visible fields from Computerized National Identity Card (CNIC) with the StructOCR Node.js SDK and Express.
Nebraska Driver License & ID Card PDF417 API
Decode the PDF417 barcode on Nebraska driver licenses and state ID cards into AAMVA JSON, with document_kind to tell licenses from ID cards.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add National ID OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Bolt.new app. Build KYC and identity verification flows right in your browser.
Add National ID OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API using the Cursor AI code editor. Build KYC and identity verification flows rapidly.
Add National ID OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Lovable.dev app. Build KYC and identity verification flows with zero backend.
Add National ID OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a Replit application. Build KYC and identity verification flows using Replit Agent and Secrets.
Add National ID OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR National ID scanner API into a v0 by Vercel app. Build KYC and identity verification flows with zero backend.
Add Invoice OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR invoice API using the Cursor AI code editor. Build accounts payable and expense tracking tools 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.