Features
- Lookup email addresses, usernames, and other identifiers against leaked databases.
- Supports both the Pro API v2 (authenticated via API key) and the Public API.
- HTTP/SOCKS proxy support.
- Customizable request limits and offsets for paginated queries.
Installation
Pro API v2 — LeakCheckAPI_v2
To use the Pro API, you need an API key from LeakCheck. You can pass the key
directly or set it via an environment variable.
Environment variables
| Variable | Purpose |
|---|---|
LEAKCHECK_APIKEY | Your API key for authentication (must be at least 40 characters long). |
LEAKCHECK_PROXY | Optional, to route your requests through a proxy. |
Parameters for lookup()
The identifier to look up (email, username, etc.).
The type of query (e.g.
email, username). Auto-detected if not
provided — see Search types.Limit the number of results (maximum 1000).
Offset for the results (maximum 2500).
Error handling
lookup() raises a ValueError when the API returns an error, which makes
failures easy to catch and debug:
- If the API key is invalid or not provided, an error is raised.
- The method validates the
limitandoffsetparameters. - Network and request exceptions are handled as well.
Public API — LeakCheckAPI_Public
The Public API does not require authentication but offers limited access —
use it for simple email or username source checks:
lookup() takes a single query — an email, an email hash, or a username.
Proxy support
Both wrappers support proxy configurations (HTTP, HTTPS, SOCKS5). Set the proxy withset_proxy() or via the LEAKCHECK_PROXY environment variable: