# Export Leads

> Start a CSV export of your leads as a background job.

Requires an API key with the `read` scope.

Builds a CSV of up to 100,000 leads, newest first, in the background. The call returns a `202` with a `lead_export` job. When the job is `completed`, its `result` carries `rows`, `downloadUrl` and `expiresInSeconds`. Fetch the file with [Download Lead Export](/api-reference/leads/download-export) using the same API key. The file is kept for one hour.

Custom fields become extra columns. Spreadsheet formulas in values are neutralised.

## Body Parameters

<ParamField body="search" type="string">Match email, first name, last name or company.</ParamField>
<ParamField body="tags" type="string">Comma separated tag names; a lead must carry all of them.</ParamField>

## Response

<ResponseField name="data" type="object">
  The job (type `lead_export`, status `pending`). Once completed, `result` is `{ "rows": 4210, "downloadUrl": "/api/v1/leads/export/{job_id}/download", "expiresInSeconds": 3600 }`.
</ResponseField>

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/leads/export" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"tags": "q4"}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
job = client.leads.export(tags="q4")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const job = await client.leads.export({ tags: "q4" });
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "id": "cmjob904",
    "type": "lead_export",
    "status": "pending",
    "progress": 0,
    "totalItems": 0,
    "completedItems": 0,
    "result": null,
    "error": null,
    "startedAt": null,
    "completedAt": null,
    "createdAt": "2026-11-04T09:00:00"
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |

## Rate Limit

- **100 requests per minute, shared by every `bulk` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`bulk`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
