> For the complete documentation index, see [llms.txt](https://docs.whiteintel.io/whiteintel-api-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whiteintel.io/whiteintel-api-doc/whiteintel-api-v1/combolists-api/get-ids-from-leaks.md).

# Get IDs From Leaks

This API endpoint is designed for returning list of Ids associated with a domain address in combolist data sets.

### Endpoint

`POST /api/combolists/v2/ids_from_leaks.php`

### Required Headers

| Name         | Description                       |
| ------------ | --------------------------------- |
| Content-Type | Must be set to `application/json` |

### Parameters

<table><thead><tr><th width="152">Name</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>query</td><td>string</td><td>Yes</td><td>N/A</td><td>The query to search for leaks (e.g domain.com)</td></tr><tr><td>apikey</td><td>string</td><td>Yes</td><td>N/A</td><td>Your API key.</td></tr><tr><td>limit</td><td>int</td><td>N/A</td><td>100</td><td>  Maximum value 1000</td></tr><tr><td>start_id</td><td>int</td><td>N/A</td><td>0</td><td>start id of the records</td></tr><tr><td>end_id</td><td>int</td><td>N/A</td><td>N/A</td><td>end id of the records</td></tr><tr><td>full_stats</td><td>int</td><td>N/A</td><td>0</td><td>This option includes full stats (total number of ids, minimum id and maximum id)</td></tr><tr><td>leak_type</td><td>string</td><td>Yes</td><td>customer</td><td>Leak type. customer, corporate or username</td></tr></tbody></table>

### Sample Request

#### Request URL

POST /api/combolists/v2/get\_ids\_from\_leaks.php

```json
{
    "apikey": "yourapikey"
    "query": "exampledomain.com",
    "full_stats": 1,
    "leak_type": "customer"
    
}
```

#### Example Success Response

```json
{"total_results_returned":55,"remaining_daily_api_calls":467,"id_values":[876971,26021309,36311149,503078514,510483414,525001678,525990451,526970605,596740937,649549823,650958787,660376419,662460305,828254786,1018287887,1086729837,1134875135,1135279022,1162517112,1162588579,1166699444,1183951003,1208994198,1218170175,1234952924,1250669578,1332453017,1354013854,1365207290,1414732894,1468766452,1503855668,1577713118,1585785237,1605671666,1755689038,1976246225,2085130647,2211845843,2213288597,2214424843,2270925194,2340249234,2340551598,2341286777,2343421827,2345331724,2345533257,2348679766,2353130876,2354102879,2373234306,2403845099,2415149649,2422267155],"max_id":2422267155,"min_id":876971,"total_ids":55}
```

#### Example Error Response

```json
{"error":"Invalid type."}
```

### Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/combolists/v2/get_ids_from_leaks.php
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "query": "exampledomain.com",
           "full_stats": 1,
           "leak_type": "customer"
           
         }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/combolists/v2/get_ids_from_leaks.php"
payload = {
           "apikey": "yourapikey",
           "query": "exampledomain.com",
           "full_stats": 1,
           "leak_type": "customer"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
    print("Response:", response.json())
else:
    print("Failed to retrieve ids:", response.status_code, response.text)

```
