Skip to content
OSINTtools.io

Have I Been Pwned API

Troy Hunt's free service that lists the known data breaches an email address appears in.

Base URL
https://haveibeenpwned.com/api/v3
Sign-in
API key
Free tier
Free tier
Pricing
Subscription
Format
REST
Endpoints
13

Compiled by OSINTtools.io editors from haveibeenpwned.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

The Have I Been Pwned (HIBP) API tells you which data breaches and pastes an email address appears in, which addresses on a domain you have verified were breached, and which websites had credentials captured by info-stealer malware. It also serves the public catalogue of breaches HIBP has loaded, with each breach's date, size and the kinds of data exposed.

An investigator uses it to check an email address against known breaches, to read what a named breach exposed, and (for domains they control) to see which addresses were caught up. Sensitive and retired breaches are never returned by the public email search; a 404 means no publicly disclosable result, not proof the address was never breached.

Calls go to https://haveibeenpwned.com/api/v3 over HTTPS. Searches by email, domain, paste and stealer log need a paid subscription key in the hibp-api-key header and a User-Agent header that names your app (a missing one returns 403). The breach catalogue and data-class endpoints need no key. Domain and stealer-log searches only work for domains verified on your HIBP dashboard. Pwned Passwords is a separate free, keyless API at https://api.pwnedpasswords.com/range/{first5} (k-anonymity by SHA-1 or NTLM prefix) and is not listed below.

Breach and paste data is licensed under CC BY 4.0: credit Have I Been Pwned with a visible link to haveibeenpwned.com. The docs also list acceptable-use rules, including no harmful querying of breach victims.

Quick start

  1. Get a key

    Create an account with Have I Been Pwned and copy your api key (free tier). Where to get it

  2. Make your first request

    List the breaches an email address appears in. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://haveibeenpwned.com/api/v3/breachedAccount/jane.doe%40example.com' \
      -H 'hibp-api-key: YOUR_API_KEY'
  3. Read the response

    A 200 response (Truncated (default)) looks like this.

    [
      {
        "Name": "ExampleForum"
      },
      {
        "Name": "SampleShop"
      }
    ]

Authentication

Send your API key in the hibp-api-key header of every request.

Also send a User-Agent header naming your app. The breach catalogue and data-class endpoints need no key.

Get a key from Have I Been Pwned

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Breach, paste and stealer-log searches are limited to your subscription's requests per minute (from 10 RPM on Core 1 to 24,000 on High RPM 24000); over the limit returns 429 with a retry-after header in seconds. Domain-based stealer-log searches have a separate, lower limit. Domain search has no off

Free tier. Pricing: subscription.

  • FreeFree · Browser email search, notifications, Pwned Passwords, small-domain monitoring
  • Core$4.39/month · Direct email search API, up to 1,000 requests/min, up to 20 domains
  • Pro$379/month · K-anonymity search, customer domains, up to 16,000 requests/min
  • High RPM$1,150/month · High-throughput email search, up to 24,000 requests/min

Plans from haveibeenpwned.com, checked Nov 25, 2026.

Errors

StatusMeaning
400Bad request, such as an invalid email address or domain
401Missing or invalid API key, or an inactive subscription
403No User-Agent header, or no access to the resource (the body says why)
404No publicly disclosable results for the account or domain
429Rate limit exceeded; wait the number of seconds in retry-after
503Service unavailable, often a Cloudflare response
  • Takes: Email
  • Passive: the target is not contacted
  • Plan: Core, Pro or High RPM

Returns the breaches the address was found in. By default only each breach's Name comes back; set truncateResponse=false for the full breach model. Sensitive and retired breaches are never returned. 404 when the address is in no public breach.

Path parameters

emailstringrequiredtakes your email

The email address, URL-encoded. Case-insensitive; surrounding whitespace is trimmed.

Example: jane.doe@example.com

Query parameters

truncateResponseboolean

false returns the full breach model instead of only the name

Example: falseDefault: true
Domainstring

Only return breaches against this domain

Example: example.org
IncludeUnverifiedboolean

false leaves out unverified breaches

Example: trueDefault: true
Response fields · 5Show

Namestring

