> 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/combolists-username-leaks-api.md).

# ComboLists Username Leaks API

## Combolists Username Leaks API

### Description

The Username Leaks API allows users to retrieve leaks associated with a specific username (e.g., <abc@gmail.com> or a direct username such as admin). The request must include the query parameter and apikey. Other parameters are optional and can be used to include system information of compromised devices or to specify a custom date range.

### Endpoint

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

### Required Headers

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

### Parameters

| Name      | Type   | Required | Default | Description                                                                       |
| --------- | ------ | -------- | ------- | --------------------------------------------------------------------------------- |
| query     | string | Yes      | N/A     | The query to search for leaks (e.g., <test@example.com>) Must be in email format. |
| apikey    | string | Yes      | N/A     | Your API key.                                                                     |
| limit     | int    | No       | 20      | Affects have many results return for query. Max value 100.                        |
| start\_id | int    | No       | N/A     | To restrict results to start from given id.                                       |
| boolean   | int    | No       | 0       | Set to 1 to return true if the user was breached, otherwise false.                |

### Sample Request

#### Request URL

POST /api/combolists/v2/get\_username\_leaks.php

```json
{
    "query": "sampleuser@test.com",
    "limit": 100,
    
}
```

#### Example Success Response

```json
{"total_leaks":2,"remaining_daily_api_calls":176,"data":[{"url":"https:\/\/outlook.microsoftonline.com\/","username":"sampleuser@test.com","password":"123*****"}]}
```

#### Example Error Response

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

### Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/combolists/v2/get_username_leaks.php \
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "query": "sampleuser@test.com"
         }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/combolists/v2/get_username_leaks.php"
payload = {
    "apikey": "yourapikey",
    "query": "sampleuser@test.com"
}
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 customer leaks:", response.status_code, response.text)

```
