mainwp-lighthouse category. Both use the mainwp/ namespace on your MainWP Dashboard.
Use them to check Lighthouse configuration and audit freshness, or to pull stored scores into reports, scripts, and AI tools. They return data that Lighthouse has already stored. They do not run audits or change settings.
What You’ll Learn
- Read the Lighthouse overview: API key presence, schedule settings, and latest audit times
- List stored desktop and mobile scores for accessible sites
- Page through results and filter by site
- Handle permission and input errors
Prerequisites
- WordPress 6.9 or later on the MainWP Dashboard site
- MainWP Dashboard with Abilities API support; use version 6.2 or later for the
input_jsonexamples below - A Lighthouse Add-on release with Abilities support, active in MainWP Dashboard
- An authenticated user with
manage_optionsand access to the Lighthouse Add-on - Dashboard access to each site you want to read
Available Abilities
Discover the full input and output schemas:
readonly: true, destructive: false, and idempotent: true. Inputs and outputs reject extra properties.
Read the Lighthouse Overview
Ability:mainwp/get-lighthouse-overview-v1Method: GET
Input: None
api_key_configured reports only that a key is stored. It does not validate the key, and the response never includes the key itself. cron_working describes the current request context only. It is not a cron health check, so it is normally false for API calls.List Site Results
Ability:mainwp/list-lighthouse-site-results-v1Method: GET
All inputs must be positive JSON integers.
sites, total, page, and per_page. total counts every accessible site with stored Lighthouse records, not only the current page. Sites are ordered by site ID. Request the next page until you have read total results.
Each site contains:
A
null score or audit time means Lighthouse has no stored value for that strategy. For example, the strategy may not be configured, or the site has not been audited yet. If no results are stored, the ability returns an empty sites array with total: 0.
The response does not include site URLs, API keys, notification emails, or raw audit data. To run a new audit, use the Lighthouse Dashboard, WP-CLI, or the Lighthouse REST API, then read the results again.
Handle Errors
MainWP Dashboard returns HTTP 401 for unauthenticated requests. WordPress can also reject invalid input against the public schema before the Add-on callback runs.
Related Resources
- Lighthouse - Setup, audits, schedules, and settings
- Abilities API Overview - Authentication and request formats
