Core Web Vitals API
developer/v1/domain/web-vitalsAnalyzes server response timing and source-HTML factors associated with LCP, CLS and INP. Returns a diagnostic score, grade and recommendations. It does not run a browser, measure actual LCP/CLS/INP, or return Chrome UX Report field data.
What It Does
Measures final-fetch response-headers time separately from body transfer and examines actual source elements for render-blocking resources, image dimensions, resource hints, script loading and other performance risks. The 0–100 diagnostic score weights synthetic headers timing at 25 points, LCP-related factors at 35, CLS-related factors at 25 and INP-related factors at 15. These are heuristic risk checks, not observed user-experience metrics. Use PageSpeed Insights for available lab and field data, and browser or real-user measurements to validate improvements.
Why It's Useful
Identify source-HTML and server-response changes to investigate before running browser measurements. This provides diagnostics even when a site has insufficient traffic for public field data.
Use Cases
Performance Regression Review
Compare server timing and HTML risk factors after a release, then verify changes with browser measurements.
Prioritize concrete markup and response-time improvements without treating heuristics as measured Core Web Vitals.
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
domain | query | string | Required | The domain to get Core Web Vitals forExample: example.com |
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.
| Field | Type | Description |
|---|---|---|
assessment | object | Evidence status, coverage, weights and unavailable component names; error documents are ineligible. |
coreWebVitalsMeasured | boolean | Always false: this endpoint does not measure browser LCP, CLS or INP. |
serverAnalysis.bodyReadMs | number | HTML body read duration, separate from headers time. |
serverAnalysis.finalUrl | string | Final inspected URL after redirects; protocol is unknown unless actually measured. |
domain | string | The queried domain |
serverAnalysis | object | Server-side analysis: measured TTFB, LCP optimization factors, CLS risk factors, INP risk factors, and resource hints |
serverAnalysis.ttfb | object | Synthetic final-fetch headers time with value and rating, excluding safety validation, prior redirects and body download; not browser navigation TTFB |
serverAnalysis.lcpAnalysis | object | LCP risk factors: render-blocking stylesheets/scripts, preconnect/preload/fetchpriority usage. Plus lcpCandidate (source-inferred large image; actual LCP and viewport position are unmeasured with hasFetchPriorityHigh + hasMatchingPreload + isLazyLoaded flags — Google's #1 LCP recommendations), lazyLoadedAboveFold (empty because source order cannot establish viewport position), and modernFormats (AVIF/WebP adoption + remaining jpg/png-only count for a conversion-project sizing). |
serverAnalysis.clsAnalysis | object | CLS risk factors: images without dimensions, font-display strategy, viewport meta |
serverAnalysis.inpAnalysis | object | INP risk factors: third-party script domains, synchronous scripts in head, total script count |
serverAnalysis.resourceHints | object | Resource hints found: preconnect, preload, dns-prefetch, prefetch origins |
score | number | Server-side diagnostic score (0–100); not a browser or CrUX score. |
grade | string | Complete static-signal grade; null for unavailable/provisional evidence |
issues | array | Detected performance issues from server-side analysis |
recommendations | array | Prioritized recommendations from server timing and source-HTML risk factors |
Code Examples
Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.
curl --request GET 'https://api.edgedns.dev/v1/domain/web-vitals?domain=example.com' \
--header "Authorization: Bearer YOUR_API_KEY"const response = await fetch(
"https://api.edgedns.dev/v1/domain/web-vitals?domain=example.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);import requests
response = requests.request(
'GET',
"https://api.edgedns.dev/v1/domain/web-vitals?domain=example.com",
headers={'Authorization': 'Bearer YOUR_API_KEY'},
timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)Read the full Core Web Vitals guide
Learn the concepts, choose a practical workflow, and interpret the observations from Core Web Vitals 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 Core Web Vitals endpoint live in the playground.