microlink logo

Microlink Recipe

Run Lighthouse on demand

lighthouseReport.js
const mql = require('@microlink/mql')

const lighthouseReport = async (url, opts) => {
  const { data } = await mql(url, {
    meta: false,
    insights: {
      lighthouse: true,
      technologies: false,
    },
    ...opts,
  })

  return data.insights.lighthouse
}

const result = await lighthouseReport('https://example.com')
console.log(result)