---
title: "Get all breached account hashes for a range"
method: GET
path: "/breachedaccount/range/{prefix}"
tags: ["Account breaches"]
---

# Get all breached account hashes for a range

`GET /breachedaccount/range/{prefix}`

## Request

- Base URL: `https://haveibeenpwned.com/api/v3`
- URL: `https://haveibeenpwned.com/api/v3/breachedaccount/range/{prefix}`
- Auth: API key in header `hibp-api-key`

Available on Pro and High RPM subscriptions. Search breached addresses via k-anonymity by providing the first 6 characters of the SHA-1 hash of a normalised email address. Trim leading and trailing whitespace and lowercase the email address before hashing its UTF-8 bytes. The response contains matching hash suffixes and associated breach names after public filtering. Sensitive and retired breaches are not returned. Per the terms of use, any results that do not match the target address being searched must be discarded immediately and not stored or further processed.

For example, SHA-1 of `multiple-breaches@hibp-integration-tests.com` is `6B5917C6C0AADE0C085843D66E4944E108C4A4CD`. Request prefix `6B5917`, then look for suffix `C6C0AADE0C085843D66E4944E108C4A4CD` in the response. This example still requires a subscription with hash-range access. See the [test account reference](https://haveibeenpwned.com/API/v3#TestAccounts).

## Path parameters

- `prefix` string, required

## Headers

- `user-agent` string, required

## Response `200`

Hash suffixes and breach names for addresses in the requested range. Sensitive breaches are removed and any suffix with no remaining public breaches is omitted.

- BreachedAccountRangeResult[]
  - `hashSuffix` string, required: The remaining 34 hexadecimal characters of the breached account's SHA-1 hash.
  - `websites` string[], required: The breach names associated with the hashed account suffix after public API filtering. Sensitive breaches are never returned.

## Other responses

- `400`: Bad request - the prefix was not a 6-character hexadecimal string.
- `401`: Unauthorized - the API key provided was not valid
- `403`: Forbidden - no user agent has been specified in the request, or the current subscription does not include access to the breached-account k-anonymity API.
- `404`: Not found - no public breached-account hashes remain for the requested range after filtering.
- `429`: Too many requests - the rate limit has been exceeded
- `503`: Service unavailable or an edge challenge. The response may be HTML or plain text; do not assume a JSON error body.

## Changes

- **2026-11-16** `7bd47da8c4f3`: 1 breaking, 1 info
  - removed the media type `application/json` for the response with the status `503`
  - the `items/hashSuffix` response's property pattern `^[0-9A-Fa-f]{34}$` was added for the status `200`
- **2026-09-11** `1bb60b713979`: 2 info
  - api operation id `getAccountBreachRange` was added
  - api tag `Account breaches` added
- **2026-07-13** `88f801b9a10d`: 3 breaking, 3 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `403`
  - removed the media type `application/json` for the response with the status `404`
  - added the media type `text/plain` for the response with the status `400`
  - …2 more
- **2026-03-24** `129587cd1899`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/haveibeenpwned/apis/have-i-been-pwned-api-v3/changes/breachedaccount/range/:prefix/get.md)

---

[API](https://skmtc.dev/haveibeenpwned/apis/have-i-been-pwned-api-v3.md) - [All operations](https://skmtc.dev/haveibeenpwned/apis/have-i-been-pwned-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/haveibeenpwned/apis/have-i-been-pwned-api-v3/revisions/52f578954670?raw)
