Skip to main content
POST
/
v1
/
ttfb-tests
Run a TTFB test
curl --request POST \
  --url https://api.speedvitals.com/v1/ttfb-tests \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "url": "https://speedvitals.com",
  "region": "asia"
}
'
{
  "url": "https://speedvitals.com",
  "region": "america",
  "result": [
    {
      "location_id": "del",
      "location_name": "Delhi",
      "status": "success",
      "data": {
        "timings": {
          "dns_lookup": 2,
          "server_processing": 18,
          "tcp_connection": 10,
          "tls_handshake": 25,
          "total": 56,
          "ttfb": 55
        },
        "http_version": 2,
        "http_status": 200,
        "response_headers": {
          "accept-ranges": "bytes",
          "age": 520141,
          "cache-control": "max-age=604800",
          "vary": "Accept-Encoding",
          "x-cache": "HIT"
        }
      },
      "error": null
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

This is the TTFB test body object

url
string

The url of the webpage

Example:

"https://speedvitals.com"

region
enum<string>

The id of a ttfb region

Available options:
asia,
america,
europe
Example:

"asia"

Response

A TTFB result to be returned

url
string
required
region
enum<string>
required
Available options:
asia,
america,
europe
Example:

"asia"

result
object[]