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

# Search types

> Everything you can search by with the Pro API v2, and when a type must be set explicitly.

By default, the type of search is determined automatically. If you prefer —
or when auto-detection is not possible — specify it explicitly with the
`?type=` query parameter.

| Type       | Sample                                                                                         | Notes                                                                                                                     |
| ---------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `auto`     | [example@example.com](mailto:example@example.com), example, 12345678, 31c5543c1734d25c7206f5fd | Only email, username, phone number and hash can be detected automatically. For other data you should set type explicitly. |
| `email`    | [example@example.com](mailto:example@example.com)                                              |                                                                                                                           |
| `domain`   | gmail.com                                                                                      |                                                                                                                           |
| `keyword`  | example                                                                                        |                                                                                                                           |
| `username` | example                                                                                        |                                                                                                                           |
| `phone`    | 12063428631                                                                                    |                                                                                                                           |
| `hash`     | 31c5543c1734d25c7206f5fd                                                                       | SHA256 hash of lower-cased email. You can also truncate it to 24 characters.                                              |
| `phash`    | 31c5543c1734d25c7206f5fd                                                                       | SHA256 hash of password. You can also truncate it to 24 characters. **Enterprise only.**                                  |
| `origin`   | example.com                                                                                    | Search info-stealer logs by the site the credentials belong to. **Enterprise only.**                                      |
| `password` | example                                                                                        | **Enterprise only.**                                                                                                      |

## Pagination

You can also specify `limit` and `offset` query parameters. `limit` can't be
bigger than **1000** and `offset` than **2500**.

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  # Explicit domain search
  curl "https://leakcheck.io/api/v2/query/gmail.com?type=domain&limit=500" \
    -H "Accept: application/json" \
    -H "X-API-Key: $LEAKCHECK_APIKEY"
  ```

  ```python Python (wrapper) theme={null}
  from leakcheck import LeakCheckAPI_v2

  api = LeakCheckAPI_v2(api_key="your_api_key_here")

  # Auto-detect type
  result = api.lookup(query="example@example.com")

  # Lookup by email
  result = api.lookup(query="example@example.com", query_type="email")

  # Lookup by domain
  result = api.lookup(query="gmail.com", query_type="domain")

  # Lookup by phone
  result = api.lookup(query="12063428631", query_type="phone")

  # Lookup by SHA256 hash
  result = api.lookup(query="31c5543c1734d25c7206f5fd", query_type="hash")
  ```

  ```javascript Node.js theme={null}
  const lookup = async (query, type) => {
    const params = new URLSearchParams(type ? { type } : {});
    const response = await fetch(
      `https://leakcheck.io/api/v2/query/${encodeURIComponent(query)}?${params}`,
      { headers: { "X-API-Key": process.env.LEAKCHECK_APIKEY } }
    );
    return response.json();
  };

  await lookup("example@example.com");          // auto-detected
  await lookup("gmail.com", "domain");          // explicit type
  await lookup("12063428631", "phone");
  ```
</CodeGroup>

<Tip>
  Hash searches let you check an email without sending it in plain text:
  compute the SHA-256 of the lower-cased address and query with `type=hash`.
</Tip>
