{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk PageSpeed Insights: Core Web Vitals Audit",
    "description": "Bulk Google PageSpeed Insights audit with your own API key: Lighthouse scores, LCP, INP, CLS from Chrome UX Report, top fixes, mobile and desktop, sitemap input and change monitoring. Failed URLs are free.",
    "version": "1.0",
    "x-build-id": "PKJL75lAjkGmSkYTU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/araluma~pagespeed-bulk-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-araluma-pagespeed-bulk-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/araluma~pagespeed-bulk-audit/runs": {
      "post": {
        "operationId": "runs-sync-araluma-pagespeed-bulk-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/araluma~pagespeed-bulk-audit/run-sync": {
      "post": {
        "operationId": "run-sync-araluma-pagespeed-bulk-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",
        "required": [
          "apiKey"
        ],
        "properties": {
          "apiKey": {
            "title": "Google API key",
            "type": "string",
            "description": "Your own Google API key with the PageSpeed Insights API enabled (free: Google Cloud Console, APIs and Services, enable PageSpeed Insights API, Credentials, Create API key). Google answers requests without a key from shared cloud IPs with HTTP 429, so a key is required. The key is stored as a secret and never written to the dataset or the log."
          },
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Pages to audit, one per line. https:// is added when missing. Duplicates are audited once. Use a sitemap below for whole sites.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "Optional. XML sitemaps or sitemap indexes (plain or .gz). Their pages are added to the list above, up to the cap below.",
            "items": {
              "type": "string"
            }
          },
          "maxSitemapUrls": {
            "title": "Max URLs read from sitemaps",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stops reading sitemaps after this many URLs. Each URL is one audit per strategy, so this is also a cost cap.",
            "default": 100
          },
          "maxUrls": {
            "title": "Max URLs per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on distinct URLs audited in this run, after duplicates are removed. Extra URLs are skipped and mentioned in the status message.",
            "default": 100
          },
          "strategy": {
            "title": "Device",
            "enum": [
              "mobile",
              "desktop",
              "both"
            ],
            "type": "string",
            "description": "mobile is what Google uses for ranking. both runs every URL twice and creates two rows per URL (two audits).",
            "default": "mobile"
          },
          "categories": {
            "title": "Lighthouse categories",
            "type": "array",
            "description": "Scores to return. Performance is always run because lab metrics, field data and monitor mode need it. Extra categories make each audit a little slower, not more expensive.",
            "items": {
              "type": "string",
              "enum": [
                "performance",
                "accessibility",
                "best-practices",
                "seo"
              ],
              "enumTitles": [
                "Performance",
                "Accessibility",
                "Best practices",
                "SEO"
              ]
            },
            "default": [
              "performance"
            ]
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Language of the fix titles, for example en, pt-BR, de, fr, es. Numbers and field data do not change.",
            "default": "en"
          },
          "topOpportunities": {
            "title": "Fixes listed per row",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the largest suggested fixes go into topOpportunities and topDiagnostics. 0 leaves both empty.",
            "default": 5
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Audits Google runs for you at the same time. Each takes 10 to 40 seconds. The default free quota of a key is about 240 requests per minute; 5 is safe and 10 to 20 finish big lists faster. A rate limit is retried with back-off.",
            "default": 5
          },
          "saveRawJson": {
            "title": "Save the raw Lighthouse JSON",
            "type": "boolean",
            "description": "Stores Google's full response (without screenshots) per audit in the key-value store, key in the rawJsonKey field. Each response is 0.5 to 2 MB. Off by default.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Compare with the previous run of the same input and return only URLs whose performance score or Core Web Vitals changed status (good, needs improvement, poor) or moved more than the thresholds below, with old and new values. You pay for every completed audit, returned or not.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. By default the previous run is the last one with the same URLs, sitemaps, device, categories and locale. A name lets you change the URL list and keep the history."
          },
          "minScoreChange": {
            "title": "Monitor: score threshold (points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Report a performance score that moved by at least this many points. Lab scores drift a few points between runs of the same page, so 10 is a sensible floor.",
            "default": 10
          },
          "minFieldChangePercent": {
            "title": "Monitor: field metric threshold (%)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Report a field LCP, INP or CLS value that moved by at least this percentage, even when its status did not change.",
            "default": 10
          },
          "reportNewUrls": {
            "title": "Monitor: return URLs seen for the first time",
            "type": "boolean",
            "description": "On the first run nothing is stored, so every URL is new. Turn this off to keep the first run silent and only store the baseline.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}