Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

HaveIBeenPwned Breached Accounts API

Lookup breaches affecting an email address.

HaveIBeenPwned Breached Accounts API is one of 8 APIs that HaveIBeenPwned publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 9 JSON Schema definitions.

Tagged areas include Breached Accounts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, rate-limit docs, and 9 JSON Schemas.

This API exposes 2 operations across 2 paths, and defines 4 schemas. It is described by OpenAPI 3.0.3, at version 3.0.0.

Requests are made against a single base URL, https://haveibeenpwned.com/api/v3.

2 operations 2 paths 4 schemas 2 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
3.0.0
Base URL
https://haveibeenpwned.com/api/v3
Authentication
API Key
Resource Areas
1

Authentication & Security 1

HaveIBeenPwned Breached Accounts API declares 1 security scheme for authenticating requests. An API key is passed in the header as hibp-api-key (ApiKeyAuth). By default, every request must be authenticated.

  • ApiKeyAuth — 32-character hexadecimal API key issued at https://haveibeenpwned.com/API/Key. Required for all account, paste, stealer log, domain search, and subscription en…

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 GET. Each is listed below with its method, path, parameters, and response codes.

Breached Accounts 2

Lookup breaches affecting an email address.

GET
/breachedaccount/{account}
Get Breaches For An Account
getBreachesForAccount 4 params → 200400401403404429
GET
/breachedaccount/range/{hashPrefix}
Get Breaches By K-Anonymity Range
getBreachesByRange 1 param → 200401403429

Schemas 4

The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are Breach (19 properties), BreachedAccountRangeEntry (2 properties), Error (2 properties), BreachName (1 property). Each schema is shown below with its type and property counts.

Breach
object
Full metadata record describing a breach in HIBP.
19 properties 7 required
Error
object
Standard HIBP error payload.
2 properties 2 required
BreachedAccountRangeEntry
object
A k-anonymity breached-account match.
2 properties 2 required
BreachName
object
Truncated breach representation returned by default from /breachedaccount.
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

haveibeenpwned-breached-accounts-api-openapi.yml Raw ↑

Other APIs HaveIBeenPwned publishes across the network.

HaveIBeenPwned Breaches API
HaveIBeenPwned Data Classes API
HaveIBeenPwned Domain Search API
HaveIBeenPwned Pastes API
HaveIBeenPwned Range Search API
HaveIBeenPwned Stealer Logs API
HaveIBeenPwned Subscription API