Google Lighthouse API
Automate website performance auditing using the Google Lighthouse.Retrieve Core Web Vitals, Accessibility scores, and SEO metrics to monitor site health and improve search rankings.
Ready-to-use code snippets
import requests
url = "https://api.geekflare.com/lighthouse"
payload = {"url": "https://example.com", "device": "desktop"}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Why Geekflare Lighthouse API
Core Web Vitals
Get field data for LCP, CLS, and INP to ensure you pass Google's ranking signals.
Multi-Device Simulation
Run audits on Mobile or Desktop viewports.
Comprehensive Audits
Run checks across Performance, Accessibility, Best Practices, SEO, and PWA categories.
Multi-Format Reporting
Get structured JSON to integrate metrics into your applications, or generate a ready-to-view HTML report.
No Infra Headaches
Running Lighthouse requires managing headless browsers and heavy server resources.
Customizable Audit Scope
Check specific categories or individual audits to get precise data without parsing the full report.
Build more with Geekflare
Extract Metadata
Frequently Asked Questions
Running it in Chrome is manual and depends on your local computer's speed and internet. Our API runs it on cloud servers, allowing you to automate thousands of checks with comparable environments.
Yes. You can specify the device parameter to switch between Mobile and Desktop (default) emulation to see how scores differ.
Because Lighthouse audits are resource-intensive tasks, they consume 10 credits per request.
Scores can vary based on network conditions and server load at the exact moment of testing.