{
  "openapi": "3.0.1",
  "info": {
    "title": "Lighthouse Audit & Performance Budgets (CI-ready)",
    "description": "Run real Google Lighthouse on public URLs (no API key, no PageSpeed quota): performance, accessibility, best-practices and SEO scores, Core Web Vitals, top fixes, mobile + desktop, median of up to 3 runs, pass/fail performance budgets for CI, and an AI-ready summary. Failed audits are free.",
    "version": "0.1",
    "x-build-id": "8pKPvBUfIQ220ruP1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rationalistic_tail~lighthouse-budget-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rationalistic_tail-lighthouse-budget-auditor",
        "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/rationalistic_tail~lighthouse-budget-auditor/runs": {
      "post": {
        "operationId": "runs-sync-rationalistic_tail-lighthouse-budget-auditor",
        "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/rationalistic_tail~lighthouse-budget-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-rationalistic_tail-lighthouse-budget-auditor",
        "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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to audit",
            "type": "array",
            "description": "Public page URLs, e.g. [\"https://example.com/\"]. Pages disallowed by robots.txt, non-HTML files and error pages are skipped free of charge.",
            "items": {
              "type": "string"
            }
          },
          "devices": {
            "title": "Devices",
            "uniqueItems": true,
            "type": "array",
            "description": "Lighthouse emulation profiles. mobile = Moto G Power + slow 4G (same as PageSpeed Insights mobile); desktop = desktop preset.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile"
            ]
          },
          "categories": {
            "title": "Categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Lighthouse categories to run. Fewer categories = faster audits.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "runsPerUrl": {
            "title": "Runs per URL (median)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Run Lighthouse 1-3 times per URL and device and report the median-performance run, to reduce score noise. Each run is one 'audit-run' event.",
            "default": 1
          },
          "discoverFromSitemap": {
            "title": "Add pages from sitemap",
            "type": "boolean",
            "description": "Also audit pages listed in the first URL's sitemap (from robots.txt or /sitemap.xml), up to maxPages.",
            "default": false
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum distinct URLs audited per run (1-50).",
            "default": 10
          },
          "minPerformance": {
            "title": "Budget: min performance score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Fail the budget when the performance score (0-100) is lower. 0 = no check.",
            "default": 0
          },
          "minAccessibility": {
            "title": "Budget: min accessibility score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100. 0 = no check.",
            "default": 0
          },
          "minBestPractices": {
            "title": "Budget: min best-practices score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100. 0 = no check.",
            "default": 0
          },
          "minSeo": {
            "title": "Budget: min SEO score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100. 0 = no check.",
            "default": 0
          },
          "maxLcpMs": {
            "title": "Budget: max LCP (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Fail when Largest Contentful Paint is slower, e.g. 2500 (Google 'good'). 0 = no check.",
            "default": 0
          },
          "maxTbtMs": {
            "title": "Budget: max TBT (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Fail when Total Blocking Time is higher, e.g. 200. 0 = no check.",
            "default": 0
          },
          "maxCls": {
            "title": "Budget: max CLS",
            "type": "string",
            "description": "Fail when Cumulative Layout Shift is higher, e.g. \"0.1\". Empty or 0 = no check.",
            "default": ""
          },
          "failRunIfBudgetFails": {
            "title": "Fail the run when a budget fails",
            "type": "boolean",
            "description": "For CI/CD: mark the Actor run as FAILED when any audit misses a budget (results are still saved).",
            "default": false
          },
          "maxOpportunities": {
            "title": "Max opportunities per page",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many top performance fixes (with estimated savings) to include per row (0-20).",
            "default": 5
          },
          "saveHtmlReport": {
            "title": "Save HTML reports",
            "type": "boolean",
            "description": "Store the full Lighthouse HTML report per URL and device in the key-value store (REPORT_* keys).",
            "default": false
          },
          "delayBetweenAuditsMs": {
            "title": "Delay between audits (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause between Lighthouse runs (1000-60000 ms). Audits always run one at a time.",
            "default": 3000
          },
          "pageTimeoutSecs": {
            "title": "Page load timeout (s)",
            "minimum": 20,
            "maximum": 120,
            "type": "integer",
            "description": "Max wait for page load per audit (20-120 s).",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}