> 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)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.whiteintel.io/whiteintel-api-doc/whiteintel-api-v1/infostealer-api/customer-leaks-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
