---
title: "Pwned Passwords range search (k-Anonymity)"
method: GET
path: "/range/{prefix}"
tags: ["Pwned Passwords"]
---

# Pwned Passwords range search (k-Anonymity)

`GET /range/{prefix}`

## Request

- Base URL: `https://api.pwnedpasswords.com`
- URL: `https://api.pwnedpasswords.com/range/{prefix}`
- Auth: none required

Free Pwned Passwords range search using k-anonymity. This endpoint does not require authentication and is not rate limited; a user-agent header is recommended. Provide the first 5 characters of either a SHA-1 or NTLM hash to receive matching suffixes and prevalence counts.

## Path parameters

- `prefix` string, required

## Query parameters

- `mode` 'ntlm'

## Headers

- `user-agent` string
- `Add-Padding` boolean

## Response `200`

Hash suffixes and prevalence counts. Each line contains a hash suffix followed by a colon and the count of how many times the password appears in the data set. Padded entries (when Add-Padding is used) always have a count of 0 and should be discarded. SHA-1 suffixes contain 35 hexadecimal characters; NTLM suffixes contain 27. Every valid prefix returns 200, even if the full hash being searched is absent. Lines are separated by CRLF.

## Other responses

- `400`: The prefix must contain exactly five hexadecimal characters.

## Changes

- **2026-11-16** `7bd47da8c4f3`: 3 info
  - the `header` request parameter `user-agent` became optional
  - added the non-success response with the status `400`
  - removed the non-success response with the status `403`
- **2026-09-11** `1bb60b713979`: 2 info
  - api operation id `getPasswordRange` was added
  - api tag `Pwned Passwords` added
- **2026-03-24** `129587cd1899`: 1 breaking
  - added the pattern `^[0-9A-Fa-f]{5}$` to the `path` request parameter `prefix`

[Operation history](https://skmtc.dev/haveibeenpwned/apis/have-i-been-pwned-api-v3/changes/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)
