{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk PageSpeed & Lighthouse Checker: Core Web Vitals Monitor",
    "description": "Bulk-check URLs or a whole sitemap with Google's official PageSpeed Insights API. Lighthouse scores, real-user Core Web Vitals (LCP, INP, CLS) from CrUX and top fixes. Schedule it for regression alerts. $4 per 1,000 checks.",
    "version": "0.1",
    "x-build-id": "92UqmGbN9peAnM2GM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/starwebdigital~pagespeed-core-web-vitals-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-starwebdigital-pagespeed-core-web-vitals-checker",
        "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/starwebdigital~pagespeed-core-web-vitals-checker/runs": {
      "post": {
        "operationId": "runs-sync-starwebdigital-pagespeed-core-web-vitals-checker",
        "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/starwebdigital~pagespeed-core-web-vitals-checker/run-sync": {
      "post": {
        "operationId": "run-sync-starwebdigital-pagespeed-core-web-vitals-checker",
        "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": {
          "apiKey": {
            "title": "Google API key (optional for a 10-check trial)",
            "type": "string",
            "description": "Your own free Google Cloud API key with the <b>PageSpeed Insights API</b> enabled (and optionally the <b>Chrome UX Report API</b> for real-user data). Leave empty to try the Actor on up to <b>10 checks per run</b> (1 check = 1 URL x 1 device) with Datawell's shared key. With your own key there is no limit. Free to create, no billing needed: <a href='https://developers.google.com/speed/docs/insights/v5/get-started' target='_blank'>Google's get-started guide</a>. Stored encrypted, never logged."
          },
          "urls": {
            "title": "URLs to check",
            "type": "array",
            "description": "Pages to test. Full URLs or bare domains (https:// is added). Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL (optional)",
            "pattern": "^(https?://.+)?$",
            "type": "string",
            "description": "Add every page from an XML sitemap (sitemap index and .xml.gz supported). Combined with the URL list above."
          },
          "maxSitemapUrls": {
            "title": "Max URLs from sitemap",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop collecting sitemap URLs after this many.",
            "default": 50
          },
          "maxUrls": {
            "title": "Max URLs per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on the number of URLs checked in one run (each URL is checked once per device strategy). Without your own API key the free trial checks at most 10 URL x device combinations per run.",
            "default": 200
          },
          "strategy": {
            "title": "Device strategy",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "Lighthouse device emulation. 'Both' runs two checks per URL.",
            "default": "mobile"
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Categories to score (0-100).",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "useCruxApi": {
            "title": "Real-user data from the CrUX API",
            "type": "boolean",
            "description": "Fetch 28-day real-user Core Web Vitals (p75) from the Chrome UX Report API with your key; falls back to the field data embedded in PageSpeed Insights if the CrUX API is not enabled on your key.",
            "default": true
          },
          "fieldDataOriginFallback": {
            "title": "Use origin-level field data if a page has none",
            "type": "boolean",
            "description": "When a single page has too little traffic for CrUX, use the whole site's (origin) real-user data instead. The result says which was used.",
            "default": true
          },
          "maxOpportunities": {
            "title": "Top opportunities per check",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the biggest improvement opportunities (with estimated savings) to include.",
            "default": 5
          },
          "locale": {
            "title": "Report language",
            "type": "string",
            "description": "Optional locale for audit titles, e.g. en, de, fr, es."
          },
          "monitorMode": {
            "title": "Monitor mode (regression alerts)",
            "type": "boolean",
            "description": "Remember results between runs (per state key) and flag regressions: a category score drop of at least N points, or a Core Web Vital going from pass to fail. Schedule the Actor daily or weekly.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor state key",
            "type": "string",
            "description": "Name for this monitored set (e.g. a client or site). Runs with the same key compare against each other.",
            "default": "default"
          },
          "minScoreDrop": {
            "title": "Score drop that counts as regression (points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Flag a regression when any category score drops by at least this many points versus the previous run.",
            "default": 5
          },
          "concurrency": {
            "title": "Parallel checks",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many PageSpeed requests run at the same time. Each takes ~10-30 s.",
            "default": 4
          },
          "maxRequestsPerMinute": {
            "title": "Max PageSpeed requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Global rate limit for your key. The Actor also slows down automatically and retries with exponential backoff when Google answers 429.",
            "default": 60
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for rate limits (429), timeouts and transient Google/Lighthouse errors.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout for the PageSpeed Insights API.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}