# PBS v2 | Public Breached Search V2 | NiamonX API

# 🔍 Public Breached Search V2 — NiamonX API Guide

The **Public Breached Search V2** endpoint allows you to search for publicly available breach records in the NiamonX secure data analysis system.  
It operates through a **private, encrypted channel** and uses a **minimal indexing model** to protect sensitive data.

Supported identifiers include:

- **Email**
- **Username**
- **Phone**
- **Hash**

All requests must be made securely and responsibly.  
**Never share or publish personal results** — doing so may violate data protection laws and lead to account suspension.

---

## 🧭 API Endpoint

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-post-https%3A%2F%2Fdash.ni"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`POST https://dash.niamonx.io/api/v2/breaches_s_v2`</div></div>### Headers:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-content-type%3A-applic"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-attribute">Content-Type</span>: application/json<span class="hljs-attribute">X-API-Key</span>: YOUR_API_KEY`</div></div>### Body:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--1"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```bash
{ "value": "test@example.com", "type": "auto" }
```

**Available types:**  
`auto`, `email`, `username`, `phone`, `hash`

---

## 💡 Description

This API searches **closed and anonymized datasets** for breached credential evidence.  
Decryption happens at the client level using your master key, ensuring full end-to-end security.

Additional features:

- Passwords are hidden by default (toggleable).
- Supports export to CSV/JSON.
- Local query history.
- Internal quotas are invisible to users.
- Misuse or unauthorized data searches may result in a ban.

---

## ✅ Example Successful Response

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--4"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```bash
{
  "success": true,
  "data": {
    "query": {
      "value": "test@niamonx.io",
      "type": "auto"
    },
    "stats": {
      "found": 2,
      "returned": 2,
      "with_passwords": 2,
      "unique_sources": 1,
      "earliest_month": null,
      "latest_month": null
    },
    "records": [
      {
        "source": {
          "name": "Stealer Logs",
          "breach_date": null,
          "unverified": 0,
          "passwordless": 0,
          "compilation": 1
        },
        "account": "test@niamonx.io",
        "email": "test@niamonx.io",
        "username": null,
        "phone": null,
        "hash": null,
        "password": "z8NiAmOn50H",
        "fields": [
          "password",
          "origin",
          "email"
        ]
      },
      {
        "source": {
          "name": "Stealer Logs",
          "breach_date": null,
          "unverified": 0,
          "passwordless": 0,
          "compilation": 1
        },
        "account": "test@niamonx.io",
        "email": "test@niamonx.io",
        "username": null,
        "phone": null,
        "hash": null,
        "password": "ViptraNiA!",
        "fields": [
          "password",
          "origin",
          "email"
        ]
      }
    ],
    "niamonx_success": true,
    "status": "ok",
    "fetched_at": "2025-11-09T22:04:00+00:00",
    "api_timing_ms": 146
  }
}

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--5"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

## ⚠️ Possible Outcomes

### No Matches Found

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--7"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```json
{
  "success": true,
  "data": {
    "success": false,
    "status": "error",
    "error": "HTTP 400",
    "query": {
      "value": "not_found",
      "type": "auto"
    }
  }
}

```

### DataGuard Protection

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--8"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```bash
{
  "success": true,
  "data": {
    "success": false,
    "error": "[NiamonX | DataGuard] This data has been removed and is no longer indexed by our search engine at the request of the copyright holder."
  }
}

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--9"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

## 🌐 HTTP Status Codes

<div class="_tableContainer_1rjym_1" id="bkmrk-code-meaning-200-%E2%9C%85-s"><div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse" tabindex="-1"><table class="w-fit min-w-(--thread-content-width)" data-end="3714" data-start="3355"><thead data-end="3373" data-start="3355"><tr data-end="3373" data-start="3355"><th data-col-size="sm" data-end="3362" data-start="3355">Code</th><th data-col-size="md" data-end="3373" data-start="3362">Meaning</th></tr></thead><tbody data-end="3714" data-start="3394"><tr data-end="3449" data-start="3394"><td data-col-size="sm" data-end="3404" data-start="3394">**200**</td><td data-col-size="md" data-end="3449" data-start="3404">✅ Successful response (check data object)</td></tr><tr data-end="3496" data-start="3450"><td data-col-size="sm" data-end="3460" data-start="3450">**400**</td><td data-col-size="md" data-end="3496" data-start="3460">❌ Validation error in input data</td></tr><tr data-end="3540" data-start="3497"><td data-col-size="sm" data-end="3507" data-start="3497">**401**</td><td data-col-size="md" data-end="3540" data-start="3507">🚫 Invalid or missing API key</td></tr><tr data-end="3585" data-start="3541"><td data-col-size="sm" data-end="3551" data-start="3541">**403**</td><td data-col-size="md" data-end="3585" data-start="3551">⛔ Tool disabled or unavailable</td></tr><tr data-end="3618" data-start="3586"><td data-col-size="sm" data-end="3596" data-start="3586">**404**</td><td data-col-size="md" data-end="3618" data-start="3596">❓ Unknown endpoint</td></tr><tr data-end="3667" data-start="3619"><td data-col-size="sm" data-end="3629" data-start="3619">**405**</td><td data-col-size="md" data-end="3667" data-start="3629">⚙️ Method not allowed (use `POST`)</td></tr><tr data-end="3714" data-start="3668"><td data-col-size="sm" data-end="3678" data-start="3668">**429**</td><td data-col-size="md" data-end="3714" data-start="3678">⏳ Cooldown / daily limit reached</td></tr></tbody></table>

</div></div>---

## 🧩 Example Implementations

### 1. cURL

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--12"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```bash
curl -X POST https://dash.niamonx.io/api/v2/breaches_s_v2 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"value":"test@example.com","type":"auto"}'

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--13"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

### 2. Python (using `requests`)

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--15"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```python
import requests

url = "https://dash.niamonx.io/api/v2/breaches_s_v2"
headers = {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_API_KEY"
}
data = {
    "value": "test@example.com",
    "type": "auto"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--16"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

### 3. JavaScript (Node.js, using `axios`)

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--18"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```javascript
import axios from "axios";

const url = "https://dash.niamonx.io/api/v2/breaches_s_v2";
const headers = {
  "Content-Type": "application/json",
  "X-API-Key": "YOUR_API_KEY"
};

const data = {
  value: "test@example.com",
  type: "auto"
};

axios.post(url, data, { headers })
  .then(res => console.log(res.data))
  .catch(err => console.error(err.response?.data || err.message));

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--19"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

### 4. PHP

```php
<?php
$url = "https://dash.niamonx.io/api/v2/breaches_s_v2";
$headers = [
    "Content-Type: application/json",
    "X-API-Key: YOUR_API_KEY"
];
$body = json_encode([
    "value" => "test@example.com",
    "type" => "auto"
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--21"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

### 5. Go

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {
	url := "https://dash.niamonx.io/api/v2/breaches_s_v2"
	body := map[string]string{
		"value": "test@example.com",
		"type":  "auto",
	}
	jsonData, _ := json.Marshal(body)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("X-API-Key", "YOUR_API_KEY")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()

	respBody, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(respBody))
}

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--23"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>---

## 🛡️ Security Recommendations

- Keep your API key private; never hard-code it in shared repositories.
- Use HTTPS exclusively — no plain HTTP connections are allowed.
- If your key is compromised, revoke it immediately.
- Store credentials in environment variables or encrypted vaults.
- Do not reshare or republish search results publicly.

---

✅ **You’re all set!**  
With your **NiamonX API Key** and this **Public Breached Search V2** guide, you can perform encrypted and privacy-compliant breach lookups safely and efficiently.