---
title: Aadhaar Extraction
slug: v3-gateway/aadhaar-extraction
description: Learn how to use the Aadhaar extraction API to quickly and accurately extract key details, such as Aadhaar number, name, date of birth, address, and gender, from Aadhaar identity cards. The document provides code samples in different programming languages
createdAt: 2023-02-27T19:05:04.000Z
---

### Introduction

The Aadhaar extraction API is a powerful tool that makes reading information from Aadhaar identity cards fast and precise. It's especially helpful for financial institutions. By automatically pulling out key details like the Aadhaar number, name, and birth date, this API streamlines processes such as identity verification and KYC procedures. Instead of manual entry, which can be time-consuming and prone to errors, financial institutions can ensure more accurate customer records and more efficient onboarding.

### API Details

**Endpoint:**

:::CodeblockTabs
Production Environment

```none
POST https://api.signzy.app/api/v3/aadhaar/extraction
```
:::

:::CodeblockTabs
UAT/Testing environment

```none
POST https://api-preproduction.signzy.app/api/v3/aadhaar/extraction
```
:::

***

**Request body parameters:**

| **Parameter** | **Data Type** | **Description**                                                                                       | **Required** |
| ------------- | ------------- | ----------------------------------------------------------------------------------------------------- | ------------ |
| files         | Array         | An array of URLs of images of the Aadhaar card in JPEG, JPG, PNG, TIFF, TIF or single-page PDF format | Yes          |

:::CodeblockTabs
Images as Input

```json
{
    "files": [
        "https://domain.com/front_side_image_of_aadhaar_card.png",
        "https://domain.com/back_side_image_of_aadhaar_card.png"
    ]
}
```

PDF as input with front and back as separate PDFs

```json
{
    "files": [
        "https://domain.com/front_side_image_of_aadhaar_card.pdf",
        "https://domain.com/back_side_image_of_aadhaar_card.pdf"
    ]
}
```

Single page PDF containing both front and back

```json
{
    "files": [
        "https://domain.com/single_page.pdf"
    ]
}
```
:::

***

**Request headers:**

| Name          | Value            | Required | Description                                                                                                |
| ------------- | ---------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Yes      | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |
| Authorization | XXXXXXXXXXX      | Yes      | The type of content that the request body contains.                                                        |

***

**Code samples:**

:::CodeblockTabs
Preproduction

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/aadhaar/extraction' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{access-token}}' \
--data '{
    "files": [
        "https://domain.com/front_side_image_of_aadhaar_card.png",
        "https://domain.com/back_side_image_of_aadhaar_card.png"
    ]
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "files": [
    "https://domain.com/front_side_image_of_aadhaar_card.png",
    "https://domain.com/back_side_image_of_aadhaar_card.png"
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/aadhaar/extraction',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '{{access-token}}'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "files": [
    "https://domain.com/front_side_image_of_aadhaar_card.png",
    "https://domain.com/back_side_image_of_aadhaar_card.png"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '{{access-token}}'
}
conn.request("POST", "/api/v3/aadhaar/extraction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/aadhaar/extraction"
  method := "POST"

  payload := strings.NewReader(`{
    "files": [
        "https://domain.com/front_side_image_of_aadhaar_card.png",
        "https://domain.com/back_side_image_of_aadhaar_card.png"
    ]
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "{{access-token}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

**Response body parameters:**

| **Parameter**            | **Data Type** | **Description**                                                                                         |
| ------------------------ | ------------- | ------------------------------------------------------------------------------------------------------- |
| id                       | Integer       | A unique identifier for the API request.                                                                |
| result                   | Object        | The extracted information from the Aadhaar card.                                                        |
| result.uid               | String        | The Aadhaar number.                                                                                     |
| result.vid               | String        | The Virtual ID, if present.                                                                             |
| result.name              | String        | The name of the Aadhaar card holder.                                                                    |
| result.dob               | String        | The date of birth, if available on the Aadhaar card. Otherwise, "Not available on aadhaar" is returned. |
| result.yob               | String        | The year of birth, if available on the Aadhaar card. Otherwise, an empty string is returned.            |
| result.pincode           | String        | The PIN code of the address on the Aadhaar card.                                                        |
| result.address           | String        | The address on the Aadhaar card.                                                                        |
| result.gender            | String        | The gender of the Aadhaar card holder.                                                                  |
| result.uidHash           | String        | The hash of the Aadhaar number.                                                                         |
| result.summary           | Object        | A summary of the extracted information from the Aadhaar card.                                           |
| result.summary.number    | String        | The Aadhaar number.                                                                                     |
| result.summary.name      | String        | The name of the Aadhaar card holder.                                                                    |
| result.summary.dob       | String        | The date of birth, if available on the Aadhaar card. Otherwise, "Not available on aadhaar" is returned. |
| result.summary.address   | String        | The address on the Aadhaar card.                                                                        |
| result.summary.gender    | String        | The gender of the Aadhaar card holder.                                                                  |
| result.splitAddress      | Object        | The address on the Aadhaar card, split into individual components.                                      |
| result.validBackAndFront | Boolean       | Indicates whether both front and back images belong to the same aadhaar card                            |
| result.dateOfBirth       | String        | The date of birth, if available on the Aadhaar card. Otherwise, an emp                                  |

```json
{
    "files": [
        "https://domain.com/front_side_image_of_aadhaar_card.png",
        "https://domain.com/back_side_image_of_aadhaar_card.png"
    ],
    "id": 16,
    "result": {
        "uid": "**********",
        "vid": "",
        "name": "John Doe",
        "dob": "11/04/1978",
        "yob": "1978",
        "pincode": "421503",
        "address": "Sai krupa building A / 103 , manjarli , deepali park , manjarli gaon , Badlapur , Thane , Kulgaon , Maharashtra , 421503",
        "gender": "Male",
        "splitAddress": {
            "district": [
                "THANE"
            ],
            "state": [
                [
                    "MAHARASHTRA",
                    "MH"
                ]
            ],
            "city": [
                ""
            ],
            "pincode": "421503",
            "country": [
                "IN",
                "IND",
                "INDIA"
            ],
            "addressLine": "Sai krupa building A / 103 , manjarli , deepali park , manjarli gaon , Badlapur , Thane , Kulgaon , Maharashtra , 421503"
        },
        "uidHash": "********************************************",
        "summary": {
            "number": "**********",
            "name": "John Doe",
            "dob": "11/04/1978",
            "address": "Sai krupa building A / 103 , manjarli , deepali park , manjarli gaon , Badlapur , Thane , Kulgaon , Maharashtra , 421503",
            "splitAddress": {
                "district": [
                    "THANE"
                ],
                "state": [
                    [
                        "MAHARASHTRA",
                        "MH"
                    ]
                ],
                "city": [
                    ""
                ],
                "pincode": "421503",
                "country": [
                    "IN",
                    "IND",
                    "INDIA"
                ],
                "addressLine": "Sai krupa building A / 103 , manjarli , deepali park , manjarli gaon , Badlapur , Thane , Kulgaon , Maharashtra , 421503"
            },
            "gender": "Male",
            "guardianName": "",
            "issueDate": "",
            "expiryDate": "",
            "dateOfBirth": "11/04/1978"
        },
        "validBackAndFront": true,
        "dateOfBirth": "11/04/1978"
    }
}

```

### Status Codes

| Status Code | Description                      |
| ----------- | -------------------------------- |
| 200         | OK                               |
| 400         | Bad Request (Input Body Invalid) |
| 409         | Upstream Down                    |
| 422         | Unprocessable Entity             |



