> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Have I Been Pwned

> Data breaches and pastes an email address appears in, breached addresses on your verified domains, and the breach catalogue.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/haveibeenpwned.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=e969878b03b110348ede40d2fd1d99ca)

[Web Catalog · Security](https://docs.webrouter.net/data-apis.md?category=security)

Key for some calls

Endpoints

10

Auth

Key in header

[Vendor docs](https://haveibeenpwned.com/API/v3)

&#x20;·&#x20;

[Pricing](https://haveibeenpwned.com/API/Key)

## Setup

| Variable | | What it is |
| - | - | - |
| `HIBP_API_KEY` | some calls | An HIBP API key (haveibeenpwned.com/API/Key), sent in the hibp-api-key header. The breach catalogue calls need none. |
| `HIBP_USER_AGENT` | optional | The User-Agent HIBP requires on authenticated calls, naming the consuming application; a missing one can be a 403. Default `web-router`. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Breach, paste and stealer-log searches are rate limited per key at the plan's requests per minute (subscription.status returns it as Rpm); over it is a 429 with a retry-after header in seconds. Add a short delay on top of the limit.
* Which calls a key may use depends on its plan: the range search needs Pro or High RPM; domain search only works for domains verified on the dashboard.
* A 404 on a search means nothing was found.
* Stealer-log, domain-verification and Pwned Passwords endpoints are not in this entry.

## Endpoints

GET

Get breaches for an email address

Names (or full models) of every breach an email address appears in.

[Open](#haveibeenpwned-breaches-account)

GET

Get breached accounts by hash prefix (k-anonymity)

Hash suffixes of breached email addresses whose SHA-1 starts with a 6-character prefix, each with its breach names.

[Open](#haveibeenpwned-breaches-account-range)

GET

Get pastes for an email address

Pastes (source, ID, title, date, email count) that contained an email address.

[Open](#haveibeenpwned-pastes-account)

GET

Get breached addresses on a verified domain

Each breached alias on a domain the key's owner has verified, with the breaches it appeared in.

[Open](#haveibeenpwned-breaches-domain)

GET

List the key's verified domains

Domains verified on the key owner's account, with breached-address counts and the next renewal.

[Open](#haveibeenpwned-domains-subscribed)

GET

List all breaches

Every breach in the system with its domain, dates, size, data classes and flags.

[Open](#haveibeenpwned-breaches-list)

GET

Get a breach by name

One breach's full model.

[Open](#haveibeenpwned-breaches-get)

GET

Get the most recently added breach

The breach most recently added to the system.

[Open](#haveibeenpwned-breaches-latest)

GET

List data classes

Every kind of compromised attribute (Email addresses, Passwords...), alphabetically.

[Open](#haveibeenpwned-data-classes-list)

GET

Get the key's subscription

Plan name, end date, requests-per-minute limit and domain-search limits.

[Open](#haveibeenpwned-subscription-status)

### Get breaches for an email address

GET

`/breachedAccount/{email}`

`haveibeenpwned.breaches.account`

Needs&#x20;

`HIBP_API_KEY`

Names (or full models) of every breach an email address appears in.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`email` required</td><td>string</td><td>path</td><td>The email address as is, since the call encodes it; not case-sensitive. Example `test@example.com`</td></tr>

    <tr>
      <td>
        `truncateResponse`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        false returns the full breach model instead of only names.
      </td>
    </tr>

    <tr><td>`domain`</td><td>string</td><td>query</td><td>Only breaches of this domain. Example `adobe.com`</td></tr>

    <tr>
      <td>
        `IncludeUnverified`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        false leaves out breaches flagged unverified (included by default).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#BreachesForAccount)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.account", {'email': 'test@example.com', 'domain': 'adobe.com'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.account", params={"email": "test@example.com", "domain": "adobe.com"})
```

> [!NOTE]
>
> * A 404 means the address is in no breach, not an error.
> * Needs a Core, Pro or High RPM key; counts against the key's per-minute limit.

### Get breached accounts by hash prefix (k-anonymity)

GET

`/breachedAccount/range/{hash_prefix}`

`haveibeenpwned.breaches.account_range`

Needs&#x20;

`HIBP_API_KEY`

Hash suffixes of breached email addresses whose SHA-1 starts with a 6-character prefix, each with its breach names.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`hash_prefix` required</td><td>string</td><td>path</td><td>First 6 hex characters of the SHA-1 of the lower-cased email address. Example `6B5917`</td></tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#BreachesForHashRange)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.account_range", {'hash_prefix': '6B5917'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.account_range", params={"hash_prefix": "6B5917"})
```

> [!NOTE]
>
> * Needs a Pro or High RPM key.

### Get pastes for an email address

GET

`/pasteAccount/{email}`

`haveibeenpwned.pastes.account`

Needs&#x20;

`HIBP_API_KEY`

Pastes (source, ID, title, date, email count) that contained an email address.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`email` required</td><td>string</td><td>path</td><td>The email address as is, since the call encodes it; not case-sensitive. Example `test@example.com`</td></tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#PastesForAccount)

```python Python theme={null}
router.call_data_api("haveibeenpwned.pastes.account", {'email': 'test@example.com'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.pastes.account", params={"email": "test@example.com"})
```

> [!NOTE]
>
> * A 404 means no paste holds the address.

### Get breached addresses on a verified domain

GET

`/breachedDomain/{domain}`

`haveibeenpwned.breaches.domain`

Needs&#x20;

`HIBP_API_KEY`

Each breached alias on a domain the key's owner has verified, with the breaches it appeared in.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`domain` required</td><td>string</td><td>path</td><td>A domain already verified on the key owner's HIBP dashboard. Example `example.com`</td></tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#BreachesForDomain)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.domain", {'domain': 'example.com'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.domain", params={"domain": "example.com"})
```

> [!NOTE]
>
> * Only for verified domains (a 403 otherwise). No formal rate limit, but repeated querying can be throttled: check latestBreach first.

### List the key's verified domains

GET

`/subscribedDomains`

`haveibeenpwned.domains.subscribed`

Needs&#x20;

`HIBP_API_KEY`

Domains verified on the key owner's account, with breached-address counts and the next renewal.

Input

No inputs.

[Vendor docs](https://haveibeenpwned.com/API/v3#SubscribedDomains)

```python Python theme={null}
router.call_data_api("haveibeenpwned.domains.subscribed")
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.domains.subscribed")
```

### List all breaches

GET

`/breaches`

`haveibeenpwned.breaches.list`

Every breach in the system with its domain, dates, size, data classes and flags.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`domain`</td><td>string</td><td>query</td><td>Only breaches of this domain. Example `adobe.com`</td></tr>

    <tr>
      <td>
        `IsSpamList`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true for spam lists only, false to leave them out.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#AllBreaches)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.list", {'domain': 'adobe.com'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.list", params={"domain": "adobe.com"})
```

> [!NOTE]
>
> * Keyless.

### Get a breach by name

GET

`/breach/{name}`

`haveibeenpwned.breaches.get`

One breach's full model.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`name` required</td><td>string</td><td>path</td><td>The breach's Name, as returned elsewhere (not its Title). Example `Adobe`</td></tr>
  </tbody>
</table>

[Vendor docs](https://haveibeenpwned.com/API/v3#SingleBreach)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.get", {'name': 'Adobe'})
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.get", params={"name": "Adobe"})
```

> [!NOTE]
>
> * Keyless.

### Get the most recently added breach

GET

`/latestBreach`

`haveibeenpwned.breaches.latest`

The breach most recently added to the system.

Input

No inputs.

[Vendor docs](https://haveibeenpwned.com/API/v3#MostRecentBreach)

```python Python theme={null}
router.call_data_api("haveibeenpwned.breaches.latest")
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.breaches.latest")
```

> [!NOTE]
>
> * Keyless. Poll this before re-querying domains.

### List data classes

GET

`/dataClasses`

`haveibeenpwned.data_classes.list`

Every kind of compromised attribute (Email addresses, Passwords...), alphabetically.

Input

No inputs.

[Vendor docs](https://haveibeenpwned.com/API/v3#AllDataClasses) · Same job: [AlienVault OTX (LevelBlue Open Threat Exchange)](https://docs.webrouter.net/data-apis/alienvault-otx.md#alienvault-otx-indicator-types-list), [CIRCL hashlookup](https://docs.webrouter.net/data-apis/circl-hashlookup.md#circl-hashlookup-info), [ClinicalTrials.gov](https://docs.webrouter.net/data-apis/clinicaltrials-gov.md#clinicaltrials-gov-studies-enums), [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-categories-list), [Event Registry (NewsAPI.ai)](https://docs.webrouter.net/data-apis/event-registry.md#event-registry-suggest-concepts), [Hybrid Analysis](https://docs.webrouter.net/data-apis/hybrid-analysis.md#hybrid-analysis-environments-list)

```python Python theme={null}
router.call_data_api("haveibeenpwned.data_classes.list")
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.data_classes.list")
```

> [!NOTE]
>
> * Keyless.

### Get the key's subscription

GET

`/subscription/status`

`haveibeenpwned.subscription.status`

Needs&#x20;

`HIBP_API_KEY`

Plan name, end date, requests-per-minute limit and domain-search limits.

Input

No inputs.

[Vendor docs](https://haveibeenpwned.com/API/v3#SubscriptionStatus)

```python Python theme={null}
router.call_data_api("haveibeenpwned.subscription.status")
```

```text MCP theme={null}
call_data_api(endpoint="haveibeenpwned.subscription.status")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.