Your GET endpoint for email stats
curl --request GET \
--url https://api.projectdiscovery.io/v1/leaks/stats/email \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.projectdiscovery.io/v1/leaks/stats/email"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.projectdiscovery.io/v1/leaks/stats/email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectdiscovery.io/v1/leaks/stats/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/leaks/stats/email"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.projectdiscovery.io/v1/leaks/stats/email")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/leaks/stats/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"leak_devices_count": [
{
"devices": 123
}
],
"leak_customers_count": [
{
"customers": 123
}
],
"leak_user_count": [
{
"user": 123
}
],
"leak_employees_count": [
{
"employees": 123
}
],
"combolist_exposure": [
{
"combolist_exposure": 123
}
],
"leak_country_stats": [
{
"Country": "<string>",
"CredentialsCount": 123
}
],
"top_used_urls_by_customers": [
{
"count": 123,
"url": "<string>"
}
],
"top_used_urls_by_employees": [
{
"count": 123,
"url": "<string>"
}
],
"top_used_urls_by_user": [
{
"count": 123,
"url": "<string>"
}
],
"leak_customers_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"leak_user_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"leak_employees_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"customers_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
],
"employees_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
],
"user_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}Leaks
Your GET endpoint for email stats
get leaks stats for an email
GET
/
v1
/
leaks
/
stats
/
email
Your GET endpoint for email stats
curl --request GET \
--url https://api.projectdiscovery.io/v1/leaks/stats/email \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.projectdiscovery.io/v1/leaks/stats/email"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.projectdiscovery.io/v1/leaks/stats/email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectdiscovery.io/v1/leaks/stats/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/leaks/stats/email"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.projectdiscovery.io/v1/leaks/stats/email")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/leaks/stats/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"leak_devices_count": [
{
"devices": 123
}
],
"leak_customers_count": [
{
"customers": 123
}
],
"leak_user_count": [
{
"user": 123
}
],
"leak_employees_count": [
{
"employees": 123
}
],
"combolist_exposure": [
{
"combolist_exposure": 123
}
],
"leak_country_stats": [
{
"Country": "<string>",
"CredentialsCount": 123
}
],
"top_used_urls_by_customers": [
{
"count": 123,
"url": "<string>"
}
],
"top_used_urls_by_employees": [
{
"count": 123,
"url": "<string>"
}
],
"top_used_urls_by_user": [
{
"count": 123,
"url": "<string>"
}
],
"leak_customers_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"leak_user_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"leak_employees_timeline": [
{
"CredentialsCount": 123,
"Month": 123,
"Year": 123
}
],
"customers_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
],
"employees_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
],
"user_sample_data": [
{
"password": "<string>",
"username": "<string>",
"url": "<string>",
"country": "<string>",
"log_date": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}Overview
Get statistical information about leaks associated with a specific email address. This endpoint provides aggregate data for personal leak monitoring and analysis.This endpoint is primarily used for personal email leak statistics. For organizational monitoring, consider using the domain stats endpoint instead.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | Required. The email address to get leak statistics for |
unmask_email | boolean | Whether to unmask email addresses in the response |
Response Structure
The response provides comprehensive statistics about leaks for the specified email:{
"email": "user@example.com",
"total_leaks": 25,
"open_leaks": 18,
"fixed_leaks": 7,
"leak_classification": {
"personal_leaks": 15,
"employee_leaks": 8,
"customer_leaks": 2
},
"recent_activity": {
"last_30_days": 3,
"last_7_days": 1
},
"compromised_services": [
{
"service": "facebook.com",
"count": 8,
"last_seen": "2023-03-15T10:30:00Z"
},
{
"service": "linkedin.com",
"count": 5,
"last_seen": "2023-02-28T14:20:00Z"
}
],
"risk_timeline": [
{
"date": "2023-03",
"new_leaks": 3,
"fixed_leaks": 1
},
{
"date": "2023-02",
"new_leaks": 5,
"fixed_leaks": 2
}
]
}
Data Fields Explained
| Field | Description |
|---|---|
email | The email address these statistics apply to |
total_leaks | Total number of leaks found for this email |
open_leaks | Number of leaks that haven’t been marked as fixed |
fixed_leaks | Number of leaks marked as remediated |
leak_classification | Breakdown by leak type (personal, employee, customer) |
recent_activity | New leak discovery in recent time periods |
compromised_services | Services where this email was found in leaks |
risk_timeline | Historical trend of leak discovery and remediation |
Usage Examples
Get basic email stats
curl -X GET "https://api.projectdiscovery.io/v1/leaks/stats/email?email=user@example.com" \
-H "Authorization: Bearer YOUR_API_KEY"
Get stats with unmasked emails
curl -X GET "https://api.projectdiscovery.io/v1/leaks/stats/email?email=user@example.com&unmask_email=true" \
-H "Authorization: Bearer YOUR_API_KEY"
Privacy Considerations
Access Control
- You can only access stats for emails you’re authorized to view
- Personal emails: accessible to the account owner
- Employee emails: requires domain verification
Data Sensitivity
- Email statistics may reveal sensitive information about user behavior
- Consider data retention policies for stored statistics
- Implement appropriate access controls in your applications
Best Practices
Regular Monitoring
- Check email stats periodically for accounts under your management
- Set up alerts for new leak discoveries
- Track remediation progress to ensure security improvements
Integration Tips
- Use this endpoint for summary dashboards and reports
- Combine with detailed leak endpoints for comprehensive security monitoring
- Cache results appropriately to minimize API usage
Security Recommendations
- Encourage users to fix open leaks promptly
- Provide guidance on changing passwords for compromised services
- Monitor trends to identify systemic security issues
Authorizations
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?