# Load and vitals

Read the Load audit and the Web vitals report as JSON, with the findings and the agent prompt.

The [Load](/docs/dashboard/load) audit and the [Web vitals](/docs/dashboard/vitals) report are one call each. They answer with the same numbers, findings and agent prompt as the dashboard pages, so a script, a scheduled job or a coding agent can read them. Both come with Insight and Foresight.

`GET https://api.ultanimus.com/v1/sites/{id}/vitals`

`GET https://api.ultanimus.com/v1/sites/{id}/load`

`{id}` is the site ID, such as `ult_fxpitz4w7h`, or the site's domain. Every API key can read them.

## Request

- `range` (string): `7d`, `30d` or `90d`, counted back from now. The default is `30d`.

```bash
curl "https://api.ultanimus.com/v1/sites/YOUR_SITE_ID/vitals?range=7d" \
  -H "Authorization: Bearer $API_KEY"
```

## Web vitals

```json
{
  "status_code": 200,
  "data": {
    "domain": "example.com",
    "range": "7d",
    "from": "2026-10-17T00:00:00Z",
    "to": "2026-10-23T14:05:00Z",
    "samples": 9840,
    "passes": false,
    "metrics": [
      { "metric": "lcp", "p75": 3100, "before": 2600, "rating": "needs_improvement", "samples": 9840, "good": 0.58, "needs_improvement": 0.31, "poor": 0.11 },
      { "metric": "inp", "p75": 240, "before": 230, "rating": "needs_improvement", "samples": 6120, "good": 0.69, "needs_improvement": 0.25, "poor": 0.06 },
      { "metric": "cls", "p75": 0.06, "before": 0.05, "rating": "good", "samples": 9810, "good": 0.83, "needs_improvement": 0.12, "poor": 0.05 }
    ],
    "findings": [
      {
        "kind": "lcp",
        "target": "main>section.hero>img cdn.example.com/hero.jpg",
        "title": "The largest image on / shows after 3.4 s",
        "detail": "It is main>section.hero>img, loading cdn.example.com/hero.jpg. …",
        "fix": "Make the file smaller. Serve AVIF or WebP at the size the screen shows, with srcset, from a CDN.",
        "impact": 2410,
        "samples": 4980
      }
    ],
    "prompt": "Make the pages of example.com feel faster. …"
  },
  "message": "OK"
}
```

- `metrics` holds LCP, INP, CLS, FCP and TTFB, in that order. `p75` is the 75th percentile in milliseconds, or the layout shift score for CLS. It is `null` when no browser measured that metric. `before` is the same number for the range just before.
- `good`, `needs_improvement` and `poor` are shares of the page loads that measured the metric, and `rating` is where `p75` falls, with Google's thresholds.
- `passes` is true when LCP and CLS are good and INP is good or has no data.
- `findings` are ranked by `impact`, the page loads or interactions each one slowed. `kind` is `lcp`, `inp`, `cls` or `ttfb`.
- `prompt` is the brief Copy the fix prompt copies on the dashboard.
- `series`, `pages`, `devices` and `elements` hold the rest of the page: the days, the pages with the most slow page loads, the devices, and the LCP, INP and CLS elements with their phases.

## Load

The answer has the same `domain`, `range`, `from`, `to`, `samples`, `findings` and `prompt`.

- `summary` holds medians of the measured page loads. `weight.p50` and `weight.p75` are compressed bytes, `js` is compressed JavaScript, `requests` is a count and `ttfb.p50` is the server response in milliseconds.
- `findings` are ranked by `impact`, the bytes each fix takes off an average page load. A slow server comes first with an `impact` of 0, and slow or repeated API calls come last.
- `pages`, `files`, `providers`, `endpoints`, `types`, `devices`, `series`, `changes` and `bandwidth` hold the rest of the page.

## When there is nothing to read

With no samples in the range, `samples` is `0`, the lists are empty and `prompt` is an empty string. Samples start when the script tag has `data-vitals` or `data-load`.

| Status | Code | When |
|---|---|---|
| 403 | `ULT-1203` | The organization is on Glance. |
| 422 | `ULT-1900` | The range is not `7d`, `30d` or `90d`. |

Answers are cached for 5 minutes. The calls share the Query API's limit of 240 a minute per key. The [CLI](/docs/cli) prints both reports in a terminal, and the [MCP server](/docs/api/mcp) gives them to an agent as the `get_web_vitals` and `get_load_audit` tools.
