{
  "openapi": "3.0.1",
  "info": {
    "title": "PageSpeed Insights & Core Web Vitals Monitor",
    "description": "Monitor PageSpeed Insights and real-user Core Web Vitals weekly. Automatic baselines, up to 3 Lighthouse samples, and regression flags. No Google API key needed. Failed audits are free.",
    "version": "0.1",
    "x-build-id": "4qm2NdUK7qI4LoluA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smartlinks~pagespeed-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smartlinks-pagespeed-change-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/smartlinks~pagespeed-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-smartlinks-pagespeed-change-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/smartlinks~pagespeed-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-smartlinks-pagespeed-change-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Public page URLs",
            "type": "array",
            "description": "Public pages you have permission to audit. Public queries are kept, including utm_* parameters. Sensitive parameter names, emails, JWTs and long high-entropy values are rejected. No credentials or personal URLs. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "strategy": {
            "title": "Device",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "Both produces two separate audits per unique URL.",
            "default": "mobile"
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Requested scores; snapshot comparison requires the same category selection.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "apiKey": {
            "title": "PageSpeed Insights API key",
            "type": "string",
            "description": "Optional: your own Google API key. Leave empty to use the built-in key (up to 500 URLs per run); your key allows up to 1000. Never copied to results or logs."
          },
          "previousDatasetId": {
            "title": "Previous dataset (baseline)",
            "type": "string",
            "description": "Dataset of an earlier run of this Actor, used as the before side of the comparison. Read-only access is granted to this dataset only. Do not combine with previousResults."
          },
          "previousResults": {
            "title": "Inline previous results (local testing)",
            "type": "array",
            "description": "Prior rows from this Actor. Use instead of previousDatasetId."
          },
          "regressionThresholds": {
            "title": "Change thresholds",
            "type": "object",
            "description": "Positive magnitudes keyed by scores.* or labMetrics.*. Defaults: 5 performance points, 500 ms LCP, 0.05 CLS. Same thresholds apply to improvements."
          },
          "monitorId": {
            "title": "Monitor identity",
            "type": "string",
            "description": "Optional stable ID (letters, digits, underscores or hyphens). Default: hash of normalized URL set and device selection. Separate IDs isolate monitors."
          },
          "fieldRegressionCheck": {
            "title": "Check field Core Web Vitals regressions",
            "type": "boolean",
            "description": "Optional: flag worse LCP, INP or CLS ratings only when the baseline has the same field-data source (URL or origin). CrUX covers a rolling 28 days; disabled by default. Lab checks are unchanged.",
            "default": false
          },
          "samples": {
            "title": "Samples per URL/device",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Each successful sample is billed as an audit ($0.004). Median and observed ranges; all samples must succeed.",
            "default": 1
          },
          "maxAudits": {
            "title": "Maximum Google calls per run",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "Includes samples and retries. Built-in key: up to 1000 Google calls per run; own key up to 6000.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Maximum concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Bounded per run.",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Bounded per run.",
            "default": 120
          },
          "maxUrls": {
            "title": "Maximum unique URLs",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap after deduplication. Built-in key: capped at 500 (1000 audits with both devices); your own key: up to 1000 URLs. Excess URLs are counted in OUTPUT.",
            "default": 100
          },
          "maxRunSecs": {
            "title": "Run audit deadline (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "Overall audit deadline including setup and restarts. Also stops audit work 30 seconds before the platform timeout to allow delivery and OUTPUT to be saved.",
            "default": 3000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}