Response Time
free/v1/domain/response-timeMeasures total response latency with multiple samples and computes percentiles (median, p90, p95, p99) using web.dev 2026 TTFB thresholds (good ≤ 800ms, poor ≥ 1800ms). Aggregates Server-Timing headers across samples to expose backend component breakdowns (db, render, cache).
What It Does
Issues 1–5 sequential HEAD probes against the domain (auto-retries with GET on 405/501), each with cache bypassed at the edge. Returns aggregate timing statistics including tail-latency percentiles. Server-Timing headers from each sample are parsed and merged. Note: Cloudflare Workers cannot observe DNS / TCP / TLS sub-timings, so only total response time is reported per sample.
Why It's Useful
Response time directly impacts user experience and SEO rankings. Understanding the latency breakdown helps identify bottlenecks in DNS, TLS, or server processing.
Use Cases
Performance Monitoring
Monitor server response times to detect performance degradation.
Identify performance issues before they impact users.
Bottleneck Analysis
Analyze latency breakdown to identify whether issues are in DNS, TLS, or server processing.
Focus optimization efforts on the right component.
Competitive Benchmarking
Compare response times against competitors to benchmark performance.
Set performance targets based on competitive landscape.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | Domain or full URL — accepts `example.com` or `https://example.com/path`.Example: https://example.com |
samples | number | Optional | Number of measurement samples (1-5, default: 3)Example: 3 |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain (bare hostname). |
url | string | Full URL that was fetched, echoing the protocol used in the request. |
samples | number | Number of measurement samples taken |
successfulSamples | number | Samples that returned a response |
failedSamples | number | Samples that timed out or failed |
timing | object | Aggregate timing stats in ms: min, max, avg, median, p90, p95, p99, jitter |
individual | array | Per-sample measurements (totalMs, ttfbMs, success) |
serverTiming | array | Aggregated Server-Timing entries across samples — each { name, dur (avg ms), desc } |
status | string | TTFB rating per web.dev 2026 thresholds: fast (<800ms), acceptable (800–1800ms), slow (≥1800ms), or unreachable |
statusDescription | string | Human-readable performance description |
recommendations | array | Performance improvement suggestions, including backend-component callouts from Server-Timing |
Code Examples
curl "https://api.edgedns.dev/v1/domain/response-time" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=https://example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/response-time?domain=https%3A%2F%2Fexample.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/domain/response-time',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'https://example.com'
}
)
data = response.json()
print(data)Read the full Response Time guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Response Time endpoint live in the playground.