> 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-multiple-leaks-by-ids.md).

# Get Multiple Leaks By Ids

### Description

This API endpoint allows users to retrieve leaks by using the id values of stealer dataset records.

{% hint style="info" %}
For collecting ID values please check Get IDs From Leaks API endpoint.
{% endhint %}

### Endpoint

`POST /api/get_leaks_by_ids.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 (eg: abc.com) |
| apikey     | string | Yes      | N/A     | Your API key.                               |
| leak\_type | string | Yes      | N/A     | Type of leaks: customer or corporate.       |
| ids        | array  | Yes      | N/A     | Array of intiger id values                  |

### Sample Request

#### Request URL

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

```json
{
  "apikey":"yourapikey",
 "leak_type":"customer", 
 "query":"123.com",
 "ids":[123, 42232]
    
}
```

#### Example Success Response

```json
{"remaining_daily_api_calls":1992,"leaks":[{"id":1328717,"compromised_host_username":"HOSTUSERNAME","compromised_host_hostname":"HOSTNAME","compromised_host_os":"Windows 10 (10.0.19045) x64","malware_path":"C:\\Users\\\\AppData\\Local\\Temp\\PATH.EXE","country":"IT","log_date":"2024-02-29","credentials":[{"url":"url.com","username":"username","password":"[NOT_SAVED]"}]}]}
```

#### Example Error Response

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

### Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/get_leaks_by_ids.php \
     -H "Content-Type: application/json" \
     -d '{
     "apikey":"yourapikey",
      "leak_type":"customer", 
      "query":"123.com",
      "ids":[123, 42232]
    
          }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/get_leaks_by_ids.php"
payload = {
  "apikey":"yourapikey",
 "leak_type":"customer", 
         "query":"123.com",
         "ids":[123, 42232]
}
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 ids:", 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:

```
GET https://docs.whiteintel.io/whiteintel-api-doc/whiteintel-api-v1/infostealer-api/get-multiple-leaks-by-ids.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
