---
title: "Get grouped page metrics"
method: GET
path: "/performance/page-metrics"
tags: ["Performance"]
---

# Get grouped page metrics

`GET /performance/page-metrics`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/performance/page-metrics`
- Auth: HTTP bearer

## Query parameters

- `start_date` string, required
- `end_date` string, required
- `project_id` integer, required
- `environment_id` integer
- `deployment_id` integer
- `group_by` string, required
- `device_type` string
- `include_bots` boolean
- `filter_path` string
- `filter_country` string
- `filter_region` string
- `filter_city` string
- `filter_browser` string
- `filter_operating_system` string

## Response `200`

Successfully retrieved grouped page metrics

- GroupedPageMetricsResponse
  - `grouped_by` string, required
  - `groups` GroupedPageMetric[], required
    - `cls` number, float, nullable: Mean Cumulative Layout Shift (score).
    - `cls_p50` number, float, nullable: 50th percentile Cumulative Layout Shift (score). Null when no sample in the group reported it.
    - `cls_p75` number, float, nullable: 75th percentile Cumulative Layout Shift (score) — the Core Web Vitals assessment percentile. Null when no sample in the group reported it.
    - `cls_p90` number, float, nullable: 90th percentile Cumulative Layout Shift (score). Null when no sample in the group reported it.
    - `country_code` string, nullable: ISO 3166-1 alpha-2 code of the group's country. Populated for the geographic dimensions (country/region/city) so clients can match map geometries without name-based lookups; null otherwise.
    - `events` integer, required: Beacons in the group. Each beacon may carry only some metrics, so a metric's own sample count can be lower.
    - `fcp` number, float, nullable: Mean First Contentful Paint (ms).
    - `fcp_p50` number, float, nullable: 50th percentile First Contentful Paint (ms). Null when no sample in the group reported it.
    - `fcp_p75` number, float, nullable: 75th percentile First Contentful Paint (ms) — the Core Web Vitals assessment percentile. Null when no sample in the group reported it.
    - `fcp_p90` number, float, nullable: 90th percentile First Contentful Paint (ms). Null when no sample in the group reported it.
    - `group_key` string, required
    - `inp` number, float, nullable: Mean Interaction to Next Paint (ms).
    - `inp_p50` number, float, nullable: 50th percentile Interaction to Next Paint (ms). Null when no sample in the group reported it.
    - `inp_p75` number, float, nullable: 75th percentile Interaction to Next Paint (ms) — the Core Web Vitals assessment percentile. Null when no sample in the group reported it.
    - `inp_p90` number, float, nullable: 90th percentile Interaction to Next Paint (ms). Null when no sample in the group reported it.
    - `lcp` number, float, nullable: Mean Largest Contentful Paint (ms). A mean is pulled far off by a handful of extreme beacons; prefer `lcp_p75` for ranking groups.
    - `lcp_p50` number, float, nullable: 50th percentile Largest Contentful Paint (ms). Null when no sample in the group reported it.
    - `lcp_p75` number, float, nullable: 75th percentile Largest Contentful Paint (ms) — the Core Web Vitals assessment percentile. Null when no sample in the group reported it.
    - `lcp_p90` number, float, nullable: 90th percentile Largest Contentful Paint (ms). Null when no sample in the group reported it.
    - `ttfb` number, float, nullable: Mean Time to First Byte (ms).
    - `ttfb_p50` number, float, nullable: 50th percentile Time to First Byte (ms). Null when no sample in the group reported it.
    - `ttfb_p75` number, float, nullable: 75th percentile Time to First Byte (ms) — the Core Web Vitals assessment percentile. Null when no sample in the group reported it.
    - `ttfb_p90` number, float, nullable: 90th percentile Time to First Byte (ms). Null when no sample in the group reported it.
  - `total_events` integer, required

## Other responses

- `400`: Invalid date format, missing parameters, or invalid group_by value
- `401`: Authentication required
- `403`: Insufficient permissions
- `500`: Internal server error

## Changes

- **2026-10-10** `e75811e4d169`: 15 info
  - added the optional property `groups/items/cls_p50` to the response with the `200` status
  - added the optional property `groups/items/cls_p75` to the response with the `200` status
  - added the optional property `groups/items/cls_p90` to the response with the `200` status
  - added the optional property `groups/items/fcp_p50` to the response with the `200` status
  - …11 more
- **2026-07-27** `1b060c0a4ba3`: 12 info
  - the endpoint scheme security `bearer_auth` was added to the API
  - added the new optional `query` request parameter `device_type`
  - added the new optional `query` request parameter `filter_browser`
  - added the new optional `query` request parameter `filter_city`
  - …8 more

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/performance/page-metrics/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
