{
  "openapi": "3.0.1",
  "info": {
    "title": "Core Web Vitals Tracker - CrUX History & Benchmark",
    "description": "Benchmark Core Web Vitals (LCP, INP, CLS) of your sites vs competitors from real Chrome user data: pass/fail, 40-week CrUX history, trends, regression alerts.",
    "version": "0.1",
    "x-build-id": "4Qb5WTixV9wwAe6cR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prevailing_glow~core-web-vitals-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prevailing_glow-core-web-vitals-tracker",
        "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/prevailing_glow~core-web-vitals-tracker/runs": {
      "post": {
        "operationId": "runs-sync-prevailing_glow-core-web-vitals-tracker",
        "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/prevailing_glow~core-web-vitals-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-prevailing_glow-core-web-vitals-tracker",
        "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": "Your sites",
            "type": "array",
            "description": "Origins or URLs of your own sites, one per line, e.g. <code>https://www.example.com</code> or <code>example.com</code>. Marked as <b>you</b> in the benchmark. Each site with data is one billable site check (phone and desktop together).",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitor sites",
            "type": "array",
            "description": "Competitor origins or URLs, one per line. Ranked together with your sites.",
            "items": {
              "type": "string"
            }
          },
          "formFactors": {
            "title": "Devices",
            "type": "array",
            "description": "Which devices to report. Each device is a separate row per site. Phone and desktop are billed together as one site check.",
            "items": {
              "type": "string",
              "enum": [
                "PHONE",
                "DESKTOP"
              ],
              "enumTitles": [
                "Phone",
                "Desktop"
              ]
            },
            "default": [
              "PHONE",
              "DESKTOP"
            ]
          },
          "mode": {
            "title": "Level",
            "enum": [
              "origin",
              "url"
            ],
            "type": "string",
            "description": "<b>Origin</b>: all pages of the site together (what Search Console and most benchmarks use; much more sites have data). <b>URL</b>: only the exact page you entered (e.g. a landing page or product page; needs a lot of traffic to have data).",
            "default": "origin"
          },
          "includeHistory": {
            "title": "Include 40-week history, trends and regressions",
            "type": "boolean",
            "description": "Load up to 40 weekly data points from the CrUX History API: change vs 4 and 12 weeks ago, trend, weeks passing, regression alerts with dates, and sparklines in the report. Billed as one extra history report per site.",
            "default": true
          },
          "tryWwwVariant": {
            "title": "Try the www / non-www variant when a site has no data",
            "type": "boolean",
            "description": "CrUX stores data under the origin users actually land on. If <code>example.com</code> has no data, <code>www.example.com</code> is tried (and vice versa). Origin level only.",
            "default": true
          },
          "labAudit": {
            "title": "Run PageSpeed Insights lab audits",
            "type": "boolean",
            "description": "Also run a Lighthouse lab test via the PageSpeed Insights API for a few URLs: performance score, lab LCP / TBT / CLS and the top 5 opportunities. Takes 10-60 s per URL. Billed per successful audit.",
            "default": false
          },
          "labAuditUrls": {
            "title": "URLs to lab-audit",
            "type": "array",
            "description": "Pages to test, one per line. Leave empty to test the homepage of the first sites in the list (up to the limit below).",
            "items": {
              "type": "string"
            }
          },
          "labStrategy": {
            "title": "Lab audit device",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "Mobile (Google's default, slow 4G + mid-range phone), desktop, or both (two audits per URL).",
            "default": "mobile"
          },
          "maxLabAudits": {
            "title": "Max URLs to lab-audit",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper limit on lab-audited URLs per run.",
            "default": 5
          },
          "regressionThresholdPct": {
            "title": "Regression threshold (%)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Flag a regression when the p75 of LCP, INP or CLS is this many percent worse than 4 weeks earlier (non-overlapping 28-day windows). A metric that crosses into a worse status (good → needs improvement → poor) is always flagged.",
            "default": 15
          },
          "regressionMinLcpMs": {
            "title": "Minimum LCP change (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Ignore LCP changes smaller than this. Crossing into a worse status (e.g. good → needs improvement) is flagged from half this change.",
            "default": 150
          },
          "regressionMinInpMs": {
            "title": "Minimum INP change (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Ignore INP changes smaller than this.",
            "default": 25
          },
          "regressionMinCls": {
            "title": "Minimum CLS change",
            "type": "string",
            "description": "Ignore CLS changes smaller than this (e.g. <code>0.05</code>).",
            "default": "0.05"
          },
          "googleApiKey": {
            "title": "Google API key",
            "type": "string",
            "description": "Optional. By default the Actor uses its own key, which has 150 queries/min shared by all users. For big or scheduled runs, create a free key in Google Cloud with the <b>Chrome UX Report API</b> (and <b>PageSpeed Insights API</b> for lab audits) enabled and paste it here: it is stored encrypted, used only for this run and replaces ours. Allows up to 2,000 sites per run."
          },
          "maxQueriesPerMinute": {
            "title": "Max CrUX queries per minute",
            "minimum": 10,
            "maximum": 150,
            "type": "integer",
            "description": "Pace of CrUX API queries. Google allows 150/min per Google Cloud project. Values above 120 are only used with your own key.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}