HaveIBeenPwned API

Beginner's Pick Security / API Key Intermediate HTTPS
87 A
Measured Score 0 50 100 Speed 24/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

Have I Been Pwned (HIBP) lets you check whether an email address or password has appeared in known data breaches. It is one of the most trusted security APIs available and is used by browsers, password managers, and security tools worldwide. Beginners can use the password API without any authentication by sending a hash prefix instead of the actual password.

Beginner Tip

Never send full passwords to the API — use the k-anonymity model: hash your password with SHA-1, send only the first 5 characters, and check if your full hash appears in the returned list. This keeps your password private even from the API.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://haveibeenpwned.com/api/v3/breach/Adobe
Result
HTTP 200 · application/json · 1,057 bytes · compressed
Response time
48 ms (median of 3) · fastest 46 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
Name string Adobe
Title string Adobe
Domain string adobe.com
BreachDate string (date) 2013-10-04
AddedDate string (date) 2013-12-04T00:00:00Z
ModifiedDate string (date) 2022-05-15T23:52:49Z
PwnCount integer 152445165
Description string In October 2013, 153 million Adobe accounts w…
LogoPath string (url) https://logos.haveibeenpwned.com/Adobe.png
Attribution null null
DisclosureUrl null null
DataClasses array [1 item]
IsVerified boolean true
IsFabricated boolean false

Captured Response

Captured from a real request to https://haveibeenpwned.com/api/v3/breach/Adobe on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "Name": "Adobe",
  "Title": "Adobe",
  "Domain": "adobe.com",
  "BreachDate": "2013-10-04",
  "AddedDate": "2013-12-04T00:00:00Z",
  "ModifiedDate": "2022-05-15T23:52:49Z",
  "PwnCount": 152445165,
  "Description": "In October 2013, 153 million Adobe accounts were breached with each containing an internal ID, username, email, <em>encrypted</em> password and a password hi…",
  "LogoPath": "https://logos.haveibeenpwned.com/Adobe.png",
  "Attribution": null,
  "DisclosureUrl": null,
  "DataClasses": [
    "Email addresses"
  ],
  "IsVerified": true,
  "IsFabricated": false,
  "…": "(6 more fields)"
}

Field Reference

Name Short identifier for the breach (e.g., "Adobe").
Title Full human-readable name of the breached service.
BreachDate Date when the breach is estimated to have occurred (YYYY-MM-DD).
PwnCount Number of accounts exposed in the breach.
DataClasses Types of data exposed, such as "Email addresses" or "Passwords".

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://haveibeenpwned.com/api/v3/breachedaccount/[email protected]";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist application/json
{
  "status": 404,
  "error": "Not Found"
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

401 Unauthorized The hibp-api-key header is missing from the request.
Purchase an API key at haveibeenpwned.com/API/Key and include it as the hibp-api-key header in every request.
403 Forbidden (User-Agent missing) The HIBP API requires a descriptive User-Agent header and will reject generic or missing ones.
Add a User-Agent header with your application name, e.g., -H "User-Agent: MyPasswordChecker/1.0".
404 Not Found The email address was not found in any breach — this is actually a good result.
A 404 means the account is clean. Treat this as a success case in your code rather than an error.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 24/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 48ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Security
Difficulty Intermediate
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →