Skip to main content

Response Time

free
GET/v1/domain/response-time

Measures 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

SRE

Performance Monitoring

Monitor server response times to detect performance degradation.

Identify performance issues before they impact users.

Performance Engineer

Bottleneck Analysis

Analyze latency breakdown to identify whether issues are in DNS, TLS, or server processing.

Focus optimization efforts on the right component.

Product Manager

Competitive Benchmarking

Compare response times against competitors to benchmark performance.

Set performance targets based on competitive landscape.

Parameters

NameTypeRequiredDescription
domainstringRequiredDomain or full URL — accepts `example.com` or `https://example.com/path`.Example: https://example.com
samplesnumberOptionalNumber of measurement samples (1-5, default: 3)Example: 3

Response Fields

FieldTypeDescription
domainstringThe queried domain (bare hostname).
urlstringFull URL that was fetched, echoing the protocol used in the request.
samplesnumberNumber of measurement samples taken
successfulSamplesnumberSamples that returned a response
failedSamplesnumberSamples that timed out or failed
timingobjectAggregate timing stats in ms: min, max, avg, median, p90, p95, p99, jitter
individualarrayPer-sample measurements (totalMs, ttfbMs, success)
serverTimingarrayAggregated Server-Timing entries across samples — each { name, dur (avg ms), desc }
statusstringTTFB rating per web.dev 2026 thresholds: fast (<800ms), acceptable (800–1800ms), slow (≥1800ms), or unreachable
statusDescriptionstringHuman-readable performance description
recommendationsarrayPerformance improvement suggestions, including backend-component callouts from Server-Timing

Code Examples

cURL
curl "https://api.edgedns.dev/v1/domain/response-time" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain=https://example.com"
JavaScript
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);
Python
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.