Aadhaar Card OCR — Extract Identity Details
Upload an Aadhaar card image and extract name, DOB, gender, address, and Aadhaar number automatically. Supports front and back.
curl -X POST "https://production.deepvue.tech/v1/documents/extraction/ind_aadhaar" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"document1": "example_string",
"document2": "example_string",
"name": "John Doe"
}'
import requests
import json
url = "https://production.deepvue.tech/v1/documents/extraction/ind_aadhaar"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
data = {
"document1": "example_string",
"document2": "example_string",
"name": "John Doe"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/documents/extraction/ind_aadhaar", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
},
body: JSON.stringify({
"document1": "example_string",
"document2": "example_string",
"name": "John Doe"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"document1": "example_string",
"document2": "example_string",
"name": "John Doe"
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/documents/extraction/ind_aadhaar", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/documents/extraction/ind_aadhaar')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['x-api-key'] = 'YOUR_API_KEY'
request.body = '{
"document1": "example_string",
"document2": "example_string",
"name": "John Doe"
}'
response = http.request(request)
puts response.body
{
"code": 200,
"transaction_id": "string",
"message": "Document processed successfuly",
"data": {
"address": "string",
"date_of_birth": "string",
"district": "string",
"fathers_name": "string",
"gender": "string",
"house_number": "string",
"id_number": "string",
"is_scanned": true,
"name_on_card": "string",
"pincode": "string",
"state": "string",
"street_address": "string",
"year_of_birth": "string"
}
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"transaction_id": "string",
"code": 422,
"message": "Empty document. Valid base64 required."
}
{
"detail": "Internal Server Error"
}
/v1/documents/extraction/ind_aadhaar
ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
The media type of the request body
The main document being submitted for extraction of respective information.
The secondary document being submitted along with the primary document for extraction of respective information.
The name of the document being submitted for extraction of respective information.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Body
The main document being submitted for extraction of respective information.
The secondary document being submitted along with the primary document for extraction of respective information.
The name of the document being submitted for extraction of respective information.
Responses
Overview
The Aadhaar Card OCR API enables extraction of key document fields from Aadhaar card images. The system processes base64-encoded document files to retrieve structured data including identification numbers, personal names, dates of birth, and residential addresses in key-value pair format.
Documents must be submitted as base64-encoded strings within the request payload. The API processes the image and returns extracted information fields such as aadhaar_number, name, dob, and address.
Service Providers shall not share, publish, or display either Share Code or XML file or its contents, as per UIDAI regulations. Non-compliance may trigger enforcement actions under multiple sections of The Aadhaar Act, 2016 and related regulations covering authentication, information sharing, and data protection requirements.
Last updated 4 weeks ago
Built with Documentation.AI