> 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/infostealer-api/customer-leaks-api.md).

# Customer Leaks API

## Description

The Customer Leaks API allows users to retrieve leaks associated with a specific query (e.g., domain or apk). 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/get_customer_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., example.com, com.binance.app) |
| apikey                | string | Yes      | N/A                        | Your API key.                                                      |
| include\_system\_info | int    | No       | 0                          | Include system information of compromised devices (0 or 1)         |
| start\_date           | string | No       | 1 week before current date | The start date for retrieving leaks in `YYYY-MM-DD` format         |
| end\_date             | string | No       | Current date               | The end date for retrieving leaks in `YYYY-MM-DD` format           |
| limit                 | int    | No       | N/A                        | Limits the results to given number                                 |

## Sample Request

### Request URL

POST /api/get\_customer\_leaks.php

```json
{
    "query": "127.0.0.1",
    "apikey": "apikey",
}
```

### Example Success Response

```json
{"total_leaks":70,"remaining_daily_api_calls":980,"data":[{"url":"https:\/\/sampleurl.com\/sample_endpoint\/","username":"sampleusername","password":"samplepassword","compromised_device_ip":"127.0.0.1","compromised_host_username":"samplehostusername","compromised_host_hostname":"samplehostname","compromised_host_os":"Windows 10 Home Single Language [x64]","malware_path":"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\AppLaunch.exe","country":"COUNTRY CODE","log_date":"2024-10-23"}]
```

### Example Error Response

```json
{"error":"Missing Search Parameter."}
```

## Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/get_customer_leaks.php \
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "query": "domain.com"
         }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/get_customer_leaks.php"
payload = {
    "apikey": "yourapikey",
    "query": "domain.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 leaks:", response.status_code, response.text)

```
