---
title: "Export leaks to CSV/TXT/JSON"
method: POST
path: "/search/advanced/export"
tags: ["Search Advanced"]
---

# Export leaks to CSV/TXT/JSON

`POST /search/advanced/export`

Queue an export of all leaks that match the provided advanced search filters. At least one filter is required.

Request body
- JSON payload following the `LeakSearchFilters` schema.

Query parameters
- `format` optional output format: `csv` (default), `txt`, or `json`.

Limits and plan requirement
- You can have at most 5 exports with status PENDING or IN_PROGRESS per account.
- Requires a paid plan with `advanced_search` enabled.

Response
`ExportResponse` with `status`, `message`, and `export_id`.

## Query parameters

- `format` 'csv' | 'txt' | 'json'

## Request body

- LeakSearchFilters
  - `username` string[], nullable — Username values to match.
  - `username_not` string[], nullable — Username values to exclude.
  - `username_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `username_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `password` string[], nullable — Password values to match.
  - `password_not` string[], nullable — Password values to exclude.
  - `password_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `password_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url` string[], nullable — URL values to match.
  - `url_not` string[], nullable — URL values to exclude.
  - `url_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url_domain` string[], nullable — URL domain values to match.
  - `url_domain_not` string[], nullable — URL domain values to exclude.
  - `url_domain_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url_domain_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url_host` string[], nullable — URL host values to match.
  - `url_host_not` string[], nullable — URL host values to exclude.
  - `url_host_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `url_host_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `username_hash` string[], nullable — Username SHA-1 hash prefix (hex).
  - `password_hash` string[], nullable — Password SHA-1 hash prefix (hex).
  - `url_scheme` string[], nullable — URL scheme(s) to include (multi).
  - `url_scheme_not` string[], nullable — URL scheme(s) to exclude (multi).
  - `url_port` integer[], nullable — URL port(s) to include (multi).
  - `url_port_not` integer[], nullable — URL port(s) to exclude (multi).
  - `url_tld` string[], nullable — URL TLD(s) to include (multi).
  - `url_tld_not` string[], nullable — URL TLD(s) to exclude (multi).
  - `is_email` boolean, nullable — Identifier type filter: true=email only, false=username only, null=both.
  - `email_domain` string[], nullable — Email domain values to match.
  - `email_domain_not` string[], nullable — Email domain values to exclude.
  - `email_domain_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `email_domain_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `email_host` string[], nullable — Email host values to match.
  - `email_host_not` string[], nullable — Email host values to exclude.
  - `email_host_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `email_host_not_match_type` 'contains' | 'starts_with' | 'ends_with'
  - `email_tld` string[], nullable — Email TLD(s) to include (multi).
  - `email_tld_not` string[], nullable — Email TLD(s) to exclude (multi).
  - `password_strength` 'too_weak' | 'weak' | 'medium' | 'strong'
  - `added_from` string, date-time, nullable — Only include leaks indexed on/after this UTC datetime.
  - `added_to` string, date-time, nullable — Only include leaks indexed on/before this UTC datetime.
  - `force_and` boolean, nullable — When true, require all values within each field (AND within field).

## Response `200`

Export queued successfully.

- ExportResponse
  - `status` string, required — Export job status: 'queued', 'processing', 'completed', or 'failed'.
  - `message` string, required — Human-readable status message.
  - `export_id` integer, required — ID of the export job. Use this to check status or download the result.

## Other responses

- `400` — No filters provided, maximum concurrent exports reached.
- `401` — Authentication required, or invalid/expired API key.
- `403` — Advanced search not available on your plan, search blocked, account banned, or pending email verification.
- `409` — An identical export is already queued or running.
- `422` — Validation Error
- `429` — Rate limit exceeded. See Retry-After / X-RateLimit-* headers.
- `503` — Advanced search under maintenance, or public API temporarily disabled.

---

[API](https://skmtc.dev/leakradar/apis/leakradar-io-api.md) · [All operations](https://skmtc.dev/leakradar/apis/leakradar-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/leakradar/leakradar-io-api/revisions/82a99c608e1a/schema)
