API Documentation
To get API access, contact us at [email protected]
All examples are in JavaScript using the native Fetch API.
Authentication
Include your key header with the HTTP Header x-api-key
.
await fetch("https://databreach.com/api/v1/metadata",{method: "GET",headers: { "x-api-key": "xxx" },});
Scan
Scan private information for data breaches.
Supports up to 20 PII at once for the same user.
Responseconst body = JSON.stringify({})const res = await fetch("https://databreach.com/api/v1/scan",{body,method: "POST",headers: { "x-api-key": "xxx", "Content-Type": "application/json" },});const json = await res.json();console.log(json)
[{breach_id: "twitter.com-2021",breach_summary: "In early 2023, over 200 million records scraped from Twitter were leaked on a hacking forum. The data was obtained in 2021 by exploiting an API to link email addresses to Twitter profiles, resulting in a dataset with public profile information.",// PII found in the breachpii_found: {},// Number of PII found in the breachpii_count: {full_name: 209460331,nick: 209595520,email: 209490000,},// Date the breach was released on the darkwebbreach_date: "2021-01-01",// Date it was uploaded to databreach.comupload_date: "2024-12-01",// User friendly name of the breachbreach_name: "Twitter",// Total number of rows in the breachbreach_rows: 209595569,// haveibeenpwned.com ID// We DO NOT use HIBP's services,// we include this ID for comparison and reconciliation purposeshibp_id: "Twitter200M",// The SVG icon of the impacted companybreach_icon: "https://databreach.com/sites/twitter.com-2021.svg",},...]
Metadata
The metadata endpoint provides information about the Breaches and PII types, that you can use in your frontend.
Responseconst res = await fetch("https://databreach.com/api/v1/metadata",{method: "GET",headers: { "x-api-key": "xxx" },});const json = await res.json();console.log(json)
{labels: {email: {label: "Email", // human-readable name of the field.fa_icon: "envelope", // font-awesome icon library name.sensitive: true // whether the field is sensitive or not.},phone: {label: "Phone Number",fa_icon: "phone",sensitive: true},...},breaches: [{breach_id: "twitter.com-2021",breach_summary: "In early 2023, over 200 million records scraped from Twitter were leaked on a hacking forum. The data was obtained in 2021 by exploiting an API to link email addresses to Twitter profiles, resulting in a dataset with public profile information.",// Number of PII found in the breachpii_count: {full_name: 209460331,nick: 209595520,email: 209490000,},// Date the breach was released on the darkwebbreach_date: "2021-01-01",// Date it was uploaded to databreach.comupload_date: "2024-12-01",// User friendly name of the breachbreach_name: "Twitter",// Total number of rows in the breachbreach_rows: 209595569,// haveibeenpwned.com ID// We DO NOT use HIBP's services,// we include this ID for comparison and reconciliation purposeshibp_id: "Twitter200M",// The SVG icon of the impacted companybreach_icon: "https://databreach.com/sites/twitter.com-2021.svg"},...]}