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

# Health

> Service health check endpoints for monitoring and integration.

# Health

The API exposes several health check endpoints. These are useful if you're building health-aware integrations or want to verify the service is operational.

<Note>
  Health endpoints do **not** require authentication. No `x-api-key` header is needed.
</Note>

## Basic Health Check

<Columns>
  <Column>
    ### `GET /health`

    Returns basic service status.

    ```json theme={null}
    {
      "status": "healthy",
      "service": "LinkedIn Scraper API",
      "version": "1.0.0",
      "environment": "production",
      "timestamp": "2026-08-11T12:00:00.000000+00:00",
      "request_id": "abc-123"
    }
    ```
  </Column>

  <Column>
    ### `GET /health/live`

    Lightweight liveness probe. Returns `200` if the process is running.

    ```json theme={null}
    {
      "status": "alive"
    }
    ```
  </Column>
</Columns>

## Readiness Probe

### `GET /health/ready`

Checks whether the service and its dependencies are ready to handle requests. Returns `200` if ready, `503` if degraded or starting.

```json theme={null}
{
  "status": "ready",
  "checks": {
    "api": true,
    "redis": true,
    "linkedin": true
  },
  "errors": null,
  "timestamp": "2026-08-11T12:00:00.000000+00:00",
  "duration_ms": 42.5,
  "request_id": "abc-123"
}
```

Possible `status` values:

| Status     | HTTP Code | Meaning                       |
| ---------- | --------- | ----------------------------- |
| `ready`    | `200`     | All checks passed             |
| `degraded` | `503`     | One or more checks failed     |
| `starting` | `503`     | Service is still initializing |

## Detailed Health Check

### `GET /health/detailed`

Returns comprehensive health information including system metrics (memory, CPU) and dependency status.

**Query parameter:**

| Parameter     | Type    | Default | Description                                  |
| ------------- | ------- | ------- | -------------------------------------------- |
| `force_check` | boolean | `false` | Force fresh checks instead of cached results |

<Note>
  The detailed endpoint includes service configuration and system resource usage. Use it for debugging, not for frequent polling.
</Note>

## When to use which endpoint

| Endpoint           | Use case                                                    |
| ------------------ | ----------------------------------------------------------- |
| `/health/live`     | Container liveness probe — "is the process alive?"          |
| `/health/ready`    | Load balancer / traffic routing — "can it handle requests?" |
| `/health`          | Simple status check — "is it up?"                           |
| `/health/detailed` | Debugging — "what's the full system state?"                 |
