# Password Breach Checker API

> Password Breach Checker tells you whether a password has been pwned: whether it appears in the Pwned Passwords corpus of passwords exposed in data breaches, the same corpus behind Have I Been Pwned. Send the password or its SHA-1 hash and get a breached flag. Paid plans add how many times it was seen and a risk level.

**Endpoint:** `POST https://api.apiverve.com/v1/passwordbreach`  
**Category:** Security  
**Cost:** 5 credits per call  
**Canonical page:** https://apiverve.com/marketplace/passwordbreach

## Overview

The password is hashed with SHA-1 on our side and matched against our own copy of the Pwned Passwords corpus (about 2 billion breached passwords, refreshed on a rolling cycle every few months), so neither the password nor any part of its hash is sent to a third party. It is not logged, stored or returned. You can also send the SHA-1 yourself so the plain password never reaches us. Breach data: Pwned Passwords by Have I Been Pwned (haveibeenpwned.com), CC BY 4.0.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/passwordbreach" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"password":"password123","hash":"value"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string | No | The password to check. Hashed on receipt and never stored. Send this or hash. length 0-1024 |
| `hash` | string | No | The 40-character hex SHA-1 of the password, instead of the password itself |

## Response fields

- `breached` — boolean · True when the password appears in the breach corpus
- `breachCount` — number · Number of times the password appears in the breach corpus · (premium)
- `riskLevel` — string · Exposure bracket: none, low (1-9), medium (10-999), high (1,000-99,999) or critical (100,000+) · (premium)
- `inputType` — string · Whether a password or a hash was checked
- `hashPrefix` — string · The first 5 characters of the password's SHA-1, useful for matching the result to your own hash

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "breached": true,
    "breachCount": 2266543,
    "riskLevel": "critical",
    "inputType": "password",
    "hashPrefix": "CBFDA"
  }
}
```

## Use cases

- **Sign-Up and Password Change** — Reject or warn on passwords that have appeared in breaches when a user creates an account or changes their password, as NIST SP 800-63B recommends.
- **Login Risk Scoring** — Flag accounts whose current password is known to be breached and prompt a reset before credential stuffing finds them.
- **Password Audits** — Check stored SHA-1 hashes from a legacy system against the breach corpus without handling plain passwords.
- **Password Managers** — Mark saved passwords that have leaked so users know which ones to change first.

## More

- Full reference: https://docs.apiverve.com/ref/passwordbreach
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
