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

# Last Leaks API

## Description

The Last Leaks API enables users to check the most recent credential leaks. Please note that 'latest' refers to the date the leaks were added to the system, not the original breach date.

## Endpoint

`POST /api/get_last_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 a domain (example.com)                                              |
| apikey                | string  | Yes      | N/A       | Your API key.                                                                               |
| include\_system\_info | integer | No       | 0         | Include system information of compromised devices (0 or 1)                                  |
| num\_days             | integer | No       | 1         | Return entries added within the last specified number of days (up to a maximum of 30 days). |
| leak\_type            | string  | No       | customers | Return customer leaks or corporate\_email leaks. (customers or corporate\_emails)           |
| limit                 | int     | No       | N/A       | Limits the results to given number                                                          |
| data\_type            | string  | No       | stealer   | Data type. "stealer" or "combolist"                                                         |

## Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/get_last_leaks.php \
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "query": "example.com",
           "leak_type":"customers",
           "data_type":"stealer",
           "include_system_info": 0,
           "num_days": 5
         }'
```

Example with Python

```
import requests

url = "https://whiteintel.io/api/get_last_leaks.php"
payload = {
    "apikey": "yourapikey",
    "query":"example.com",
    "leak_type":"customers",
    "data_type":"stealer",
    "include_system_info": 0,
    "num_days": 5
}
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 data updates", 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/last-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.
