Retrieve a lighthouse report
curl --request GET \
--url https://api.speedvitals.com/v1/lighthouse-tests/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.speedvitals.com/v1/lighthouse-tests/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.speedvitals.com/v1/lighthouse-tests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.speedvitals.com/v1/lighthouse-tests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.speedvitals.com/v1/lighthouse-tests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.speedvitals.com/v1/lighthouse-tests/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedvitals.com/v1/lighthouse-tests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "lt_LthsZedDcOUfYFHxN",
"url": "https://speedvitals.com",
"device": "macbookAirM1",
"location": "us",
"config": {
"http_version": "2",
"video": true,
"adblock": true
},
"status": "idle",
"lighthouse_version": "9.6.2",
"metrics": {
"cumulative_layout_shift": 0,
"first_contentful_paint": 515,
"first_meaningful_paint": 566,
"time_to_interactive": 725,
"largest_contentful_paint": 515,
"server_response_time": 21,
"speed_index": 1123,
"total_blocking_time": 69,
"performance_score": 99
},
"report_url": "https://speedvitals.com/report/speedvitals.com/Q6qWx6/",
"created_at": 1657537268453,
"expires_at": 1660129268453,
"error": null
}Lighthouse Tests
Retrieve a lighthouse report
Retrieves the report of lighthouse test. Supply the unique test ID from either a lighthouse test creation request or the lighthouse tests list, and SpeedVitals will return the corresponding test information.
GET
/
v1
/
lighthouse-tests
/
{id}
Retrieve a lighthouse report
curl --request GET \
--url https://api.speedvitals.com/v1/lighthouse-tests/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.speedvitals.com/v1/lighthouse-tests/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.speedvitals.com/v1/lighthouse-tests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.speedvitals.com/v1/lighthouse-tests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.speedvitals.com/v1/lighthouse-tests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.speedvitals.com/v1/lighthouse-tests/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedvitals.com/v1/lighthouse-tests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "lt_LthsZedDcOUfYFHxN",
"url": "https://speedvitals.com",
"device": "macbookAirM1",
"location": "us",
"config": {
"http_version": "2",
"video": true,
"adblock": true
},
"status": "idle",
"lighthouse_version": "9.6.2",
"metrics": {
"cumulative_layout_shift": 0,
"first_contentful_paint": 515,
"first_meaningful_paint": 566,
"time_to_interactive": 725,
"largest_contentful_paint": 515,
"server_response_time": 21,
"speed_index": 1123,
"total_blocking_time": 69,
"performance_score": 99
},
"report_url": "https://speedvitals.com/report/speedvitals.com/Q6qWx6/",
"created_at": 1657537268453,
"expires_at": 1660129268453,
"error": null
}Authorizations
Path Parameters
Maximum string length:
5000Example:
"lt_LthsZedDcOUfYFHxN"
Response
Successful response.
Available options:
mobile, desktop, macbookAirM1, highEndLaptop, ipad102, galaxyTabS7, iphone13ProMax, iphone11, galaxyS10Plus, redmiNote8Pro, iphone7, galaxyA50, galaxyJ8, motoG5, redmi5A Example:
"macbookAirM1"
Available options:
us, ca, br, de, uk, nl, pl, ch, jp, in, sg, au, id, kr, tw Example:
"us"
Available options:
idle, active, success, failed The version of the lighthouse used to generate the report
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The URL at which SpeedVitals report is accessible (Present when status is success)
Time at which the test was created. Measured in seconds since the Unix epoch.
Time at which the report will expire. Measured in seconds since the Unix epoch.
Contains error code and description(present only if status is failed)
Show child attributes
Show child attributes