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

# List Batches

> List your batches, newest first, with filters and their total cost.

Returns your batches, newest first. Each item has the same fields as [Get a Batch](https://docs.zerodrift.com/api-reference/batches/get-batch.md), without `results_url` and `files`. Read-only API keys are allowed.

## Query Parameters

**limit** `integer` (default: 20)

Page size, 1–100.

**cursor** `string`

The `next_cursor` from the previous page.

**status** `string`

Only batches in these statuses: `validating`, `in_progress`, `canceling`, `finalizing`, `ended`, `failed`. Repeat the parameter or separate values with commas.

**q** `string`

Batches whose `metadata.name` or `batch_id` contains this text, ignoring case.

## Response

**data** `array`

One page of batches.

**next\_cursor** `string | null`

Pass as `cursor` for the next page. `null` when there are no more.

**total\_cost** `object | null`

The billed cost of every batch that matches the filters, across all pages. Only on the first page; `null` on pages fetched with a `cursor`.

```bash cURL theme={null}
curl "https://api.zerodrift.ai/api/v3/batches?status=ended&limit=20" \
  -H "x-api-key: YOUR_API_KEY"
```

```json 200 OK (example) theme={null}
{
  "api_version": "v3",
  "data": [
    {
      "batch_id": "batch_3f2b8c1e9d0a4b7f8e6d5c4b3a291807",
      "status": "ended",
      "total_items": 1000,
      "request_counts": { "processing": 0, "succeeded": 998, "errored": 2, "canceled": 0, "expired": 0 },
      "verdict_counts": { "approved": 941, "needs_changes": 44, "do_not_send": 13, "flagged": 57 },
      "cost": { "currency": "USD", "estimate": { "units": 1000, "amount": "10.00" }, "actual": { "units": 998, "amount": "9.98" } },
      "metadata": { "name": "Q4 outbound review" },
      "created_at": "2026-10-05T12:01:00Z",
      "ended_at": "2026-10-05T12:40:00Z"
    }
  ],
  "next_cursor": null,
  "total_cost": { "currency": "USD", "amount": "9.98" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.