{
  "openapi": "3.0.1",
  "info": {
    "title": "Lighthouse & PageSpeed Audit: Bulk Core Web Vitals",
    "description": "Run Google's open-source Lighthouse in Chrome on many URLs, without a PageSpeed API key. Get performance, accessibility, best-practices and SEO scores, LCP, CLS and TBT, top fixes, and alerts to Slack, Discord or a webhook when a score drops.",
    "version": "0.1",
    "x-build-id": "jYvPHcQJZOs2FFrVJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fernandosord~lighthouse-page-speed-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fernandosord-lighthouse-page-speed-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/fernandosord~lighthouse-page-speed-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fernandosord-lighthouse-page-speed-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/fernandosord~lighthouse-page-speed-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fernandosord-lighthouse-page-speed-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "urls": {
            "title": "URLs to audit",
            "type": "array",
            "description": "Full URLs of the pages to test, for example your home page, a product page and a blog post. Each URL is audited with Lighthouse in Chrome on the device you pick below. Redirects are followed and reported.",
            "items": {
              "type": "string"
            }
          },
          "formFactor": {
            "title": "Device",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "<b>Mobile</b> emulates a mid-range phone on a slow 4G connection, as PageSpeed Insights does. <b>Desktop</b> emulates a desktop on a fast connection. <b>Both</b> audits every URL twice and is charged twice.",
            "default": "mobile"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Lighthouse categories to score. Leave empty for all four. Performance takes most of the time; the others add a few seconds.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "runsPerUrl": {
            "title": "Lighthouse runs per URL",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Lab scores vary from run to run, often by a few points of performance. With 2 or 3 runs the row reports the median run (the method Lighthouse recommends) and lists every run's performance score. Each run is charged. Applies only when the performance category is scored; otherwise one run is made.",
            "default": 1
          },
          "maxOpportunities": {
            "title": "Opportunities to list",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many performance opportunities (with estimated savings) to include per row, biggest first. 0 leaves them out.",
            "default": 5
          },
          "saveReport": {
            "title": "Save the full report",
            "enum": [
              "none",
              "html",
              "json",
              "both"
            ],
            "type": "string",
            "description": "Save the complete Lighthouse report of each audit to the run's key-value store and add its link to the row. The HTML report is the same one Lighthouse and Chrome DevTools show. Reports are kept as long as the run's storage.",
            "default": "none"
          },
          "stateKey": {
            "title": "Watch list name",
            "type": "string",
            "description": "Scores are saved per watch list, URL and device, and every run is compared with the previous one. Use a different name for each task, so separate lists don't share history. Renaming starts a fresh baseline.",
            "default": "default"
          },
          "scoreDropThreshold": {
            "title": "Alert when a score drops by",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "A row is marked <code>regressed</code> when any category score is this many points lower than in the previous run. Performance often moves 3 to 5 points between runs on its own, so values below 5 cause false alarms.",
            "default": 10
          },
          "lcpIncreasePercent": {
            "title": "Alert when LCP rises by",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A row is also marked <code>regressed</code> when Largest Contentful Paint is this much slower than in the previous run (and at least 100 ms slower).",
            "default": 25
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. When at least one page regressed, the run sends a POST to this https URL: a Slack or Discord incoming-webhook URL, or any endpoint that accepts JSON (Zapier, Make, n8n, your own server). Nothing is sent when nothing regressed."
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack",
              "discord"
            ],
            "type": "string",
            "description": "<b>JSON</b> sends the regressed rows (scores, metrics, regressions and report links, without the opportunity and failed-audit lists). <b>Slack</b> and <b>Discord</b> send a readable message with what dropped and the new scores.",
            "default": "json"
          },
          "notifyOnErrors": {
            "title": "Also notify about pages that failed",
            "type": "boolean",
            "description": "Include pages that could not be audited (not found, blocked, timed out) in the webhook message.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages that the site's robots.txt asks automated visitors not to open. Turn off only for sites you own or have permission to test.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Timeout per Lighthouse run",
            "minimum": 60,
            "maximum": 300,
            "type": "integer",
            "description": "A Lighthouse run that takes longer is stopped and reported as failed (not charged). Lighthouse itself waits at most 45 s for the page to load; the rest is analysis.",
            "default": 90
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}