Skip to main content
POST
/
v1
/
lighthouse-tests
Run a lighthouse test
curl --request POST \
  --url https://api.speedvitals.com/v1/lighthouse-tests \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "url": "https://speedvitals.com",
  "device": "macbookAirM1",
  "location": "us",
  "config": {
    "connection": "fiber",
    "video": true,
    "adblock": true
  }
}
'
{
  "url": "https://speedvitals.com",
  "device": "macbookAirM1",
  "location": "us",
  "config": {
    "connection": "fiber",
    "video": true,
    "adblock": true
  },
  "status": "success",
  "lighthouse_version": "9.6.2",
  "metrics": null,
  "report_url": null,
  "created_at": 1657537268453,
  "expires_at": 1660129268453,
  "error": null
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

This is the lighthouse test body object

url
string

The url of webpage

device
enum<string>
Available options:
mobile,
desktop,
macbookAirM1,
highEndLaptop,
ipad102,
galaxyTabS7,
iphone13ProMax,
iphone11,
galaxyS10Plus,
redmiNote8Pro,
iphone7,
galaxyA50,
galaxyJ8,
motoG5,
redmi5A
Example:

"macbookAirM1"

location
enum<string>
Available options:
us,
ca,
br,
de,
uk,
nl,
pl,
ch,
jp,
in,
sg,
au,
id,
kr,
tw
Example:

"us"

config
object

Response

A lighthouse report to be returned

url
string
required
device
enum<string>
required
Available options:
mobile,
desktop,
macbookAirM1,
highEndLaptop,
ipad102,
galaxyTabS7,
iphone13ProMax,
iphone11,
galaxyS10Plus,
redmiNote8Pro,
iphone7,
galaxyA50,
galaxyJ8,
motoG5,
redmi5A
Example:

"macbookAirM1"

location
enum<string>
required
Available options:
us,
ca,
br,
de,
uk,
nl,
pl,
ch,
jp,
in,
sg,
au,
id,
kr,
tw
Example:

"us"

status
enum<string>
required
Available options:
idle,
active,
success,
failed
lighthouse_version
string
required

The version of the lighthouse used to generate the report

id
string
config
object
metrics
object
report_url
string | null

The URL at which SpeedVitals report is accessible (Present when status is success)

created_at
number

Time at which the test was created. Measured in seconds since the Unix epoch.

expires_at
number

Time at which the report will expire. Measured in seconds since the Unix epoch.

error
object

Contains error code and description(present only if status is failed)