---
title: DL Extraction
slug: api-marketplace/dl-extraction
createdAt: 2023-11-02T11:46:52.780Z
---

## Introduction

The Driving Licence Extraction API is engineered to efficiently extract data from images of driving licences. By inputting the URL of the driving licence image, the API returns structured data extracted from the image. This includes essential details such as the licence holder's name, date of birth, driving licence number, issue and expiry dates, address, and other pertinent information.&#x20;

**Performance metrics:**

95% of responses within 4.8 secs.

Accuracy: 92%

***

## API details

### Endpoint

:::CodeblockTabs
Production Environment

```jsx
POST https://api.signzy.app/api/v3/driving-licence/extractions
```
:::

:::CodeblockTabs
UAT/Testing environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/driving-licence/extractions
```
:::

***

### Request headers&#x20;

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

***

### Request body parameters

| **Parameter** | **Data type**    | **Description**                                           | **Required** |
| ------------- | ---------------- | --------------------------------------------------------- | ------------ |
| files         | Array of Strings | An array containing the URL of the files being extracted. | Mandatory    |

```json
{
    "files": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/0000000.jpg"
    ]
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/driving-licence/extractions' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your access token>' \
--data '{
    "files": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/0000000.jpg"
    ]
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "files": [
    "https://preproduction-persist.signzy.tech/api/files/37100725/download/0000000.jpg"
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/driving-licence/extractions',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Your 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://preproduction-persist.signzy.tech/api/files/37100725/download/0000000.jpg"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Your access token>'
}
conn.request("POST", "/api/v3/driving-licence/extractions", 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/driving-licence/extractions"
  method := "POST"

  payload := strings.NewReader(`{
    "files": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/0000000.jpg"
    ]
}`)

  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", "<Your 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                                                                                         |
| ------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| files                           | Array of Strings | URL of files being extracted.                                                                       |
| id                              | Integer          | Unique ID for the request.                                                                          |
| result                          | Object           | Contains the result of extraction.                                                                  |
| result.dlType                   | Array of Strings | Class of vehicle for which the driving licence is provided.                                         |
| result.issueDate                | String           | Issue date in format DD/MM/YYYY.                                                                    |
| result.expiryDate               | String           | Expiry date in format DD/MM/YYYY.                                                                   |
| result.dob                      | String           | Date of birth of the individual in format DD/MM/YYYY.                                               |
| result.cdoi                     | String           | Current Date of Issue in format DD-MM-YYYY                                                          |
| result.guardianName             | String           | Name of the guardian.                                                                               |
| result.name                     | String           | Name of the licence holder.                                                                         |
| result.number                   | String           | Driving licence number.                                                                             |
| result.state                    | String           | State.                                                                                              |
| result.address                  | String           | Full address of the licence holder.                                                                 |
| result.gaurdianName             | String           | Name of the guardian.                                                                               |
| result.splitAddress             | Object           | Contains the address in split format.                                                               |
| result.splitAddress.district    | Array of strings | District.                                                                                           |
| result.splitAddress.state       | Array of strings | State.                                                                                              |
| result.splitAddress.city        | Array of strings | City.                                                                                               |
| result.splitAddress.pincode     | String           | Pincode.                                                                                            |
| result.splitAddress.country     | Array of Strings | Country.                                                                                            |
| result.splitAddress.addressLine | String           | Address line.                                                                                       |
| result.summary                  | Object           | Summary of extracted details.                                                                       |
| result.summary.number           | String           | Driving licence number.                                                                             |
| result.summary.name             | String           | Name of the licence holder.                                                                         |
| result.summary.dob              | String           | Date of birth in format DD/MM/YYYY.                                                                 |
| result.summary.address          | String           | Full address of the licence holder.                                                                 |
| result.summary.splitAddress     | Object           | Contains the address in split format.                                                               |
| result.summary.gender           | String           | Gender of the licence holder.If available.<br />Possible  response could be:<br />MALE,<br />FEMALE |
| result.summary.guardianName     | String           | Name of the guardian.                                                                               |
| result.summary.issueDate        | String           | Issue date in format DD/MM/YYYY.                                                                    |
| result.summary.expiryDate       | String           | Expiry date in format DD/MM/YYYY.                                                                   |

:::CodeblockTabs
200

```json
{
    "files": [
        "https://preproduction-persist.signzy.tech/api/files/39733865/download/0000000000.jpg"
    ],
    "id": 702,
    "result": {
        "dlType": [
            "LMV-NT",
            "MCWGR"
        ],
        "issueDate": "DD/MM/YYYY",
        "expiryDate": "DD/MM/YYYY",
        "dob": "DD/MM/YYYY",
        "cdoi": "DD-MM-YYYY",
        "guardianName": "Guardian name",
        "name": "Name",
        "number": "XX-0000000000000",
        "state": "Delhi",
        "address": "Full address",
        "gaurdianName": "Guardian name",
        "splitAddress": {
            "district": [
                "WEST DELHI"
            ],
            "state": [
                [
                    "DELHI",
                    "DL"
                ]
            ],
            "city": [
                "DELHI"
            ],
            "pincode": "000000",
            "country": [
                "IN",
                "IND",
                "INDIA"
            ],
            "addressLine": "Address line"
        },
        "summary": {
            "number": "XX-0000000000000",
            "name": "Name",
            "dob": "DD/MM/YYYY",
            "address": "Full address",
            "splitAddress": {
                "district": [
                    "WEST DELHI"
                ],
                "state": [
                    [
                        "DELHI",
                        "DL"
                    ]
                ],
                "city": [
                    "DELHI"
                ],
                "pincode": "000000",
                "country": [
                    "IN",
                    "IND",
                    "INDIA"
                ],
                "addressLine": "Address line"
            },
            "gender": "",
            "guardianName": "Guardian name",
            "issueDate": "DD/MM/YYYY",
            "expiryDate": "DD/MM/YYYY"
        }
    }
}
```

400

```json
// Wrong url type passed
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "Only image(s)/pdf(s) are allowed, one of the urls does not respond like an image"
    }
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

***

### Document Related constraints

:::hint{type="info"}
No limit in file size of the document.

The API processes only the first image URL in the files array per request.

For best results, make sure the image you use fits tightly in the camera view and is horizontally aligned.

Supported document types:

- Image - JPEG, JPG, PNG and TIFF/TIF.
- Single page PDF - In the case of multipage PDF input the API will only consider the first page for extraction.
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

