> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectdiscovery.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get leak statistics for a domain (Public)

> Public endpoint - no authentication required. Returns leak statistics for any domain including employee/customer leak counts, geographic distribution, and top compromised services.

## Overview

Get statistical information about leaks associated with any domain. This is a **public endpoint** that doesn't require authentication, making it ideal for quick breach checks and integrations.

<Info>
  **Public Endpoint**: No authentication required. You can check leak statistics for any domain.
</Info>

## Query Parameters

| Parameter | Type   | Description                                         |
| --------- | ------ | --------------------------------------------------- |
| `domain`  | string | **Required.** The domain to get leak statistics for |

## Response Structure

The response provides comprehensive statistics about leaks for the specified domain:

```json theme={null}
{
  "domain": "example.com",
  "total_leaks": 150,
  "employee_leaks": 100,
  "customer_leaks": 50,
  "recent_activity": {
    "last_30_days": 15,
    "last_7_days": 3
  },
  "top_services": [
    {
      "service": "facebook.com",
      "count": 45
    },
    {
      "service": "linkedin.com", 
      "count": 32
    }
  ],
  "geographic_distribution": [
    {
      "country": "United States",
      "count": 89
    },
    {
      "country": "Canada",
      "count": 23
    }
  ]
}
```

## Usage Examples

### Check domain breach status

```bash theme={null}
curl -X GET "https://api.projectdiscovery.io/v1/leaks/stats/domain?domain=example.com"
```

<Note>
  No API key or authentication header is required for this endpoint.
</Note>

## Use Cases

### Quick Breach Check

Use this endpoint to quickly check if a domain has any known credential leaks without requiring authentication.

### Security Integrations

Integrate with your security tools to monitor domains for new leaks and alert when breach counts increase.

### Due Diligence

Check potential partners or vendors for credential exposure as part of your security assessment process.

## Best Practices

* Cache results appropriately to avoid excessive API calls
* Use this for summary data; detailed leak information requires authenticated endpoints
* Consider rate limiting when building automated monitoring systems


## OpenAPI

````yaml get /v1/leaks/stats/domain
openapi: 3.1.0
info:
  title: PDCP API
  version: '1.0'
  summary: ProjectDiscovery Cloud Platform
  description: >-
    For more details, checkout
    https://docs.projectdiscovery.io/api-reference/editor/scan
servers:
  - url: https://api.projectdiscovery.io
    description: Production
  - url: https://api.dev.projectdiscovery.io
    description: Development
  - url: http://localhost:8085
    description: Localhost
security:
  - X-API-Key: []
paths:
  /v1/leaks/stats/domain:
    get:
      tags:
        - leaks
      summary: Get leak statistics for a domain (Public)
      description: >-
        Public endpoint - no authentication required. Returns leak statistics
        for any domain including employee/customer leak counts, geographic
        distribution, and top compromised services.
      operationId: get-v1-leaks-stats-domain
      parameters:
        - schema:
            type: string
          in: query
          name: domain
        - schema:
            type: boolean
          in: query
          name: unmask_email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  leak_devices_count:
                    type: array
                    items:
                      $ref: '#/components/schemas/DevicesCount'
                  leak_customers_count:
                    type: array
                    items:
                      $ref: '#/components/schemas/CustomersCount'
                  leak_user_count:
                    type: array
                    items:
                      $ref: '#/components/schemas/UsersCount'
                  leak_employees_count:
                    type: array
                    items:
                      $ref: '#/components/schemas/EmployeesCount'
                  combolist_exposure:
                    type: array
                    items:
                      $ref: '#/components/schemas/CombolistExposureCount'
                  leak_country_stats:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeakCountryStats'
                  top_used_urls_by_customers:
                    type: array
                    items:
                      $ref: '#/components/schemas/UsedUrlsCount'
                  top_used_urls_by_employees:
                    type: array
                    items:
                      $ref: '#/components/schemas/UsedUrlsCount'
                  top_used_urls_by_user:
                    type: array
                    items:
                      $ref: '#/components/schemas/UsedUrlsCount'
                  leak_customers_timeline:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksTimeline'
                  leak_user_timeline:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksTimeline'
                  leak_employees_timeline:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksTimeline'
                  customers_sample_data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksUsersSampleData'
                  employees_sample_data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksUsersSampleData'
                  user_sample_data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaksUsersSampleData'
        '400':
          $ref: '#/components/responses/MessageResponse'
        '401':
          $ref: '#/components/responses/MessageResponse'
        '403':
          $ref: '#/components/responses/MessageResponse'
        '404':
          $ref: '#/components/responses/MessageResponse'
        '500':
          $ref: '#/components/responses/MessageResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    DevicesCount:
      title: DevicesCount
      type: object
      properties:
        devices:
          type: number
    CustomersCount:
      title: CustomersCount
      type: object
      properties:
        customers:
          type: number
    UsersCount:
      title: UsersCount
      type: object
      properties:
        user:
          type: number
    EmployeesCount:
      title: EmployeesCount
      type: object
      properties:
        employees:
          type: number
    CombolistExposureCount:
      title: CombolistExposureCount
      type: object
      properties:
        combolist_exposure:
          type: number
    LeakCountryStats:
      title: LeakCountryStats
      type: object
      properties:
        Country:
          type: string
        CredentialsCount:
          type: number
    UsedUrlsCount:
      title: UsedUrlsCount
      type: object
      properties:
        count:
          type: number
        url:
          type: string
    LeaksTimeline:
      title: LeaksTimeline
      type: object
      properties:
        CredentialsCount:
          type: number
        Month:
          type: number
        Year:
          type: number
    LeaksUsersSampleData:
      title: LeaksUsersSampleData
      type: object
      properties:
        password:
          type: string
        username:
          type: string
        url:
          type: string
        country:
          type: string
        log_date:
          type: string
  responses:
    MessageResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            required:
              - message
    ErrorResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
              kind:
                type: string
              code:
                type: string
              error:
                type: string
              error_id:
                type: string
              param:
                type: string
              status:
                type: integer
  securitySchemes:
    X-API-Key:
      name: X-API-Key
      type: apiKey
      in: header

````