Retrieving metrics


The ability to retrieve metrics is at the heart of Calibre’s API. In this guide we'll demonstrate how to fetch metrics for your pages efficiently.

Timeseries metrics for a given Site#

You can query up to 6 months of reporting data per request. Use from and to parameters to specify date ranges.

Read Sites

calibre site metrics --site=calibre --json --metrics=largestContentfulPaint --metrics=lighthousePerformanceScore
ParameterCLINode.js APIDescription
site--sitesiteThe site slug
from--fromfromStart date for the query (ISO 8601 format)
to--totoEnd date for the query (ISO 8601 format)
pages--pagepagesFilter by page UUID(s)
profiles--profileprofilesFilter by test profile UUID(s)
measurements--metricsmeasurementsFilter by metric name(s)

Metrics from a single Snapshot#

Read Sites

calibre site get-snapshot-metrics --site=calibre --snapshot=2000 --json
ParameterCLINode.js APIDescription
site--sitesiteThe site slug
snapshot--snapshotsnapshotIdThe snapshot ID

On this page