Skip to content

Voter ID OCR API

New

Read an uploaded voter ID image and get the printed name, EPIC number, relation name and address back as structured fields instead of typing them in.

Overview

Voter ID OCR reads an image of an Elector's Photo Identity Card, commonly called a voter ID or an EPIC card. It returns the details printed on it as structured fields. It is one of the few widely held Indian documents that carries a full residential address in printed form. That makes it a practical capture document where a journey needs an identity and an address together. The response may carry name, EPIC number, relation or guardian name, gender, age or date of birth, and the address block with its components. The fields you get back vary with the data source and with the individual record. Card layout, regional-script printing and the age of the card all change what can be read. OCR reports what appears on the supplied image. It does not establish that the card is genuine, and it does not check the details against the electoral record.

Coverage
Voter ID (EPIC) cards issued in India, across the layouts and scripts the reader supports
Input
A voter ID (EPIC) card image or PDF page, including the reverse where the address is printed there
Output
Structured name, EPIC number, relation name, gender, age or date of birth and address fields
Typical users
Lending, fintech, staffing, logistics, real estate and telecom onboarding teams
Coverage note
Reads the printed card; the details are not checked against the electoral record

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

POSThttps://gateway.staging.finsour.io/v1/documents/voter-id

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

Scheme API key travels in the X-Api-Key header

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

Content type multipart/form-data

Headers

NameTypeRequiredDescriptionConstraints
Idempotency-KeystringRequiredA 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-VersionstringRequiredSend 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

NameTypeRequiredDescriptionConstraints
filefileRequiredThe document to read.—
payloadstring (JSON)RequiredA JSON string carrying the call's options.—
payload.optionsobjectRequiredSettings for this call. This API requires consent.—
payload.options.referencestringOptionalYour own reference for this call. It comes back unchanged as meta.reference.1 to 128 characters
payload.options.consentobjectRequiredThe person's consent to this check.—
payload.options.consent.obtainedbooleanRequiredSend true once the person has agreed to the check.Always true
payload.options.consent.atstring (date-time)RequiredWhen the person gave consent.—
payload.options.consent.purposestringRequiredWhat the check is for, for example kyc.1 to 64 characters

Request samples

cURL

curl -X POST https://gateway.staging.finsour.io/v1/documents/voter-id \
  -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":"<obtained>","at":"<at>","purpose":"<purpose>"}}}'

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": "<obtained>",
      "at": "<at>",
      "purpose": "<purpose>"
    }
  }
}));

const response = await fetch("https://gateway.staging.finsour.io/v1/documents/voter-id", {
  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/voter-id",
    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": "<obtained>",
                "at": "<at>",
                "purpose": "<purpose>",
            },
        },
    })},
    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

Status 202 · content type application/json

NameTypePresentDescriptionConstraints
dataobjectAlwaysThe job that will read the document.—
data.jobIdstringAlwaysThe job's id. Poll GET /v1/jobs/{jobId} with it.Matches ^[0-9A-HJKMNP-TV-Z]{26}$
data.statusstringAlwaysAlways 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:

NameTypePresentDescriptionConstraints
jobIdstringAlways——
statusstringAlways—One of queued, processing, completed, needs_review, unreadable, failed, expired, cancelled
documentTypestring or nullAlwaysThe kind of document found, once it has been read; null before that.—
confidencenumber or nullAlwaysThe document's confidence, 0 to 1, to two places; null until it has been read.Minimum 0. Maximum 1
fieldsobjectAlwaysWhat 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.maskedEpicNumberstring or nullAlways——
fields.namestring or nullAlways——
fields.relationNamestring or nullAlways——
fields.relationTypestring or nullAlways——
fields.genderstring or nullAlways——
fields.dobstring or nullAlwaysISO date, YYYY-MM-DD; a year or month alone is YYYY or YYYY-MM.—
fields.ageinteger or nullAlways——
fields.addressstring or nullAlways——
fields.pincodestring or nullAlways——
fieldsToReviewarray of stringsAlwaysWhen status is needs_review, the fields a person should confirm; empty otherwise.—
failureReasonstringSometimesPresent 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

