{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk PageSpeed & Lighthouse Audit (Core Web Vitals)",
    "description": "Audit many URLs or a whole sitemap with Google Lighthouse in one run: mobile + desktop, Core Web Vitals PASS/FAIL, top 5 fixes as columns, failed SEO/accessibility checks, and score changes vs your last run. No API key needed.",
    "version": "0.1",
    "x-build-id": "dzu3J8B6MYsudxeXu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ikas~bulk-pagespeed-lighthouse-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ikas-bulk-pagespeed-lighthouse-audit",
        "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/ikas~bulk-pagespeed-lighthouse-audit/runs": {
      "post": {
        "operationId": "runs-sync-ikas-bulk-pagespeed-lighthouse-audit",
        "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/ikas~bulk-pagespeed-lighthouse-audit/run-sync": {
      "post": {
        "operationId": "run-sync-ikas-bulk-pagespeed-lighthouse-audit",
        "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": "One page per line. https:// is added if missing. Each URL x device is one billable audit. Audits run one at a time (about 140 per hour; heavy pages are slower).",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrl": {
            "title": "Or audit pages from a sitemap",
            "type": "string",
            "description": "e.g. https://example.com/sitemap.xml (sitemap index files are followed). Combined with the URL list."
          },
          "maxSitemapUrls": {
            "title": "Max pages from sitemap",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Takes the first N page URLs from the sitemap.",
            "default": 25
          },
          "maxUrls": {
            "title": "Max URLs per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on pages per run. Audits run sequentially at roughly 140 per hour, so 25 URLs x 2 devices takes about 20-25 minutes. For bigger lists, raise the run timeout (default 4 h, enough for about 250 URLs x 2 devices) or split the list.",
            "default": 25
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "Mobile, desktop, or both in one run (one row each).",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile (Moto G Power, slow 4G)",
                "Desktop"
              ]
            },
            "default": [
              "mobile",
              "desktop"
            ]
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Leave all four for full scores. Fewer categories run slightly faster (same price).",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "compareToPrevious": {
            "title": "Compare with my previous run",
            "type": "boolean",
            "description": "Adds score deltas, LCP change and a regression flag per URL + device, using a named store in your account. Great with a weekly schedule.",
            "default": false
          },
          "regressionThreshold": {
            "title": "Regression threshold (points)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Flag a regression when any category score drops by at least this many points (or CWV goes PASS to FAIL). Lab scores on heavy pages can swing 20+ points between runs, so 10-15 is recommended.",
            "default": 10
          },
          "confirmRegressions": {
            "title": "Confirm regressions with 2 re-runs (median of 3)",
            "type": "boolean",
            "description": "When a drop is detected, re-audit that page twice and use the median before flagging it. Cuts false alarms from lab noise. Re-runs are not billed extra (still one audit), but take more time.",
            "default": true
          },
          "historyStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Named key-value store that keeps the last scores. Use different names for separate projects/clients.",
            "default": "lighthouse-audit-history"
          },
          "minPerformanceScore": {
            "title": "Performance budget (optional)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Adds passesBudget = performance score >= this value."
          },
          "saveHtmlReport": {
            "title": "Save full HTML Lighthouse report",
            "type": "boolean",
            "description": "Stores the standard Lighthouse HTML report per audit and adds a link to the row.",
            "default": false
          },
          "psiApiKey": {
            "title": "Your own PageSpeed Insights API key (UNTESTED beta)",
            "type": "string",
            "description": "UNTESTED BETA - leave empty (recommended) to run Lighthouse inside this actor. If you add YOUR OWN Google PSI key, audits go through Google's API under your key and rows also include real-user (CrUX) field data when Google has it. This mode has not yet been verified end-to-end; failed audits are not billed."
          },
          "canaryMode": {
            "title": "Canary self-test (maintainer)",
            "type": "boolean",
            "description": "Audits one known page and fails the run if any metric is missing. Not billed.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}