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

# Latency analytics

Hourly latency percentiles (P50, P95, P99) for a monitor.

# Latency analytics

GET `/analytics/latency`

Hourly latency percentiles (P50, P95, P99) for a monitor.

**Auth:** Bearer token (`read` scope)

## Query parameters

Monitor ID.

Filter by region.

Start date (ISO 8601).

End date (ISO 8601).

## Request

```bash
curl -H "Authorization: Bearer hu_..." \
  "https://happyuptime.com/api/v1/analytics/latency?monitor_id=mon_abc123&region=us-east"
```

## Response

```json
{
  "data": [
    {
      "hour": "2026-03-07T10:00:00Z",
      "region": "us-east",
      "avg_ms": 142,
      "p50_ms": 135,
      "p95_ms": 245,
      "p99_ms": 389,
      "check_count": 60
    },
    {
      "hour": "2026-03-07T11:00:00Z",
      "region": "us-east",
      "avg_ms": 148,
      "p50_ms": 140,
      "p95_ms": 258,
      "p99_ms": 412,
      "check_count": 60
    }
  ]
}
```

Percentiles are computed from raw check results and then rolled up hourly. For longer lookbacks, prefer shorter regions/period combinations — the endpoint returns one row per hour per region.