CodeStatusMeaningRetrying
API_VERSION_UNSUPPORTED400That API version is no longer supported.Do not retry automatically
IDEMPOTENCY_KEY_INVALID400That Idempotency-Key does not meet the required format.Do not retry automatically
IDEMPOTENCY_KEY_REQUIRED400An Idempotency-Key header is required for this request.Do not retry automatically
REQUEST_MALFORMED400The request could not be parsed.Do not retry automatically
AUTH_KEY_EXPIRED401The API key is not valid.Do not retry automatically
AUTH_KEY_INVALID401The API key is not valid.Do not retry automatically
AUTH_KEY_MISSING401No API key was presented.Do not retry automatically
AUTH_KEY_REVOKED401The API key is not valid.Do not retry automatically
INSUFFICIENT_BALANCE402The available balance is not enough for this request.Do not retry automatically
AUTH_IP_NOT_ALLOWED403This API key may not be used from this address.Do not retry automatically
ENTITLEMENT_MISSING403This organization is not entitled to that product in this environment.Do not retry automatically
ORGANIZATION_SUSPENDED403This organization is not active.Do not retry automatically
PRODUCT_NOT_AVAILABLE403That product is not available.Do not retry automatically
PRODUCT_RETIRED403That product has been withdrawn.Do not retry automatically
SCOPE_INSUFFICIENT403This API key does not carry the scope this product requires.Do not retry automatically
PRODUCT_NOT_FOUND404No such product.Do not retry automatically
IDEMPOTENCY_KEY_REUSED409That idempotency key was already used for a different request.Do not retry automatically
PRICE_UNAVAILABLE409No active price covers this product right now.Safe to retry
REQUEST_IN_PROGRESS409An earlier attempt with this key is still running.Safe to retry
SETTLEMENT_PENDING409This request is awaiting reconciliation by an operator.Do not retry automatically
API_VERSION_SUNSET410That API version passed its announced sunset date.Do not retry automatically
REQUEST_TOO_LARGE413The request body is too large.Do not retry automatically
OCR_UNSUPPORTED_MEDIA_TYPE415That document format is not accepted.Do not retry automatically
UNSUPPORTED_MEDIA_TYPE415That content type is not accepted on this route.Do not retry automatically
CONSENT_REQUIRED422This product requires an explicit consent flag.Do not retry automatically
SANDBOX_FIXTURE_MISSING422No sandbox fixture exists for this input. Use a different test value.Do not retry automatically
UPSTREAM_REJECTED422The upstream source rejected the input.Do not retry automatically
VALIDATION_FAILED422The request payload is invalid.Do not retry automatically
CONCURRENCY_LIMIT429Too many simultaneous requests.Safe to retry
OCR_QUEUE_SATURATED429The document queue is full. Retry shortly.Safe to retry
QUOTA_EXCEEDED429The allowance for this window is spent.Do not retry automatically
RATE_LIMITED429Too many requests.Safe to retry
INTERNAL_ERROR500An unexpected error occurred.Safe to retry
OUTCOME_UNCERTAIN502The outcome of this request is not yet known. Retry with the same Idempotency-Key.Do not retry automatically
UPSTREAM_UNAVAILABLE502The upstream source is unavailable. Retry shortly.Safe to retry
MAINTENANCE_MODE503The service is in a maintenance window.Safe to retry
NO_PROVIDER_AVAILABLE503No provider can serve this product right now.Safe to retry
OCR_UNAVAILABLE503Document reading is unavailable right now. Retry later.Safe to retry
SERVICE_OVERLOADED503The service is shedding load. Retry shortly.Safe to retry
UPSTREAM_TIMEOUT504The 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

ScopeLimitWindowAt the limit
Your API key, within your organisation's limitThe figure in X-RateLimit-LimitPer minute429 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: capture identity and address in small-ticket and rural lending
  • Fintech and PSPs: fill a signup form from a photographed card instead of typing
  • Staffing and gig platforms: enroll riders and field workers at the doorstep
  • Logistics and fleet: record driver identity and address details at induction
  • Real estate: capture tenant details during rental document collection
  • Telecom: capture subscriber identity and address at doorstep activation

What this service does

  • Identity and address from one document

    The voter ID is one of the few widely held Indian documents that prints a full residential address. A single capture can serve both the identity and the address side of an onboarding form. What the response carries varies by data source and by record.

  • Handles the variety these cards come in

    Cards issued in different years and different states differ in layout, and many print the holder's details in a regional script alongside or instead of English. What can be read from a Devanagari, Bengali, Tamil or Telugu printing may differ from an English one.

  • Address block and its components

    The reader can return the printed address block along with the components it manages to identify, such as house, locality, district, state and postal code. Components are the part most likely to come back partial. Keep the raw block alongside them for confirmation.

  • Stops short of the electoral record

    OCR reports what appears on the supplied image. It cannot tell you that the card is genuine or still current, and it does not test the details against the electoral record. Pair it with a verification service where the decision needs assurance.

How a check runs

  1. Capture the front, and the back for an address

    The applicant photographs or uploads the card inside your app, agent tool or web journey, with consent recorded. If the address is your reason for reading it, capture the reverse as well.

  2. Submit both images together

    Your application sends the captured images in one request. Accepted formats and size limits are set by the selected service contract.

  3. Get the identity and address fields

    The printed details that could be read come back as labeled fields, with the address returned as a block and as the components that could be identified.

  4. Confirm the parsed address

    Show the parsed address back to the applicant. They can fix a missing line or an abbreviated district while they are still in the journey.

  5. Move the details into KYC or induction

    Pass the confirmed details into your onboarding, KYC or induction workflow, keeping what you captured separate from anything a verification service later confirms.

Questions

What is a Voter ID OCR API?
An interface that accepts an image of a voter ID (EPIC) card and returns the details printed on it as structured fields. Your application fills an identity and address form from the document instead of asking someone to type it in.
Does Voter ID OCR check the card against the electoral record?
No, OCR reads what appears on the supplied image. It does not establish that the card is genuine or current, and it does not check the details against the electoral record. Where the decision needs that assurance, pair it with a separate verification service.
Which details can Voter ID OCR read from an EPIC card?
Depending on what is legible, the response may include the name, the EPIC number, the relation or guardian name and gender. It may also include age or date of birth, and the address block with its components. Which of them you receive depends on the data source and the individual record.
Can it read a voter ID printed in a regional language?
The reader supports the scripts described in the selected service contract. Many cards print the holder's details in a regional script alongside or instead of English. What comes back from a regional printing may differ from an English one.
Do I need to photograph the back of the voter ID?
If the address is what you need, usually yes. Newer cards print the address on the reverse, and a front-only capture returns identity fields without one. Prompt for the second image at the point of capture.
Do I need consent to read a voter ID?
Yes, a voter ID carries personal data, including a residential address. Take the applicant's consent, collect it for a purpose you have stated, and use it for that purpose alone. The constituency and electoral context printed on the card should not be used for anything beyond the check the applicant agreed to.

Catalog entry last updated .