PageSpeed Insights
developer/v1/domain/pagespeedRuns a Lighthouse audit via the Google PageSpeed Insights API. Returns performance, accessibility, best-practices, and SEO scores, plus top optimization opportunities and diagnostics.
What It Does
Submits the domain to Google PageSpeed Insights API for a full Lighthouse audit. Returns category scores (performance, accessibility, best practices, SEO), detailed optimization opportunities with estimated savings, diagnostic information, and real-world loading experience data from CrUX. Supports both mobile and desktop strategies. Lighthouse 13 performance scoring weights: TBT 30%, LCP 25%, CLS 25%, FCP 10%, SI 10%.
Why It's Useful
PageSpeed Insights is the industry standard for web performance measurement. Integrating it via API enables automated performance monitoring, CI/CD gates, and competitive benchmarking without manual browser testing.
Use Cases
Performance Monitoring
Track PageSpeed scores over time to detect performance regressions after deployments.
Catch performance issues before they impact user experience and SEO.
CI/CD Performance Gate
Block deployments when PageSpeed performance score drops below a threshold.
Prevent performance regressions from reaching production.
Competitive Benchmarking
Compare PageSpeed scores against top competitors to identify performance gaps.
Set data-driven performance targets based on competitive landscape.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to run PageSpeed audit onExample: example.com |
strategy | string | Optional | Audit strategy: mobile or desktop (default: mobile)Example: mobileOptions: mobile, desktop |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The audited domain |
strategy | string | The audit strategy used (mobile/desktop) |
fetchTime | string | ISO 8601 timestamp when the Lighthouse audit was performed |
scores | object | Category scores: performance, accessibility, bestPractices, seo |
opportunities | array | Optimization opportunities with estimated savings |
diagnostics | array | Diagnostic information and display values |
redirects | array | Redirect chain with URLs and wasted time per redirect |
loadingExperience | object | Real-world CrUX loading experience metrics |
Code Examples
curl "https://api.edgedns.dev/v1/domain/pagespeed" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/pagespeed?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/pagespeed',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full PageSpeed Insights 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 PageSpeed Insights endpoint live in the playground.