> For the complete documentation index, see [llms.txt](https://docs.webz.io/llms.txt). Any docs page is also available as markdown at `https://docs.webz.io/markdown/<environment>/<slug>`.

# Search by Email

Look up every compromised record for a single email address. The Data Breaches API offers two ways to do it: the standard search scoped to an address, and a dedicated lookup that covers the full history.

| | `/breaches?email=` | `/breaches/getEmail` |
| --- | --- | --- |
| Best for | Monitoring an address alongside your domain searches | Investigating one address across all history |
| Time range | Last 365 days by default; raw mode does not accept `email` | All history by default |
| Filters | All [Filters](https://docs.webz.io/docs/webz/data-breach-filters) | Date range and sort order |
| Records per page | 100 | 1,000 |
| Domain authorization | Required for the address's domain (added automatically) | Not required |
| Access | Data Breaches permission | Data Breaches permission plus the email-search permission; included on pay as you go |
| Credits (contract plans) | 1 per page | 1 per page |
| Pay as you go | $0.25 per page + $0.50 / $0.85 per record | $0.25 per page + $0.50 / $0.85 per record |

> [!NOTE]
> **Pay as you go:** the address must be a verified asset, or belong to a verified domain - see [Search Scope](https://docs.webz.io/docs/webz/data-breach-scope). Records are partially masked, and `cost` and `balance` replace `requestsLeft` - see [Errors, Rate Limits & Credits](https://docs.webz.io/docs/webz/data-breach-errors-limits). The `/breaches/getEmail` lookup is included; the playground uses it for every pay-as-you-go email search.

## Standard search: `/breaches?email=`

`GET`

```bash
https://api.webz.io/breaches?token=YOUR_TOKEN&email=jane@example.com
```

Returns records whose compromised account email is exactly `jane@example.com` (case-insensitive). Everything else works as in any `/breaches` search: combine with [Filters](https://docs.webz.io/docs/webz/data-breach-filters) such as `data_type` or `has_password`, sort with `sort_by` and `order_by`, and page with `next` - see [Pagination](https://docs.webz.io/docs/webz/data-breach-pagination).

```bash
https://api.webz.io/breaches?token=YOUR_TOKEN&email=jane@example.com&data_type=infostealer&order_by=desc
```

The address's domain (`example.com`) is treated like any searched domain: it must be authorized for your token and is added automatically on first use - see [Search Scope](https://docs.webz.io/docs/webz/data-breach-scope).

> [!NOTE]
> The default window is the last 365 days - see [Time Range](https://docs.webz.io/docs/webz/data-breach-time-range). Raw mode (`raw=true`) does not accept `email`; for older records use `/breaches/getEmail` below.

## Full-history lookup: `/breaches/getEmail`

`GET`

```bash
https://api.webz.io/breaches/getEmail?token=YOUR_TOKEN&email=jane@example.com
```

Returns all records for the address across the entire Data Breaches history, 1,000 per page, with no domain authorization. Use it when you need the complete exposure history of one account - for example during an incident investigation or an executive-protection review.

> [!NOTE]
> On contract plans `/breaches/getEmail` requires the email-search permission in addition to Data Breaches access; without it, requests return `401`. Contact **sales@webz.io** to enable it. Pay-as-you-go accounts receive it when they set up their Assets.

### Parameters

| Parameter | Required | Description |
| --- | --- | --- |
| `token` | Yes | Your API token, or send `Authorization: Bearer YOUR_TOKEN`. |
| `email` | Yes | The address to look up. Case-insensitive. |
| `breach_from`, `breach_to` | No | Breach or infection date range, epoch milliseconds UTC. |
| `crawled_from`, `crawled_to` | No | Collection date range, epoch milliseconds UTC. |
| `sort_by` | No | `breached` or `crawled`. Defaults to the date field you filter on; `breached` when there is no date filter. |
| `order_by` | No | `asc` (default) or `desc`. |
| `full_passwords` | No | `false` masks passwords even if your account may view them. Default `true`. |
| `size` | No | Records per page, `1`-`1000`. Default `1000`. |
| `next` | No | Pagination cursor. Follow the `next` URL from the response instead of building it. |

Use one date range per request - `breach_*` or `crawled_*`, not both. With no date range, the whole history is searched. Any parameter not listed above returns `400`.

```bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.webz.io/breaches/getEmail?email=jane@example.com&breach_from=1577836800000&order_by=desc"
```

### Response and pagination

The same [Response Format](https://docs.webz.io/docs/webz/data-breach-response-format) as `/breaches`, with up to 1,000 records per page:

```json
{
  "records": [ ... ],
  "totalResults": 1230,
  "moreResultsAvailable": 230,
  "next": "/breaches/getEmail?email=jane@example.com&token=YOUR_TOKEN&next=CURSOR",
  "requestsLeft": 954,
  "totalResultsVerified": true
}
```

Append `next` to `https://api.webz.io` and call it as-is; repeat until `next` is `null`. Each page costs one credit. Passwords are masked unless your account has the view-password permission, as everywhere in the API - see [Record Data Fields](https://docs.webz.io/docs/webz/data-breach-data-fields).

> [!WARNING]
> An empty result is not proof that an address is clean. If a very large lookup cannot be completed in time, the response is an empty page rather than an error - narrow the date range and retry.

## Credits and limits

- Contract plans: both endpoints cost **1 credit per page**, including a page with 0 records. `requestsLeft` shows your balance.
- Pay as you go: both endpoints cost **$0.25 per page** plus **$0.50 per data-breach record** and **$0.85 per infostealer record** returned; `cost` and `balance` show the charge and what is left. Use `size` to cap a page.
- The per-token rate limit of about 1 request per second applies to both - see [Errors, Rate Limits & Credits](https://docs.webz.io/docs/webz/data-breach-errors-limits).
- One address per request.

## Ask in plain English

The same lookup works through [Natural Language Search](https://docs.webz.io/docs/webz/data-breach-natural-language-search): a question that names a full address, such as `Show all leaked credentials for jane@example.com`, runs as a `/breaches?email=` search.

## Related documentation

- [Search Scope](https://docs.webz.io/docs/webz/data-breach-scope)
- [Filters](https://docs.webz.io/docs/webz/data-breach-filters)
- [Time Range](https://docs.webz.io/docs/webz/data-breach-time-range)
- [Pagination](https://docs.webz.io/docs/webz/data-breach-pagination)
- [Record Data Fields](https://docs.webz.io/docs/webz/data-breach-data-fields)
- [Errors, Rate Limits & Credits](https://docs.webz.io/docs/webz/data-breach-errors-limits)

