Skip to main content

Response Time API

free
GET/v1/domain/response-time

Measures response latency across one to five samples. Choose vantage=vps for uncached native DNS, TCP, TLS and true first-byte timing breakdowns; Workers remains the default.

What It Does

Workers mode retains the existing fetch measurements and five-minute result cache. Optional VPS mode takes fresh HTTP/1.1 samples, validates and pins every destination and redirect, and retries HEAD with GET only for 405/501 responses. Native samples expose DNS, TCP, TLS, first-byte, wait and download timings separately. Aggregate timing statistics use complete successful total durations, while ttfb statistics and status use measured first-byte latency. Unknown phases stay null, and attempted/unattempted samples are explicit under the aggregate deadline.

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

NameLocationTypeRequiredDescription
vantagequerystringOptionalMeasurement source: workers (default) or vps for fresh native connection timings from one VPS vantage point.Example: vpsOptions: workers, vps
domainquerystringRequiredDomain or full URL — accepts `example.com` or `https://example.com/path`.Example: https://example.com
samplesquerynumberOptionalNumber of measurement samples (1-5, default: 3)Example: 3

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

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
completebooleanWhether all requested native measurements completed within the bounds.
wall_msnumberElapsed native job time including DNS validation, process startup and cleanup.
ttfbobjectMin/max/average/median/percentiles for actual first-byte latency from complete successful samples.
attemptedSamplesnumberNumber of native samples attempted.
unattemptedSamplesnumberRequested samples not attempted because the aggregate deadline expired.
individual[].dnsMsnumber | nullValidated DNS lookup duration, including redirects.
individual[].tcpMsnumber | nullObserved TCP connection time, including redirects.
individual[].tlsMsnumber | nullObserved TLS handshake time; null when not applicable or unavailable.
individual[].requestWaitMsnumber | nullObserved server/network wait until first byte.
individual[].downloadMsnumber | nullObserved response-body transfer duration.

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the free plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/domain/response-time?domain=https%3A%2F%2Fexample.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/response-time?domain=https%3A%2F%2Fexample.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/domain/response-time?domain=https%3A%2F%2Fexample.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Response Time guide

Learn the concepts, choose a practical workflow, and interpret the observations from Response Time before acting on them. Run supported checks via MCP or through REST.

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.

    Response Time API Reference | EdgeDNS