Skip to main content
POST
/
ttfb
cURL
curl --request POST \
  --url https://api.geekflare.com/ttfb \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com",
  "followRedirect": false
}
'
{
  "timestamp": 1763372588297,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "url": "https://example.com",
    "redirectedURL": "https://example.com/",
    "test": {
      "id": "mxqx9v9y0742lap6altwdteqd28t23nq"
    },
    "followRedirect": true
  },
  "data": 245
}

Authorizations

x-api-key
string
header
required

API Key required for all endpoints

Body

application/json
url
string
required

Target URL

Example:

"https://example.com"

followRedirect
boolean
default:false

Whether to follow redirects when checking site status

Example:

false

Response

Site status retrieved successfully

timestamp
number
required

Timestamp of the request in milliseconds

Example:

1763372588297

apiStatus
enum<string>
required

API status message

Available options:
success,
failure
Example:

"success"

apiCode
number
required

API status code

Example:

200

meta
object
required

Metadata about the TTFB test

data
number
required

The measured Time to First Byte (TTFB) in milliseconds

Example:

245