Stable identifier of the breach (the only field when the response is truncated)

Titlestring

Display name (full model only)

Domainstring

Primary website of the breached service

BreachDatestring

Approximate date of the breach

DataClasses[]string

Kinds of data exposed

curl 'https://haveibeenpwned.com/api/v3/breachedAccount/jane.doe%40example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  {
    "Name": "ExampleForum"
  },
  {
    "Name": "SampleShop"
  }
]
  • Takes: Email
  • Passive: the target is not contacted
  • Plan: Core, Pro or High RPM

Returns pastes containing the address, newest first. Combine Source and Id to work out the paste's URL. 404 (empty body) when there are none, including for opted-out accounts.

Path parameters

emailstringrequiredtakes your email

The email address, URL-encoded

Example: jane.doe@example.com
Response fields · 5Show

Sourcestring

Paste site: Pastebin, Pastie, Slexy, Ghostbin, QuickLeak, JustPaste, AdHocUrl, PermanentOptOut or OptOut

Idstring

Paste ID at the source

Titlestring

Paste title, or null

Datestring

When the paste was posted, or null

EmailCountinteger

Number of addresses found in the paste

curl 'https://haveibeenpwned.com/api/v3/pasteAccount/jane.doe%40example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  {
    "Source": "Pastebin",
    "Id": "aB3dE5fG",
    "Title": "sample dump",
    "Date": "2024-03-02T10:15:00Z",
    "EmailCount": 120
  }
]
  • Takes: Email
  • Passive: the target is not contacted
  • Plan: Pro or High RPM

Hash the trimmed, lowercased address with SHA-1, send the first 6 hex characters and look for your hash suffix in the results; if it is absent, the address is in no public breach. Results that are not your address must be discarded at once, not stored or processed. Sensitive and retired breaches are never returned.

Path parameters

hashPrefixstringrequired

First 6 characters of the SHA-1 hash of the lowercased address

Example: A1B2C3
Response fields · 2Show

hashSuffixstring

The rest of a matching hash

websites[]string

Names of the breaches that hash appears in

curl 'https://haveibeenpwned.com/api/v3/breachedAccount/range/A1B2C3' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  {
    "hashSuffix": "D4E5F60718293A4B5C6D7E8F90A1B2C3D4",
    "websites": [
      "ExampleForum",
      "SampleShop"
    ]
  }
]

Stealer logs

  • Takes: Email
  • Passive: the target is not contacted
  • Plan: Pro or higher

Returns website domains, sorted alphabetically. The address must be on a domain verified on your dashboard. Passwords are never returned. 404 when there are no entries. Has a separate, lower rate limit.

Path parameters

emailstringrequiredtakes your email

Full email address on a verified domain

Example: jane.doe@example.com
Response fields · 1Show

[]string

Website domain where the credentials were captured

curl 'https://haveibeenpwned.com/api/v3/stealerLogsByEmail/jane.doe%40example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  "login.example.net",
  "shop.example.org"
]
  • Takes: Domain
  • Passive: the target is not contacted
  • Plan: Pro or higher

Returns email addresses, sorted alphabetically. The website domain must be verified on your dashboard (403 otherwise).

Path parameters

domainstringrequiredtakes your domain

Website domain as it appears in stealer logs, verified on your dashboard

Example: example.com
Response fields · 1Show

[]string

Email address captured on that website

curl 'https://haveibeenpwned.com/api/v3/stealerLogsByWebsiteDomain/example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  "alex@example.org",
  "sam@example.net"
]
  • Takes: Domain
  • Passive: the target is not contacted
  • Plan: Pro or higher

Returns an object keyed by the part of the address before the @, each with a sorted list of website domains. The email domain must be verified on your dashboard (403 otherwise).

Path parameters

domainstringrequiredtakes your domain

Email domain (such as a company domain), verified on your dashboard

Example: example.com
Response fields · 1Show

{alias}[]string

Website domains where that alias's credentials were captured

curl 'https://haveibeenpwned.com/api/v3/stealerLogsByEmailDomain/example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "jane.doe": [
    "login.example.net"
  ],
  "ops": [
    "portal.example.org",
    "shop.example.org"
  ]
}
  • Takes: Domain
  • Passive: the target is not contacted
  • Plan: Core or Pro

