# Readiness

> Outside `/v1` and unauthenticated. Checks Postgres, Redis (when configured) and each configured data-plane worker (`fetch`, `extract`, `render`) with a 2-second budget, and reports whether the process is draining.

Source: https://docs.spicrawl.com/api-reference/health/health-ready

## GET /readyz

Operation ID: `healthReady`.

Outside `/v1` and unauthenticated. Checks Postgres, Redis (when configured) and each configured
data-plane worker (`fetch`, `extract`, `render`) with a 2-second budget, and reports whether the
process is draining. Returns 503 with the same body shape (not a Problem) when any check fails. Stop
routing to this instance on 503; do not restart it.

### Example

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

### Responses

#### 200

Ready for traffic.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `status` | string: `ready`, `not_ready` | yes | `ready` with HTTP 200; `not_ready` with HTTP 503. |
| `checks` | object | yes | Per-dependency result. Keys: `postgres`, `redis` (when configured), `fetch`, `extract`, `render` (configured workers), and `accepting` (present only as `draining` during shutdown). |

Example `ready`

```json
{
  "status": "ready",
  "checks": {
    "postgres": "ok",
    "redis": "ok",
    "fetch": "ok",
    "extract": "ok",
    "render": "ok"
  }
}
```

#### 503

Not ready. `checks` names what failed. This body is plain JSON, not a Problem.

`application/json` (`HealthReady` schema).

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