Get Web Vitals summary REST API
GET
/api/sites/{id}/web-vitals/summary
const url = 'https://app.hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/web-vitals/summary?rating=good&metric=LCP';const options = {method: 'GET', headers: {cookie: 'hk_token=<hk_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/web-vitals/summary?rating=good&metric=LCP' \ --cookie hk_token=<hk_token>Returns p75, sample count, rating counts, and derived p75 rating for each Web Vital metric.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Query Parameters
Section titled “Query Parameters”from
string format: date-time
to
string format: date-time
path
string
Exact normalized page path.
rating
string
Web Vital threshold rating.
metric
string
Web Vital metric.
Responses
Section titled “Responses”Web Vitals summary
Media typeapplication/json
Array<object>
object
good
integer
metric
string
needs_improvement
integer
p75
number
poor
integer
rating
string
samples
integer
Example
[ { "metric": "LCP", "rating": "good" }]