Export leaked credentials
curl --request POST \
--url https://api.projectdiscovery.io/v1/leaks/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "all",
"domain": "<string>",
"email": "<string>",
"search": "<string>",
"limit": 123,
"page_number": 123,
"start_date": "2023-12-25",
"time_range": "all_time",
"end_date": "2023-12-25",
"url": "<string>",
"country": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"hardware_id": "<string>"
}
'import requests
url = "https://api.projectdiscovery.io/v1/leaks/export"
payload = {
"type": "all",
"domain": "<string>",
"email": "<string>",
"search": "<string>",
"limit": 123,
"page_number": 123,
"start_date": "2023-12-25",
"time_range": "all_time",
"end_date": "2023-12-25",
"url": "<string>",
"country": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"hardware_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'all',
domain: '<string>',
email: '<string>',
search: '<string>',
limit: 123,
page_number: 123,
start_date: '2023-12-25',
time_range: 'all_time',
end_date: '2023-12-25',
url: '<string>',
country: '<string>',
device_ip: '<string>',
hostname: '<string>',
hardware_id: '<string>'
})
};
fetch('https://api.projectdiscovery.io/v1/leaks/export', 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/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'all',
'domain' => '<string>',
'email' => '<string>',
'search' => '<string>',
'limit' => 123,
'page_number' => 123,
'start_date' => '2023-12-25',
'time_range' => 'all_time',
'end_date' => '2023-12-25',
'url' => '<string>',
'country' => '<string>',
'device_ip' => '<string>',
'hostname' => '<string>',
'hardware_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/leaks/export"
payload := strings.NewReader("{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.projectdiscovery.io/v1/leaks/export")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/leaks/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"url": "<string>",
"username": "<string>",
"password": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"os": "<string>",
"malware_path": "<string>",
"country": "<string>",
"log_date": "<string>",
"hardware_id": "<string>",
"domain": "<string>",
"email_domain": "<string>",
"url_domain": "<string>",
"fetched_at": "<string>",
"status": "<string>",
"user_type": "<string>"
}
],
"total_leaks": 123,
"total_pages": 123,
"total_count": 123,
"summary": {
"total_leaks": 123,
"personal_leaks": 123,
"employee_leaks": 123,
"customer_leaks": 123,
"external_vendor_leaks": 123,
"organization_leaks": 123
},
"group_summary": [
{}
]
}{
"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
Export leaked credentials
Export leaked credentials with filtering by type, domain, email, date range, and more. Passwords are unmasked after domain verification. See Domain Verification for setup instructions.
POST
/
v1
/
leaks
/
export
Export leaked credentials
curl --request POST \
--url https://api.projectdiscovery.io/v1/leaks/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "all",
"domain": "<string>",
"email": "<string>",
"search": "<string>",
"limit": 123,
"page_number": 123,
"start_date": "2023-12-25",
"time_range": "all_time",
"end_date": "2023-12-25",
"url": "<string>",
"country": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"hardware_id": "<string>"
}
'import requests
url = "https://api.projectdiscovery.io/v1/leaks/export"
payload = {
"type": "all",
"domain": "<string>",
"email": "<string>",
"search": "<string>",
"limit": 123,
"page_number": 123,
"start_date": "2023-12-25",
"time_range": "all_time",
"end_date": "2023-12-25",
"url": "<string>",
"country": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"hardware_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'all',
domain: '<string>',
email: '<string>',
search: '<string>',
limit: 123,
page_number: 123,
start_date: '2023-12-25',
time_range: 'all_time',
end_date: '2023-12-25',
url: '<string>',
country: '<string>',
device_ip: '<string>',
hostname: '<string>',
hardware_id: '<string>'
})
};
fetch('https://api.projectdiscovery.io/v1/leaks/export', 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/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'all',
'domain' => '<string>',
'email' => '<string>',
'search' => '<string>',
'limit' => 123,
'page_number' => 123,
'start_date' => '2023-12-25',
'time_range' => 'all_time',
'end_date' => '2023-12-25',
'url' => '<string>',
'country' => '<string>',
'device_ip' => '<string>',
'hostname' => '<string>',
'hardware_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/leaks/export"
payload := strings.NewReader("{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.projectdiscovery.io/v1/leaks/export")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/leaks/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"all\",\n \"domain\": \"<string>\",\n \"email\": \"<string>\",\n \"search\": \"<string>\",\n \"limit\": 123,\n \"page_number\": 123,\n \"start_date\": \"2023-12-25\",\n \"time_range\": \"all_time\",\n \"end_date\": \"2023-12-25\",\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"device_ip\": \"<string>\",\n \"hostname\": \"<string>\",\n \"hardware_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"url": "<string>",
"username": "<string>",
"password": "<string>",
"device_ip": "<string>",
"hostname": "<string>",
"os": "<string>",
"malware_path": "<string>",
"country": "<string>",
"log_date": "<string>",
"hardware_id": "<string>",
"domain": "<string>",
"email_domain": "<string>",
"url_domain": "<string>",
"fetched_at": "<string>",
"status": "<string>",
"user_type": "<string>"
}
],
"total_leaks": 123,
"total_pages": 123,
"total_count": 123,
"summary": {
"total_leaks": 123,
"personal_leaks": 123,
"employee_leaks": 123,
"customer_leaks": 123,
"external_vendor_leaks": 123,
"organization_leaks": 123
},
"group_summary": [
{}
]
}{
"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
Export leaked credentials data with filtering by type, domain, email, date range, and more. Supports both JSON and CSV formats for easy integration with external tools and reporting systems.Password Unmasking: Passwords are displayed unmasked after domain verification. Without verification, passwords appear as
***MASKED***.Export Formats
JSON Format
Returns structured data identical to the GET/v1/leaks endpoint response.
CSV Format
Returns comma-separated values with headers, perfect for spreadsheet applications and data analysis tools.Request Body
The export endpoint accepts the same filtering parameters as the GET/v1/leaks endpoint in the request body:
{
"type": "all",
"domain": "example.com",
"email": "user@example.com",
"search": "facebook",
"limit": 1000,
"page_number": 1,
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"time_range": "last_6_months",
"sort_by": "log_date",
"sort_order": "desc",
"status": "open",
"group_by": "url"
}
Response Examples
JSON Export Response
{
"data": [
{
"id": "leak_id_hash",
"url": "https://example.com",
"username": "user@example.com",
"password": "masked_password",
"device_ip": "192.168.1.1",
"hostname": "DESKTOP-ABC123",
"os": "Windows 10",
"country": "United States",
"log_date": "2023-01-15",
"hardware_id": "hw_12345",
"domain": "example.com",
"email_domain": "example.com",
"url_domain": "example.com",
"status": "open",
"user_type": "employee"
}
],
"total_leaks": 150,
"summary": {
"total_leaks": 150,
"personal_leaks": 25,
"employee_leaks": 100,
"customer_leaks": 25
}
}
CSV Export Response
id,url,username,password,device_ip,hostname,os,country,log_date,hardware_id,domain,email_domain,url_domain,status,user_type
leak_id_hash,https://example.com,user@example.com,masked_password,192.168.1.1,DESKTOP-ABC123,Windows 10,United States,2023-01-15,hw_12345,example.com,example.com,example.com,open,employee
Usage Examples
Export all leaks as JSON
curl -X POST "https://api.projectdiscovery.io/v1/leaks/export?format=json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "all"
}'
Export employee leaks as CSV
curl -X POST "https://api.projectdiscovery.io/v1/leaks/export?format=csv" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "employee",
"domain": "mycompany.com"
}'
Export with date filtering
curl -X POST "https://api.projectdiscovery.io/v1/leaks/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"time_range": "last_3_months",
"status": "open",
"sort_by": "log_date",
"sort_order": "desc"
}'
Best Practices
Large Datasets
- Use pagination (
limitandpage_number) for large exports - Consider filtering by date ranges to reduce response size
- CSV format is more efficient for large datasets
Security Considerations
- Exported data may contain sensitive information including unmasked passwords
- Ensure secure handling and storage of exported files
- Passwords are unmasked after domain verification
Performance Tips
- Use specific filters to reduce export size
- CSV exports are generally faster for large datasets
- Consider using
group_byfor summary reports instead of full exports
Headers
Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team
Query Parameters
Body
application/json
Was this page helpful?