Returns an object keyed by alias (the part before the @), each with the names of the breaches it appears in. Includes sensitive breaches. The domain must be verified on your account; 403 if it is not, or if it is over your subscription's size limit. The docs advise querying only when a new breach appears (poll /latestBreach for that).

Path parameters

domainstringrequiredtakes your domain

A domain verified on your account

Example: example.com
Response fields · 1Show

{alias}[]string

Names of the breaches that alias appears in

curl 'https://haveibeenpwned.com/api/v3/breachedDomain/example.com' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "jane.doe": [
    "ExampleForum"
  ],
  "sales": [
    "ExampleForum",
    "SampleShop"
  ]
}
  • Passive: the target is not contacted
  • Plan: Core or Pro

Returns each verified domain with how many breached addresses it had at the last search and when the subscription renews.

Response fields · 5Show

DomainNamestring

The verified domain

PwnCountinteger

Breached addresses at the last search, or null

PwnCountExcludingSpamListsinteger

The same, leaving out spam lists, or null

PwnCountExcludingSpamListsAtLastSubscriptionRenewalinteger

Count locked at the last renewal, used for search limits, or null

NextSubscriptionRenewalstring

ISO 8601 date and time of the next renewal, or null

curl 'https://haveibeenpwned.com/api/v3/subscribedDomains' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  {
    "DomainName": "example.com",
    "PwnCount": 42,
    "PwnCountExcludingSpamLists": 30,
    "PwnCountExcludingSpamListsAtLastSubscriptionRenewal": 28,
    "NextSubscriptionRenewal": "2027-01-15T00:00:00Z"
  }
]

Breach catalogue

  • Takes: Domain
  • Passive: the target is not contacted
  • Plan: No key needed

Returns full breach models sorted by Title. Unauthenticated.

Query parameters

Domainstringtakes your domain

Only breaches against this domain

Example: example.org
IsSpamListboolean

Filter on whether the breach is a spam list

Example: false
IncludeUnverifiedboolean

false leaves out unverified breaches

Example: trueDefault: true
Response fields · 8Show

Namestring

Stable identifier

Titlestring

Display name (can change)

Domainstring

Primary website

BreachDatestring

Approximate breach date

AddedDatestring

When HIBP loaded it

PwnCountinteger

Accounts loaded

DataClasses[]string

Kinds of data exposed

IsVerifiedboolean

false for unverified breaches

curl 'https://haveibeenpwned.com/api/v3/breaches' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  {
    "Name": "ExampleForum",
    "Title": "Example Forum",
    "Domain": "example.org",
    "BreachDate": "2023-05-01",
    "AddedDate": "2023-08-10T12:00:00Z",
    "ModifiedDate": "2023-08-10T12:00:00Z",
    "PwnCount": 250000,
    "Description": "In May 2023, the forum at example.org suffered a breach.",
    "DataClasses": [
      "Email addresses",
      "Passwords",
      "Usernames"
    ],
    "IsVerified": true,
    "IsFabricated": false,
    "IsSensitive": false,
    "IsRetired": false,
    "IsSpamList": false,
    "IsMalware": false,
    "IsSubscriptionFree": false,
    "IsStealerLog": false,
    "LogoPath": "https://example.org/logo.png",
    "Attribution": null,
    "DisclosureUrl": null
  }
]
  • Passive: the target is not contacted
  • Plan: No key needed

Returns a single breach model. Use the stable Name, not the Title, which can change.

Path parameters

namestringrequired

The breach's Name

Example: ExampleForum
Response fields · 17Show

Namestring

Stable identifier

Titlestring

Display name

Domainstring

Primary website

BreachDatestring

Approximate breach date (often inaccurate)

AddedDatestring

When HIBP loaded it

ModifiedDatestring

Last change to the record

PwnCountinteger

Accounts loaded

Descriptionstring

HTML description of the incident

DataClasses[]string

Kinds of data exposed

IsVerifiedboolean

false for unverified breaches

IsFabricatedboolean

Likely manufactured data

