{
  "openapi": "3.0.1",
  "info": {
    "title": "PageSpeed + Accessibility Audit - Real Lighthouse Scores",
    "description": "Measure Core Web Vitals, Lighthouse Performance, and Accessibility scores for any website via Google's official PageSpeed Insights API. One row per URL with numeric scores, the full Core Web Vitals set (LCP, CLS, TBT, TTI...), and a ranked list of failing accessibility audits. Pay-per-result.",
    "version": "1.0",
    "x-build-id": "owFNNQUr1yY5fkibo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santamaria-automations~pagespeed-accessibility-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santamaria-automations-pagespeed-accessibility-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/santamaria-automations~pagespeed-accessibility-audit/runs": {
      "post": {
        "operationId": "runs-sync-santamaria-automations-pagespeed-accessibility-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/santamaria-automations~pagespeed-accessibility-audit/run-sync": {
      "post": {
        "operationId": "run-sync-santamaria-automations-pagespeed-accessibility-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": [
          "googleApiKey"
        ],
        "properties": {
          "urls": {
            "title": "Website URLs",
            "type": "array",
            "description": "List of website URLs to audit. Each URL is sent to Google PageSpeed Insights and yields one output row with Performance + Accessibility scores.",
            "items": {
              "type": "string"
            }
          },
          "companies": {
            "title": "Companies (with company_id passthrough)",
            "type": "array",
            "description": "Alternative to `urls`. Each entry carries a company_id that is echoed on the output row, enabling downstream join-back to your CRM or dataset. Combine with `urls` freely.",
            "items": {
              "type": "object",
              "properties": {
                "company_id": {
                  "title": "Company ID",
                  "type": "string",
                  "description": "Your internal identifier - echoed on the output row so you can join audit results back to your source data."
                },
                "website_url": {
                  "title": "Website URL",
                  "type": "string",
                  "description": "The company's website URL to audit."
                }
              },
              "required": [
                "website_url"
              ]
            }
          },
          "googleApiKey": {
            "title": "Google API Key (required)",
            "type": "string",
            "description": "Your Google Cloud API key with the PageSpeed Insights API enabled. Free tier: 25,000 queries per day per Google Cloud project (no credit card required). Get a key in about 3 minutes: (1) Sign in at https://console.cloud.google.com and pick or create a project (skip the billing prompt -- PSI is free). (2) Open the API Library at https://console.cloud.google.com/apis/library, search for 'PageSpeed Insights API', click Enable. (3) Open Credentials at https://console.cloud.google.com/apis/credentials, click 'Create Credentials' -> 'API Key', copy the value. (4) Recommended: edit the key, restrict it to just the PageSpeed Insights API so a leaked key can't be abused. Paste the key here."
          },
          "strategy": {
            "title": "Lighthouse Strategy",
            "enum": [
              "mobile",
              "desktop"
            ],
            "type": "string",
            "description": "Which Lighthouse profile to run. `mobile` matches Google's own default and is the more relevant surface for most local businesses. `desktop` is faster and reports higher scores on average.",
            "default": "mobile"
          },
          "includeExtraCategories": {
            "title": "Include Best Practices + SEO categories",
            "type": "boolean",
            "description": "When enabled, PSI also returns Best Practices and SEO Lighthouse scores in the same API call. Still one PSI call per URL, but the response payload is larger. Off by default to keep runs lean.",
            "default": false
          },
          "outputLanguage": {
            "title": "Output Language",
            "type": "string",
            "description": "Language for PSI audit titles + descriptions (Accessibility issue titles etc.). Uses standard ISO 639-1 codes. Pass any ISO 639-1 language code: en, de, fr, ja, es, pt, it, ko, zh-CN, ar, nl, pl, sv, da, fi, no, cs, hu, ro, el, tr, th, vi, id, and more. Category names in the output stay in English.",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many PSI calls to keep in flight at once. PSI free tier permits 240 queries per minute per project, so 5 concurrent is safely under the limit. Raise to 10 for large batches, lower to 1 if you hit rate limits.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Not used by the audit itself - PageSpeed Insights is a public Google API called directly. Present for schema consistency with sibling add-ons."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}