Have I Been Pwned Range Search API

K-anonymity range search for password hashes.

Operations 1

GET /range/{hashPrefix} Search By Hash Range #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/have-i-been-pwned-range-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

have-i-been-pwned-range-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pwned Passwords Range Search API
  description: 'Pwned Passwords is a free k-anonymity-based lookup service that exposes whether a password

    appears in any of the public credential corpora ingested by Have I Been Pwned. Clients

    submit the first five characters of the SHA-1 (or NTLM) hash of a password and receive

    a list of matching hash suffixes with their breach counts. No authentication is required.'
  version: 2.0.0
  contact:
    name: Pwned Passwords
    url: https://haveibeenpwned.com/API/v3#PwnedPasswords
  license:
    name: Creative Commons Attribution 4.0
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://api.pwnedpasswords.com
  description: Pwned Passwords k-anonymity API
tags:
- name: Range Search
  description: K-anonymity range search for password hashes.
paths:
  /range/{hashPrefix}:
    get:
      tags:
      - Range Search
      summary: Search By Hash Range
      description: 'Returns suffixes of all SHA-1 (or NTLM) hashes that begin with the supplied 5-character

        prefix, alongside the number of times each hash was observed in breaches.'
      operationId: searchPasswordRange
      parameters:
      - name: hashPrefix
        in: path
        required: true
        description: First 5 characters of the SHA-1 (or NTLM) password hash, uppercase hex.
        schema:
          type: string
          pattern: ^[A-F0-9]{5}$
      - name: mode
        in: query
        required: false
        description: Hash algorithm. Default is SHA-1; set `ntlm` for NTLM hashes.
        schema:
          type: string
          enum:
          - sha1
          - ntlm
          default: sha1
      - name: Add-Padding
        in: header
        required: false
        description: When `true`, the response is padded to 800-1,000 entries to mask the response size.
        schema:
          type: boolean
      responses:
        '200':
          description: 'A newline-separated list of `HASHSUFFIX:COUNT` entries. The endpoint always returns

            200; absence of the queried suffix indicates the password is not known to HIBP.

            '
          content:
            text/plain:
              schema:
                type: string
                example: '0018A45C4D1DEF81644B54AB7F969B88D65:1

                  00D4F6E8FA6EECAD2A3AA415EEC418D38EC:2

                  '