{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Opportunity Scorer - Local Business Leads",
    "description": "Score local business websites from a Google Maps dataset, URL list or CSV: HTTPS, mobile, old tech, SEO, schema, CTAs. 0-100 score, top reasons, pitch angle.",
    "version": "0.1",
    "x-build-id": "hJKbecCItXyxLn9T4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prevailing_glow~website-opportunity-scorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prevailing_glow-website-opportunity-scorer",
        "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~website-opportunity-scorer/runs": {
      "post": {
        "operationId": "runs-sync-prevailing_glow-website-opportunity-scorer",
        "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~website-opportunity-scorer/run-sync": {
      "post": {
        "operationId": "run-sync-prevailing_glow-website-opportunity-scorer",
        "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": {
          "datasetId": {
            "title": "Google Maps scraper dataset",
            "type": "string",
            "description": "The default dataset of a Google Maps scraper run (e.g. <code>compass/crawler-google-places</code>), or a dataset ID / Console URL. Only business name, category, address, city, website, phone, rating, review count, opening hours, place ID and Maps URL are read: emails, reviews and people data are never read or output."
          },
          "businesses": {
            "title": "Businesses (websites or objects)",
            "type": "array",
            "description": "Websites as strings, or objects such as <code>{\"name\": \"...\", \"category\": \"Kapper\", \"city\": \"Utrecht\", \"website\": \"https://...\", \"rating\": 4.6, \"reviewCount\": 38}</code>. Rows without a website are no-website leads. Google Maps scraper items can be pasted as-is."
          },
          "urls": {
            "title": "Website URLs",
            "type": "array",
            "description": "Plain list of websites, one per line (e.g. <code>example.nl</code>). Google Maps URLs are skipped.",
            "items": {
              "type": "string"
            }
          },
          "csvText": {
            "title": "CSV text",
            "type": "string",
            "description": "Paste CSV with a header row (comma, semicolon or tab). Recognised columns (English/Dutch): name/naam, website/url, category/branche, address/adres, city/plaats, phone/telefoon, rating, reviews, opening hours, place id, maps url. Other columns (e.g. email) are ignored. Without a header every cell that looks like a domain is scored."
          },
          "minScore": {
            "title": "Minimum opportunity score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only output (and charge for) businesses with at least this score. 0 = everything. Filtered rows are still fetched but not charged.",
            "default": 0
          },
          "onlyCategories": {
            "title": "Only these categories",
            "type": "array",
            "description": "Keep only businesses whose category contains one of these words (case-insensitive), e.g. <code>kapper</code>, <code>loodgieter</code>. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "includeNoWebsite": {
            "title": "Include businesses without a website",
            "type": "boolean",
            "description": "Output businesses that have no website or only a Facebook/Instagram/booking page as no-website leads (cheaper event).",
            "default": true
          },
          "skipClosed": {
            "title": "Skip permanently closed businesses",
            "type": "boolean",
            "description": "Skip rows marked permanently closed in the Google Maps data.",
            "default": true
          },
          "maxBusinesses": {
            "title": "Max businesses",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many businesses (after de-duplication and filters). 0 = no limit.",
            "default": 0
          },
          "checkCoreWebVitals": {
            "title": "Check Core Web Vitals (real Chrome users)",
            "type": "boolean",
            "description": "Query the Chrome UX Report for each site's origin (LCP, INP, CLS from real visitors, 28 days). Charged only when CrUX has data for the site (most small local sites have none). Failing sites get extra points.",
            "default": false
          },
          "psiFallback": {
            "title": "PageSpeed Insights lab test when CrUX has no data",
            "type": "boolean",
            "description": "Slow (10-60 s per site). Runs a Lighthouse mobile lab test for sites without CrUX data and charges the same Core Web Vitals event when it returns a score. Best used with your own API key.",
            "default": false
          },
          "googleApiKey": {
            "title": "Your own Google API key",
            "type": "string",
            "description": "Optional. By default the Actor's key is used (shared rate limit). For big runs paste your own key with the <b>Chrome UX Report API</b> (and <b>PageSpeed Insights API</b>) enabled; it is stored encrypted and used only for this run."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Websites checked in parallel.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout per HTTP request. A homepage that does not answer in time counts as not loading.",
            "default": 20
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Override the User-Agent header. Default identifies the Actor."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}