{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk PageSpeed Insights & Core Web Vitals History",
    "description": "Bulk Core Web Vitals for any URL: Lighthouse scores, real-user LCP/INP/CLS and up to 40 weeks of CrUX history with trends. Built-in API key. Pay per URL.",
    "version": "0.1",
    "x-build-id": "g2qsyoVop4G7h6pz8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/durance_dev~core-web-vitals-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-durance_dev-core-web-vitals-history",
        "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/durance_dev~core-web-vitals-history/runs": {
      "post": {
        "operationId": "runs-sync-durance_dev-core-web-vitals-history",
        "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/durance_dev~core-web-vitals-history/run-sync": {
      "post": {
        "operationId": "run-sync-durance_dev-core-web-vitals-history",
        "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 or domains",
            "type": "array",
            "description": "Pages (https://example.com/pricing) or bare domains (example.com). A bare domain is checked as the whole origin. Max 5,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "full",
              "fieldOnly",
              "labOnly"
            ],
            "type": "string",
            "description": "Full = lab audit + real-user data + history. Field only = real-user data + history, about 3x faster and cheaper (good for prospect lists). Lab only = PageSpeed/Lighthouse audit.",
            "default": "full"
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "mobile = PageSpeed strategy 'mobile' + CrUX formFactor PHONE; desktop = 'desktop' + DESKTOP. Each device is one output row and is charged separately.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "desktop"
              ],
              "enumTitles": [
                "Mobile",
                "Desktop"
              ]
            },
            "default": [
              "mobile"
            ]
          },
          "includeHistory": {
            "title": "Include real-user history (CrUX History API)",
            "type": "boolean",
            "description": "Weekly 28-day p75 values for LCP, INP and CLS, with an improving / stable / worsening verdict per metric.",
            "default": true
          },
          "historyWeeks": {
            "title": "History length (weekly periods)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "1 to 40 weekly periods (40 = about 10 months). Google updates the history every Monday.",
            "default": 25
          },
          "fieldScope": {
            "title": "Real-user data scope",
            "enum": [
              "auto",
              "url",
              "origin"
            ],
            "type": "string",
            "description": "auto = page-level data if Google has it, otherwise the whole origin (the output says which).",
            "default": "auto"
          },
          "lighthouseCategories": {
            "title": "Lighthouse categories (lab)",
            "type": "array",
            "description": "Performance is always included because the lab metrics come from it.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance",
              "accessibility",
              "best-practices",
              "seo"
            ]
          },
          "onlyChanges": {
            "title": "Monitor mode: return only changes",
            "type": "boolean",
            "description": "Remembers the previous result per watch list and returns a row only when the Core Web Vitals status, a metric rating or a trend changed. Schedule the Actor weekly for alerts.",
            "default": false
          },
          "watchName": {
            "title": "Watch list name (monitor mode)",
            "pattern": "^[a-zA-Z0-9-]{1,40}$",
            "type": "string",
            "description": "Letters, digits and dashes. Use one name per client or project.",
            "default": "default"
          },
          "compactOutput": {
            "title": "Compact output (for AI agents and spreadsheets)",
            "type": "boolean",
            "description": "Flat row with about 30 key fields; drops audit details and the weekly series (keeps the trend verdicts).",
            "default": false
          },
          "googleApiKey": {
            "title": "Your Google API key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use the built-in key. Add your own key (PageSpeed Insights API + Chrome UX Report API enabled) for large or scheduled jobs; your own key never runs out of shared quota."
          },
          "maxConcurrency": {
            "title": "Max parallel lab audits",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "PageSpeed audits in flight at once. Real-user (CrUX) calls are always paced under Google's 150 per minute limit.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}