# List batch jobs

> Lists this API key's project's jobs, newest first (`submitted_at` desc, then id desc).

Source: https://docs.spicrawl.com/api-reference/batch/batch-list

## GET /v1/batch

Operation ID: `batchList`. API key scope: `batch`.

Lists this API key's project's jobs, newest first (`submitted_at` desc, then id desc). Jobs of other
projects in the organization are not visible to this key. Each entry is the full job object with progress.
To page, pass `next_cursor` back as `cursor`; when `next_cursor` is absent there are no more jobs.

### Example

```bash
curl "https://api.spicrawl.com/v1/batch" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer; default `50` | no | Jobs per page. Out-of-range or non-integer values are a 400, not clamped. |
| `status` | query | string: `queued`, `running`, `paused`, `cancelling`, `completed`, `failed`, `cancelled` | no | Return only jobs whose stored status equals this value (case-insensitive). Omit for all statuses. |
| `cursor` | query | string | no | Opaque token from a previous page's `next_cursor`. Pass it back verbatim; do not construct it. Omit to start from the newest job. |

### Responses

#### 200

One page of jobs.

Headers: `X-Request-Id`.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `batches` | array of object (`BatchJob`) | yes | Jobs, newest first. Empty array when there are none. |
| `next_cursor` | string | no | Present only when more jobs exist. Pass it back verbatim as `cursor`. Absent means you have reached the oldest job. |

#### 400

The request is invalid. Not retryable; fix the request using `code` and `diagnostics.hint`.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 403

The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 500

Internal error. Retryable when `retryable` is true.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
