Aadhaar ID OCR API
New
Read an uploaded Aadhaar document image and return the printed identity and address details as structured fields. Nobody retypes them into your onboarding form.
Overview
Aadhaar ID OCR reads an image of an Aadhaar document and returns the details printed on it as structured fields. The image can be a phone photograph, a scan or a page of a PDF. Most Indian onboarding journeys already collect an Aadhaar copy. OCR removes the step where a person reads that copy and retypes the name, date of birth and address into a form. The response can carry name, date of birth or year of birth, gender, and the address block with its components, as far as the image is legible. Available fields vary by data source and by record. Treat the output as captured information that a person can review and correct. OCR reports what is printed. It does not confirm the document with the issuing source. Where a workflow needs that assurance, pair it with a verification service, and use the separate Aadhaar Masking service to redact the number in the copy you keep.
- Category
- Document OCR APIs
- Coverage
- Aadhaar documents issued in India, across the layouts and scripts the reader supports
- Input
- An Aadhaar document image or PDF page, captured or uploaded by the applicant
- Output
- Structured name, date of birth or year of birth, gender and address fields, where legible on the document
- Typical users
- Lending, fintech, insurance, staffing, real estate and telecom onboarding teams
- Coverage note
- Reads what is printed on the image you supply; it does not confirm the record with the issuing source
The overview and the sections after the reference are the FinSour API catalog’s own record for this service, rendered unaltered.
Endpoint URL and method
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Authentication
Send your API key in this header on every call, from your own server: a key sent from a browser is refused. A key starting fs_test_ calls the sandbox and one starting fs_live_ calls production, at the same address. Create keys in the FinSour console.
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Request parameters
Headers
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
Idempotency-Key | string | Required | A key you generate for each attempt. Sending the same key again returns the first answer instead of running the check twice; the same key with a different body is refused. | 8 to 255 characters. Matches ^[A-Za-z0-9._:-]+$ |
FinSour-Version | string | Required | Send 2026-11-01 on this call and on every poll to get the receipt and the result described on this page. A call without it is served under 2026-09-01, whose job has a different shape. | — |
Body
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
file | file | Required | The document to read. | — |
payload | string (JSON) | Required | A JSON string carrying the call's options. | — |
payload. | object | Required | Settings for this call. This API requires consent. | — |
payload. | string | Optional | Your own reference for this call. It comes back unchanged as meta.reference. | 1 to 128 characters |
payload. | object | Required | The person's consent to this check. | — |
payload. | boolean | Required | Send true once the person has agreed to the check. | Always true |
payload. | string (date-time) | Required | When the person gave consent. | — |
payload. | string | Required | What the check is for, for example kyc. | 1 to 64 characters |
Request samples
cURL
curl -X POST https://gateway.staging.finsour.io/v1/documents/aadhaar-card \
-H "X-Api-Key: $FINSOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "FinSour-Version: 2026-11-01" \
-F "file=@<path-to-document>" \
-F 'payload={"options":{"consent":{"obtained":true,"at":"2026-09-01T10:00:00Z","purpose":"kyc"}}}'Node.js
import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("<path-to-document>"));
form.append("payload", JSON.stringify({
"options": {
"consent": {
"obtained": true,
"at": "2026-09-01T10:00:00Z",
"purpose": "kyc"
}
}
}));
const response = await fetch("https://gateway.staging.finsour.io/v1/documents/aadhaar-card", {
method: "POST",
headers: {
"X-Api-Key": process.env.FINSOUR_API_KEY,
"Idempotency-Key": crypto.randomUUID(),
"FinSour-Version": "2026-11-01",
},
body: form,
});
console.log(response.status, await response.json());Python
import os
import uuid
import json
import requests
response = requests.post(
"https://gateway.staging.finsour.io/v1/documents/aadhaar-card",
headers={
"X-Api-Key": os.environ["FINSOUR_API_KEY"],
"Idempotency-Key": str(uuid.uuid4()),
"FinSour-Version": "2026-11-01",
},
files={"file": open("<path-to-document>", "rb")},
data={"payload": json.dumps({
"options": {
"consent": {
"obtained": True,
"at": "2026-09-01T10:00:00Z",
"purpose": "kyc",
},
},
})},
timeout=30,
)
print(response.status_code, response.json())Generated from the fields above. Replace each value in angle brackets with your own; the key is read from FINSOUR_API_KEY.
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Response schema
| Name | Type | Present | Description | Constraints |
|---|---|---|---|---|
data | object | Always | The job that will read the document. | — |
data. | string | Always | The job's id. Poll GET /v1/jobs/{jobId} with it. | Matches ^[0-9A-HJKMNP-TV-Z]{26}$ |
data. | string | Always | Always queued: the job is accepted and has not started. | Always "queued" |
The result
Poll GET /v1/jobs/{jobId}. Once the job has finished, data holds these fields:
| Name | Type | Present | Description | Constraints |
|---|---|---|---|---|
jobId | string | Always | — | — |
status | string | Always | — | One of queued, processing, completed, needs_review, unreadable, failed, expired, cancelled |
documentType | string or null | Always | The kind of document found, once it has been read; null before that. | — |
confidence | number or null | Always | The document's confidence, 0 to 1, to two places; null until it has been read. | Minimum 0. Maximum 1 |
fields | object | Always | What was read. Every key is always present: null means the document does not carry it, or it could not be read with enough confidence. | — |
fields. | string or null | Always | — | — |
fields. | string or null | Always | — | — |
fields. | string or null | Always | ISO date, YYYY-MM-DD; a year or month alone is YYYY or YYYY-MM. | — |
fields. | string or null | Always | — | — |
fields. | string or null | Always | — | — |
fieldsToReview | array of strings | Always | When status is needs_review, the fields a person should confirm; empty otherwise. | — |
failureReason | string | Sometimes | Present only when status is unreadable or failed. | One of UNREADABLE_IMAGE, LOW_CONFIDENCE, DOCUMENT_TYPE_MISMATCH, UNSUPPORTED_MEDIA_TYPE, FILE_TOO_LARGE, INPUT_CORRUPT, PAGE_LIMIT_EXCEEDED, TIMEOUT, PROCESSING_ERROR |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Error codes
| Code | Status | Meaning | Retrying |
|---|---|---|---|
API_VERSION_UNSUPPORTED | 400 | That API version is no longer supported. | Do not retry automatically |
IDEMPOTENCY_KEY_INVALID | 400 | That Idempotency-Key does not meet the required format. | Do not retry automatically |
IDEMPOTENCY_KEY_REQUIRED | 400 | An Idempotency-Key header is required for this request. | Do not retry automatically |
REQUEST_MALFORMED | 400 | The request could not be parsed. | Do not retry automatically |
AUTH_KEY_EXPIRED | 401 | The API key is not valid. | Do not retry automatically |
AUTH_KEY_INVALID | 401 | The API key is not valid. | Do not retry automatically |
AUTH_KEY_MISSING | 401 | No API key was presented. | Do not retry automatically |
AUTH_KEY_REVOKED | 401 | The API key is not valid. | Do not retry automatically |
INSUFFICIENT_BALANCE | 402 | The available balance is not enough for this request. | Do not retry automatically |
AUTH_IP_NOT_ALLOWED | 403 | This API key may not be used from this address. | Do not retry automatically |
ENTITLEMENT_MISSING | 403 | This organization is not entitled to that product in this environment. | Do not retry automatically |
ORGANIZATION_SUSPENDED | 403 | This organization is not active. | Do not retry automatically |
PRODUCT_NOT_AVAILABLE | 403 | That product is not available. | Do not retry automatically |
PRODUCT_RETIRED | 403 | That product has been withdrawn. | Do not retry automatically |
SCOPE_INSUFFICIENT | 403 | This API key does not carry the scope this product requires. | Do not retry automatically |
PRODUCT_NOT_FOUND | 404 | No such product. | Do not retry automatically |
IDEMPOTENCY_KEY_REUSED | 409 | That idempotency key was already used for a different request. | Do not retry automatically |
PRICE_UNAVAILABLE | 409 | No active price covers this product right now. | Safe to retry |
REQUEST_IN_PROGRESS | 409 | An earlier attempt with this key is still running. | Safe to retry |
SETTLEMENT_PENDING | 409 | This request is awaiting reconciliation by an operator. | Do not retry automatically |
API_VERSION_SUNSET | 410 | That API version passed its announced sunset date. | Do not retry automatically |
REQUEST_TOO_LARGE | 413 | The request body is too large. | Do not retry automatically |
OCR_UNSUPPORTED_MEDIA_TYPE | 415 | That document format is not accepted. | Do not retry automatically |
UNSUPPORTED_MEDIA_TYPE | 415 | That content type is not accepted on this route. | Do not retry automatically |
CONSENT_REQUIRED | 422 | This product requires an explicit consent flag. | Do not retry automatically |
SANDBOX_FIXTURE_MISSING | 422 | No sandbox fixture exists for this input. Use a different test value. | Do not retry automatically |
UPSTREAM_REJECTED | 422 | The upstream source rejected the input. | Do not retry automatically |
VALIDATION_FAILED | 422 | The request payload is invalid. | Do not retry automatically |
CONCURRENCY_LIMIT | 429 | Too many simultaneous requests. | Safe to retry |
OCR_QUEUE_SATURATED | 429 | The document queue is full. Retry shortly. | Safe to retry |
QUOTA_EXCEEDED | 429 | The allowance for this window is spent. | Do not retry automatically |
RATE_LIMITED | 429 | Too many requests. | Safe to retry |
INTERNAL_ERROR | 500 | An unexpected error occurred. | Safe to retry |
OUTCOME_UNCERTAIN | 502 | The outcome of this request is not yet known. Retry with the same Idempotency-Key. | Do not retry automatically |
UPSTREAM_UNAVAILABLE | 502 | The upstream source is unavailable. Retry shortly. | Safe to retry |
MAINTENANCE_MODE | 503 | The service is in a maintenance window. | Safe to retry |
NO_PROVIDER_AVAILABLE | 503 | No provider can serve this product right now. | Safe to retry |
OCR_UNAVAILABLE | 503 | Document reading is unavailable right now. Retry later. | Safe to retry |
SERVICE_OVERLOADED | 503 | The service is shedding load. Retry shortly. | Safe to retry |
UPSTREAM_TIMEOUT | 504 | The upstream source did not respond in time. | Safe to retry |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Rate limits
| Scope | Limit | Window | At the limit |
|---|---|---|---|
| Your API key, within your organisation's limit | The figure in X-RateLimit-Limit | Per minute | 429 RATE_LIMITED, with Retry-After in seconds. Every answer past authentication carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Use cases
- Lending and NBFCs: start an application file from the borrower's uploaded copy
- Fintech and PSPs: cut a mobile signup down to a photo and a confirmation screen
- Insurance: capture proposer name and address consistently at proposal stage
- Staffing and gig platforms: enroll field and delivery workers from a phone camera
- Real estate: record tenant and buyer details during document collection
- Telecom: read subscriber details during retail or doorstep signup
What this service does
Named fields your form can map
The reader returns named values: name, date of birth or year of birth, gender, the address block and its components. Your form maps them to inputs directly. Which fields come back depends on the data source and the individual record.
Built for phone-camera uploads
Applicants photograph documents in poor light, at an angle, through lamination and inside a chat window. The reading step is built for those inputs and returns what it can read, even when one line is unclear.
Pairs with Aadhaar Masking
Aadhaar ID OCR turns the document into fields you can act on. The separate Aadhaar Masking service redacts the number in the copy you retain. Most teams run both: structured data into the workflow, a masked copy into the archive.
A capture step that comes before verification
OCR reports what is printed on the image supplied. It does not confirm the document against the issuing source. Place it before a verification and consent step in your flow, not in place of one.
How a check runs
Capture the Aadhaar copy with consent
The applicant photographs or uploads the Aadhaar document inside your app, web journey, agent tool or chat flow. Record consent for the purpose you are collecting it for.
Send the image to the API
Your application submits the captured file. Supported formats and size limits depend on the selected service contract.
Read the name, date of birth and address
The printed details that could be read come back as labeled fields, along with an indication of what could not be read.
Let the applicant fix a misread line
Show the values back to the applicant or a reviewer. They can fix a misread character before it enters your records.
Carry the details into KYC
Pass the confirmed details into your onboarding, underwriting or KYC workflow, and retain only the redacted copy your retention policy allows.
Questions
- What is an Aadhaar ID OCR API?
- An interface that accepts an image of an Aadhaar document and returns the details printed on it as structured fields. Your application reads the values from the document. No one has to type them in by hand.
- Does Aadhaar ID OCR verify the Aadhaar number?
- No, OCR reads what is printed on the image supplied. It does not establish that the document is genuine or current, and it does not check the details against the issuing source. Use a separate verification service, with the consent flow it requires, where your process needs that assurance.
- Which details can Aadhaar ID OCR read from the card?
- The response may include name, date of birth or year of birth, gender, and the address block with its components. Where it is legible, the identifier printed on the card can come back too. Treat each one as available information, since what is on offer varies by data source and by record.
- Can it read an Aadhaar photo taken on a phone?
- Yes, and that is the common case. Reading quality still depends on focus, lighting, glare from lamination, and whether the whole document sits inside the frame. Build a retake prompt into your capture screen instead of handling poor images as support tickets.
- How does this relate to Aadhaar Masking?
- They solve different halves of the same problem. OCR turns the document into fields you can act on. Aadhaar Masking redacts the number in the image you keep, which is what Indian KYC practice expects of a stored Aadhaar copy.
- Do I need consent to read an Aadhaar document?
- Yes, an Aadhaar document is personal data and reading it is a processing activity. Collect it for a stated purpose with the applicant's consent, and use it only for that purpose. Restrict who can open the raw image, and retain it no longer than your policy and the KYC rules applying to your business allow.
Catalog entry last updated .