Overview
Get KPIs such as lighthouse scores, crux assessment, performance metrics, network resources, savings, security, page source links and html validation results for your projects.
Request
GET or POST https://api.wattspeed.com/v1/overview
Headers
Your API token.
Parameters
A UTC start date - should be in ISO-8601 format: yyyy-MM-dd
.
A UTC end date - should be in ISO-8601 format: yyyy-MM-dd
.
Use this to filter by domain - should be URL encoded.
Use this to filter by update type.
Allowed values: manual
, scheduled
, ci
.
Use this to filter by section. When passing multiple locations, include each location in a different parameter using the same name. Example: section=lighthouse§ion=crux
.
Allowed values: lighthouse
, crux
, page_source
, security
, savings
.
Example request
GET
https://api.wattspeed.com/v1/overview?domain=wattspeed.com§ion=lighthouse§ion=crux&updateType=scheduled
POST
{
"dateRange": {
"startDate": "2024-06-20",
"endDate": "2024-07-17"
},
"domain": "wattspeed.com",
"updateType": "scheduled",
"sections": ["lighthouse", "crux"]
}
Responses
- 200
- 400
- 401
- 405
- 406
- 415
- 500
[
{
"date": "2024-06-20T13:23:24",
"domain": "wattspeed.com",
"url": "https://wattspeed.com/",
"device": "mobile",
"location": "us-east1",
"updateType": "Scheduled",
"section": "LIGHTHOUSE",
"kpi": LIGHTHOUSE_KPI_KEY_STRING,
"data": {
...LIGHTHOUSE_KPI_DATA_OBJECT
}
},
{
"date": "2024-06-20T13:23:24",
"domain": "wattspeed.com",
"url": "https://wattspeed.com/",
"device": "mobile",
"location": "us-east1",
"updateType": "Scheduled",
"section": "CRUX",
"kpi": CRUX_KPI_KEY_STRING,
"data": CRUX_KPI_DATA_STRING
}
]
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "BAD_REQUEST",
"message": "Required request header 'Authorization' is not present",
"errors": [
"Required request header 'Authorization' is not present"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "UNAUTHORIZED",
"message": "API token not valid. Please enter a valid API token",
"errors": [
"API token not valid. Please enter a valid API token"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "METHOD_NOT_ALLOWED",
"message": "Request method 'PUT' not supported",
"errors": [
"PUT method is not supported for this request. Supported methods are GET, POST"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status" : "NOT_ACCEPTABLE",
"message" : "No acceptable representation",
"errors" : [
"Media type is not supported. Supported media type is application/json"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status" : "UNSUPPORTED_MEDIA_TYPE",
"message" : "Content-Type 'application/x-www-form-urlencoded' is not supported",
"errors" : [
"application/x-www-form-urlencoded media type is not supported. Supported media type is application/json"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again",
"errors": [
"Something went wrong, please try again"
]
}
SECTION KPI_KEY RESPONSES
- LIGHTHOUSE_KPI_KEYS
- CRUX_KPI_KEYS
- PAGE_SOURCE_KPI_KEYS
- SECURITY_KPI_KEYS
- SAVINGS_KPI_KEYS
performance (object)
{
"si": 0.62,
"fcp": 0.62,
"fmp": 0.62,
"tti": 0.62,
"fCPUi": 0,
"mpFID": 48,
"score": 99
}accessibility (object)
{
"score": 95
}best_practices (object)
{
"score": 98
}seo (object)
{
"score": 100
}pwa (Legacy) (object)
{
"score": 89
}pwa_checks (Legacy) (object)
{
"pwa-optimized": "2/6",
"pwa-installable": "0/1"
}
crux (string)
"Pass"
crux_url (string)
"Pass"
Possible assessment values: "Pass", "Fail", "N/A"
links (object)
The data for this KPI is always updated and never added to history.
{
"dead": 14,
"alive": 15
}html-validation (object)
The data for this KPI is always updated and never added to history.
{
"errors": 76,
"warnings": 11
}page-source (object)
The data for this KPI is always updated and never added to history.
{
"font": {
"requestCount": 2,
"transferSize": 22185
},
"image": {
"requestCount": 6,
"transferSize": 59211
},
"media": {
"requestCount": 0,
"transferSize": 0
},
"other": {
"requestCount": 10,
"transferSize": 43124
},
"total": {
"requestCount": 35,
"transferSize": 1404767
},
"script": {
"requestCount": 12,
"transferSize": 1166701
},
"document": {
"requestCount": 2,
"transferSize": 59317
},
"dom-size": {
"size": 410
},
"stylesheet": {
"requestCount": 3,
"transferSize": 54229
},
"third-party": {
"requestCount": 21,
"transferSize": 1269443
},
"global-score": {
"percent": 79.5
}
}
vulnerabilities (number)
The data for this KPI is always updated and never added to history.
4
securityHeadersScore (string)
"A"
securitySslScore (string)
"A+"
Possible scores/grades: "A+", "A", "B", "C", "D", "E", "F", "T"
security (object)
The data for this KPI is always updated and never added to history.
{
"security-pp": false,
"security-rp": false,
"security-csp": false,
"security-ssl": true,
"security-sst": true,
"security-xfo": false,
"security-xcto": false
}The boolean value represents whether the SSL certificate is valid or the specified security header is set or not.
Used header abbreviations:
SST Strict-Transport-Security CSP Content-Security-Policy XFO X-Frame-Options XCTO X-Content-Type-Options RP Referrer-Policy PP Permissions-Policy
savings (object)
The data for this KPI is always updated and never added to history.
{
"savings-js": 3460.0,
"savings-css": 150.0,
"savings-images": 0.0,
"savings-server": -68.26299999999999,
"savings-network": 302.872,
"savings-critical": 0.0
}