HaveIBeenPwned API
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.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from HaveIBeenPwned",
"description": "Passwords which have previously been exposed in data breaches",
"timestamp": "2025-01-15T10:00:00Z"
}
} 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
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://haveibeenpwned.com/API/v3";
// 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.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Similar APIs
View All →Application Environment Verification
Application Environment Verification (AEV) is an Android library and API from FingerprintJS that checks whether a user device is safe to use.
BinaryEdge
BinaryEdge is a cybersecurity platform that continuously scans the entire internet and exposes the results through its API.
Botd
Botd is an open-source JavaScript library and API from FingerprintJS that detects whether a web visitor is a bot or a real human browser.
Bugcrowd
The Bugcrowd API gives you programmatic access to your organization's bug bounty program data, including submissions, rewards, and researcher profiles.
Censys
Censys is an internet-wide scanning platform that lets you search for any internet-connected host, device, or certificate using its REST API.