Voter ID Verification API
Send an EPIC number and, optionally, the name you collected. We return the voter's name, relative's name, age, gender, state and assembly constituency, plus a name-match score.
- Source
- Electoral rolls published by the Election Commission of India
- Turnaround
- Real time, usually a few seconds; slower around election periods
- Endpoint
- POST /v1/voter-id/verify
- Who can use it
- Any business with the holder's consent and a KYC or address-verification purpose.
Overview
Voter ID is an officially valid document for KYC and is common among customers who don't have a passport or driving licence. The check confirms the EPIC is on the roll and gives you enough to cross-check name and age against what the customer told you.
Good to know
Electoral rolls are revised periodically, so a recent move may not show yet. The roll has no photo you can use for face matching.
What you get
- Relative's nameFather's or husband's name helps separate two people with the same name in the same area.
- Constituency detailState, assembly constituency and part number give a rough address check without a utility bill.
- Name-match scoreSpellings on the roll vary a lot. The score lets you allow for that instead of failing on exact match.
- Handles old formatsSome older EPIC numbers don't follow the current three-letters-seven-digits pattern. We pass them through instead of rejecting them.
Request
POST https://api.ampletrails.com/v1/voter-id/verify
| Field | Type | Status | Description |
|---|---|---|---|
id_number | string | Required | EPIC (Voter ID) number |
name | string | Optional | Name to match against the electoral record |
consent | string | Required | Y if the user has given explicit consent |
Response
Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.
| Field | Meaning | Example |
|---|---|---|
epic_valid | Whether the EPIC number was found on the electoral roll | true |
full_name | Voter's name | Ravi Kumar |
relative_name | Father's, mother's or husband's name | Suresh Kumar |
age | Age as per the roll | 36 |
gender | Gender | M |
state | State | Haryana |
assembly_constituency | Assembly constituency | Gurgaon |
part_number | Electoral roll part number | 112 |
name_match_score | Match score for the name you sent, from 0 to 100 | 94 |
Example
curl -X POST https://api.ampletrails.com/v1/voter-id/verify \
-H "Authorization: Bearer $AMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id_number": "ABC1234567", "name": "Ravi Kumar", "consent": "Y"}'import os, requests
resp = requests.post(
"https://api.ampletrails.com/v1/voter-id/verify",
headers={"Authorization": f"Bearer {os.environ['AMPLE_API_KEY']}"},
json={
"id_number": "ABC1234567",
"name": "Ravi Kumar",
"consent": "Y"
},
timeout=30,
)
resp.raise_for_status()
print(resp.json()["data"])const resp = await fetch("https://api.ampletrails.com/v1/voter-id/verify", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AMPLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"id_number": "ABC1234567",
"name": "Ravi Kumar",
"consent": "Y"
}),
});
const { data } = await resp.json();$ch = curl_init("https://api.ampletrails.com/v1/voter-id/verify");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AMPLE_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["id_number" => "ABC1234567", "name" => "Ravi Kumar", "consent" => "Y"]),
]);
$data = json_decode(curl_exec($ch), true)["data"];{
"status": "success",
"request_id": "req_7f3a9c21e4",
"data": {
"epic_valid": true,
"full_name": "Ravi Kumar",
"relative_name": "Suresh Kumar",
"age": 36,
"gender": "M",
"state": "Haryana",
"assembly_constituency": "Gurgaon",
"part_number": "112",
"name_match_score": 94
}
}Example data. The exact field list for your account comes with your sandbox documentation.
Use cases
Microfinance and rural lending
Many borrowers carry a Voter ID before any other photo ID.
Field staff onboarding
Security, housekeeping and delivery agencies check Voter IDs of new workers.
Address confirmation
Constituency data backs up a stated address for low-ticket products.
Questions about this API
Why is a genuine EPIC sometimes not found?
The person may have moved and been deleted from one roll before being added to another, or the roll for their area may be under revision. Ask for a second document in that case.
Does the result include a photo?
No. Use a face match against a photo of the card if you need to tie the ID to the person.
Is age exact?
Age on the roll is as of the roll's qualifying date and is sometimes approximate. Don't use it as a precise date of birth.
Do I need consent for public roll data?
Yes. The roll is public, but you are processing someone's personal data for your purpose, and the DPDP Act still applies.
Try the Voter ID Verification API
Sandbox keys, the full field reference and a Postman collection, usually within a working day.