Core Web Vitals
developer/v1/domain/web-vitalsCombines real-world Chrome UX Report (CrUX) field data with server-side performance analysis. Returns LCP, INP, CLS, TTFB, and FCP metrics with p75 values and histogram distributions, plus server-measured TTFB, render-blocking resource detection, CLS risk factors, INP risk factors, a composite score with grade, and actionable recommendations.
What It Does
Queries the CrUX API for real-world performance data (p75 values for LCP, INP, CLS, TTFB, FCP with histogram distributions) and simultaneously performs server-side analysis: measures TTFB directly, scans HTML for render-blocking resources, images without dimensions (CLS risk), missing preload/preconnect hints (LCP risk), synchronous scripts and third-party script domains (INP risk), and resource hint usage. Produces a composite score (0-100) combining field data (60%) and server-side analysis (40%), with a letter grade and prioritized recommendations. Even when CrUX data is unavailable (smaller sites), the server-side analysis still provides actionable diagnostics.
Why It's Useful
Core Web Vitals are a confirmed Google ranking factor. This endpoint goes beyond raw CrUX data by identifying specific optimization opportunities in your HTML — render-blocking resources slowing LCP, missing image dimensions causing CLS, and excessive third-party scripts affecting INP. Provides value even for sites without CrUX data by analyzing server response time and HTML structure.
Use Cases
Ranking Factor Monitoring
Monitor real-world Core Web Vitals and get specific recommendations to maintain Google ranking thresholds.
Actionable insights tied directly to ranking signals.
Performance Optimization
Identify render-blocking resources, missing preload hints, and CLS risk factors alongside real-user metrics.
Pinpoint exact optimization targets instead of guessing.
Competitive CWV Comparison
Compare Core Web Vitals scores and server-side diagnostics against competitors.
Quantify UX advantages and identify specific areas where competitors excel.
Small Site Diagnostics
Analyze CWV risk factors for sites without enough traffic for CrUX data.
Get performance diagnostics even without real-user measurement data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to get Core Web Vitals forExample: example.com |
formFactor | string | Optional | Device type: PHONE, DESKTOP, TABLET, or ALL_FORM_FACTORS (default)Example: ALL_FORM_FACTORSOptions: PHONE, DESKTOP, TABLET, ALL_FORM_FACTORS |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
formFactor | string | The form factor queried |
dataAvailable | boolean | Whether CrUX field data is available for this domain |
metrics | object | CrUX metrics (lcp, inp, cls, ttfb, fcp) each with p75, histogram percentages, rating, and thresholds |
collectionPeriod | object | CrUX data collection period (firstDate, lastDate) |
lcpSubParts | object | LCP timing breakdown (when available): imageTimeToFirstByte, imageResourceLoadDelay, imageResourceLoadDuration, imageElementRenderDelay (p75 ms) |
overallAssessment | string | Overall CrUX assessment: good, needs-improvement, or poor |
passesAllThresholds | boolean | Whether all Core Web Vitals pass Google thresholds |
serverAnalysis | object | Server-side analysis: measured TTFB, LCP optimization factors, CLS risk factors, INP risk factors, and resource hints |
serverAnalysis.ttfb | object | Directly measured Time to First Byte with value (ms) and rating |
serverAnalysis.lcpAnalysis | object | LCP risk factors: render-blocking stylesheets/scripts, preconnect/preload/fetchpriority usage |
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 | Composite score (0-100) combining CrUX field data and server-side analysis |
grade | string | Letter grade: A+, A, B, C, D, or F |
issues | array | Detected performance issues from server-side analysis |
recommendations | array | Prioritized recommendations combining CrUX insights and server-side findings |
Code Examples
curl "https://api.edgedns.dev/v1/domain/web-vitals" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/web-vitals?domain=example.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/web-vitals',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full Core Web Vitals 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 Core Web Vitals endpoint live in the playground.