YepAPI
On-Page & Lighthouse

Lighthouse Audit

Run a Google Lighthouse audit — performance, accessibility, SEO, and Core Web Vitals.

Pricing, live playground and use cases: Lighthouse API on YepAPI

POST/v1/seo/onpage/lighthouse
$0.05/call

Usage

const res = await fetch('https://api.yepapi.com/v1/seo/onpage/lighthouse', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "url": "https://vercel.com"
  }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/seo/onpage/lighthouse \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://vercel.com"}'

Request Body

ParameterTypeRequiredDescriptionDefault
urlstringYesFull URL to audit—
devicestringNodesktop or mobile. Mobile is audited on a throttled phone profile, so scores and timings differ."desktop"
include_auditsbooleanNoAlso return every audit the page did not pass (see Audits).false

Response

{
  "ok": true,
  "data": {
    "url": "https://www.wikipedia.org/",
    "device": "mobile",
    "performanceScore": 0.97,
    "accessibilityScore": 0.96,
    "bestPracticesScore": 0.96,
    "seoScore": 1.0,
    "firstContentfulPaint": 1120.4,
    "largestContentfulPaint": 1960.2,
    "cumulativeLayoutShift": 0.0,
    "speedIndex": 1480.7,
    "totalBlockingTime": 90.0,
    "audits": [
      {
        "id": "mainthread-work-breakdown",
        "category": "performance",
        "title": "Minimize main-thread work",
        "description": "Consider reducing the time spent parsing, compiling and executing JS.",
        "score": 0.0,
        "displayValue": "2.1 s",
        "opportunity": false
      },
      {
        "id": "cache-insight",
        "category": "performance",
        "title": "Use efficient cache lifetimes",
        "description": "A long cache lifetime can speed up repeat visits to your page.",
        "score": 0.5,
        "displayValue": "Est savings of 27 KiB",
        "opportunity": false
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.urlstringThe URL that was audited
data.devicestringdesktop or mobile
data.performanceScorenumberLighthouse performance score (0-1)
data.accessibilityScorenumberLighthouse accessibility score (0-1)
data.bestPracticesScorenumberLighthouse best practices score (0-1)
data.seoScorenumberLighthouse SEO score (0-1)
data.firstContentfulPaintnumberFirst Contentful Paint in milliseconds (FCP)
data.largestContentfulPaintnumberLargest Contentful Paint in milliseconds (LCP)
data.cumulativeLayoutShiftnumberCumulative Layout Shift score (CLS)
data.speedIndexnumberSpeed Index in milliseconds
data.totalBlockingTimenumberTotal Blocking Time in milliseconds (TBT)
data.auditsobject[]Audits the page did not pass. Only with include_audits: true.

Audits

With include_audits: true the response lists every scored audit below Lighthouse's pass mark (a score under 0.9), grouped by category — performance first, then accessibility, best practices and SEO. Passed, informative and not-applicable audits are left out. An empty array means the page passed everything.

FieldTypeDescription
data.audits[].idstringLighthouse audit ID, e.g. mainthread-work-breakdown
data.audits[].categorystringperformance, accessibility, best-practices, or seo
data.audits[].titlestringWhat the audit checks
data.audits[].descriptionstringWhy it matters, with a link to the fix
data.audits[].scorenumber0–1; lower is worse
data.audits[].displayValuestringLighthouse's one-line result, e.g. "Est savings of 27 KiB"
data.audits[].opportunitybooleantrue when the audit carries an estimated load-time saving
data.audits[].savingsMsnumberThat estimated saving in milliseconds, when present

Asking for audits does not change the price, and a second call for the same URL and device is served from the same run.

Under the Hood

Full Lighthouse audit. Scores and Core Web Vitals in one call.

On this page