IsSensitiveboolean

Left out of public email searches

IsSpamListboolean

Not from a security compromise

IsMalwareboolean

Sourced from a malware campaign

IsStealerLogboolean

Its domains are in the stealer-log endpoints

Attributionstring

Credit requested by the data provider, or null

DisclosureUrlstring

Link to a disclosure, or null

curl 'https://haveibeenpwned.com/api/v3/breach/ExampleForum' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "Name": "ExampleForum",
  "Title": "Example Forum",
  "Domain": "example.org",
  "BreachDate": "2023-05-01",
  "AddedDate": "2023-08-10T12:00:00Z",
  "ModifiedDate": "2023-08-10T12:00:00Z",
  "PwnCount": 250000,
  "Description": "In May 2023, the forum at example.org suffered a breach.",
  "DataClasses": [
    "Email addresses",
    "Passwords",
    "Usernames"
  ],
  "IsVerified": true,
  "IsFabricated": false,
  "IsSensitive": false,
  "IsRetired": false,
  "IsSpamList": false,
  "IsMalware": false,
  "IsSubscriptionFree": false,
  "IsStealerLog": false,
  "LogoPath": "https://example.org/logo.png",
  "Attribution": null,
  "DisclosureUrl": null
}
  • Passive: the target is not contacted
  • Plan: No key needed

Returns the breach with the newest AddedDate (when HIBP loaded it, not when it happened). The docs recommend polling this, rather than domain search, to notice new breaches.

Response fields · 3Show

Namestring

Stable identifier

AddedDatestring

When HIBP loaded it

PwnCountinteger

Accounts loaded

curl 'https://haveibeenpwned.com/api/v3/latestBreach' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "Name": "SampleShop",
  "Title": "Sample Shop",
  "Domain": "example.net",
  "BreachDate": "2026-09-12",
  "AddedDate": "2026-11-20T08:30:00Z",
  "ModifiedDate": "2026-11-20T08:30:00Z",
  "PwnCount": 81234,
  "Description": "In September 2026, the online store at example.net suffered a breach.",
  "DataClasses": [
    "Email addresses",
    "Names",
    "Phone numbers"
  ],
  "IsVerified": true,
  "IsFabricated": false,
  "IsSensitive": false,
  "IsRetired": false,
  "IsSpamList": false,
  "IsMalware": false,
  "IsSubscriptionFree": false,
  "IsStealerLog": false,
  "LogoPath": "https://example.net/logo.png",
  "Attribution": null,
  "DisclosureUrl": null
}
  • Passive: the target is not contacted
  • Plan: No key needed

Returns an alphabetically sorted array of names. The list grows over time. /dataClasses/descriptions returns the same names with a description each.

Response fields · 1Show

[]string

Data class name

curl 'https://haveibeenpwned.com/api/v3/dataClasses' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
[
  "Email addresses",
  "Passwords",
  "Phone numbers"
]

Account

  • Passive: the target is not contacted
  • Plan: Core, Pro or High RPM

Returns the plan behind your key and what it includes.

Response fields · 8Show

SubscriptionNamestring

Plan name

Descriptionstring

Plan description

SubscribedUntilstring

When the subscription ends

Rpminteger

Requests per minute allowed on breached-account searches

DomainSearchMaxBreachedAccountsinteger

Largest domain (breached addresses, excluding spam lists) you can search

MaxBreachedDomainsinteger

Maximum domains, or null for no limit

IncludesStealerLogsboolean

Stealer-log endpoints included

IncludesKAnonboolean

k-anonymity search included

curl 'https://haveibeenpwned.com/api/v3/subscription/status' \
  -H 'hibp-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "SubscriptionName": "Pro 2",
  "Description": "Example plan description",
  "SubscribedUntil": "2027-06-01T00:00:00",
  "Rpm": 2000,
  "DomainSearchMaxBreachedAccounts": 10000,
  "MaxBreachedDomains": 100,
  "IncludesStealerLogs": true,
  "IncludesBulkDomainAdd": true,
  "IncludesAutoSubdomainVerification": true,
  "IncludesCustomerDomains": true,
  "IncludesKAnon": true
}