> 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/get-leak-by-id.md).

# Get Leak by Id

{% hint style="warning" %}
Get Leak by Id is only available for CTI Firm licenses.
{% endhint %}

## Endpoint

`POST /api/get_leak_by_id.php`

## Required Headers

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

## Parameters

<table><thead><tr><th width="247">Name</th><th width="141">Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>apikey</td><td>string</td><td>Yes</td><td>N/A</td><td>Your API key.</td></tr><tr><td>leak_id</td><td>int</td><td>Yes</td><td>N/A</td><td>Leak Id.</td></tr></tbody></table>

{% hint style="info" %}
If no date is specified, API will return all of the results related to given Hostname.
{% endhint %}

## Sample Request

### Request URL

POST /api/get\_leaks\_by\_hostname.php

```json
{
    "leak_id": "ID of the leak",
    "apikey": "yourapikey"
}
```

### Example Success Response

```json
{"remaining_daily_api_calls":495,"system_info":{}, "credentials":[{}]}
```

### Example Error Response

```json
{"error":"Missing search parameter."}
```

## Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/get_leak_by_id.php \
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "leak_id": "LEAK ID"
         }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/get_leak_by_id.php"
payload = {
    "apikey": "yourapikey",
    "leak_id": "LEAK ID"
}
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 leak:", response.status_code, response.text)

```
