Skip to main content

Core Web Vitals

developer
GET/v1/domain/web-vitals

Combines 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

SEO Manager

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 Engineer

Performance Optimization

Identify render-blocking resources, missing preload hints, and CLS risk factors alongside real-user metrics.

Pinpoint exact optimization targets instead of guessing.

Product Manager

Competitive CWV Comparison

Compare Core Web Vitals scores and server-side diagnostics against competitors.

Quantify UX advantages and identify specific areas where competitors excel.

Developer

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

NameTypeRequiredDescription
domainstringRequiredThe domain to get Core Web Vitals forExample: example.com
formFactorstringOptionalDevice type: PHONE, DESKTOP, TABLET, or ALL_FORM_FACTORS (default)Example: ALL_FORM_FACTORSOptions: PHONE, DESKTOP, TABLET, ALL_FORM_FACTORS

Response Fields

FieldTypeDescription
domainstringThe queried domain
formFactorstringThe form factor queried
dataAvailablebooleanWhether CrUX field data is available for this domain
metricsobjectCrUX metrics (lcp, inp, cls, ttfb, fcp) each with p75, histogram percentages, rating, and thresholds
collectionPeriodobjectCrUX data collection period (firstDate, lastDate)
lcpSubPartsobjectLCP timing breakdown (when available): imageTimeToFirstByte, imageResourceLoadDelay, imageResourceLoadDuration, imageElementRenderDelay (p75 ms)
overallAssessmentstringOverall CrUX assessment: good, needs-improvement, or poor
passesAllThresholdsbooleanWhether all Core Web Vitals pass Google thresholds
serverAnalysisobjectServer-side analysis: measured TTFB, LCP optimization factors, CLS risk factors, INP risk factors, and resource hints
serverAnalysis.ttfbobjectDirectly measured Time to First Byte with value (ms) and rating
serverAnalysis.lcpAnalysisobjectLCP risk factors: render-blocking stylesheets/scripts, preconnect/preload/fetchpriority usage
serverAnalysis.clsAnalysisobjectCLS risk factors: images without dimensions, font-display strategy, viewport meta
serverAnalysis.inpAnalysisobjectINP risk factors: third-party script domains, synchronous scripts in head, total script count
serverAnalysis.resourceHintsobjectResource hints found: preconnect, preload, dns-prefetch, prefetch origins
scorenumberComposite score (0-100) combining CrUX field data and server-side analysis
gradestringLetter grade: A+, A, B, C, D, or F
issuesarrayDetected performance issues from server-side analysis
recommendationsarrayPrioritized recommendations combining CrUX insights and server-side findings

Code Examples

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