{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Regulatory Compliance Status Watchdog",
    "description": "Monitors a fixed watch list of known UK businesses for regulatory status changes — Companies House filing status/dissolution, CQC inspection ratings, and FCA firm registration status. A compliance monitor for suppliers and partners you already know, not a lead-generation tool.",
    "version": "1.0",
    "x-build-id": "YkDrY7PkPlGsnmfPU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/conceivable_extension~uk-compliance-status-watchdog/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-conceivable_extension-uk-compliance-status-watchdog",
        "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/conceivable_extension~uk-compliance-status-watchdog/runs": {
      "post": {
        "operationId": "runs-sync-conceivable_extension-uk-compliance-status-watchdog",
        "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/conceivable_extension~uk-compliance-status-watchdog/run-sync": {
      "post": {
        "operationId": "run-sync-conceivable_extension-uk-compliance-status-watchdog",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "watchlist_monitor",
              "prospect_discovery"
            ],
            "type": "string",
            "description": "watchlist_monitor (default): compliance monitoring for a fixed list of known entities — insurance/risk buyers. prospect_discovery (addendum): sweep a region/SIC-code slice of Companies House for new signal-worthy companies — lead-gen buyers. These are two different jobs on the same data; pick one per run.",
            "default": "watchlist_monitor"
          },
          "watchList": {
            "title": "Watch List",
            "type": "array",
            "description": "Required when mode is watchlist_monitor. One entry per entity to monitor. Fields: companyNumber (Companies House), cqcLocationId (CQC), fcaFirmReferenceNumber (FCA), entityName (optional, for readable output), checkCompaniesHouse/checkCQC/checkFCA (booleans — only run the checks you have the matching ID for). Example: [{ \"companyNumber\": \"12345678\", \"checkCompaniesHouse\": true }, { \"cqcLocationId\": \"1-XXXXXXXXX\", \"checkCQC\": true }]"
          },
          "discoveryFilters": {
            "title": "Discovery Filters",
            "type": "object",
            "description": "Required when mode is prospect_discovery. Needs at least one of region or sicCodes. { region?: string, sicCodes?: string[], signalTypes?: (\"new_incorporation\"|\"director_change\"|\"new_charge\"|\"sic_change\"|\"rapid_filing_activity\"|\"dissolution_risk\")[] (default: [\"new_incorporation\"]), minCompanyAge?: number (days, default 0), maxCompanyAge?: number (days, default 7), maxCompanies?: number (default 50, hard-capped at 200 — an unscoped sweep can match hundreds of thousands of companies) }. `region` is a real-but-imprecise text match against Companies House's own search (confirmed live) plus an exact client-side locality check on top — see README."
          },
          "alertOnAnyChange": {
            "title": "Log Full Status Every Run",
            "type": "boolean",
            "description": "Off (default): only push a dataset row when a status change is actually detected. On: push a full status row for every watched entity on every run, not just changes.",
            "default": false
          },
          "companiesHouseApiKey": {
            "title": "Companies House API Key",
            "type": "string",
            "description": "Free key from developer.company-information.service.gov.uk. Required for any watchList entry with checkCompaniesHouse: true — the API rejects unauthenticated requests."
          },
          "cqcSubscriptionKey": {
            "title": "CQC API Subscription Key",
            "type": "string",
            "description": "Optional key from api-portal.service.cqc.org.uk. Some CQC public endpoints work without one; if checks fail with an auth error, register for a free key and set this."
          },
          "fcaAuthEmail": {
            "title": "FCA Register API Auth Email",
            "type": "string",
            "description": "Free credential pair from register.fca.org.uk/Developer. Required for any watchList entry with checkFCA: true."
          },
          "fcaAuthKey": {
            "title": "FCA Register API Auth Key",
            "type": "string",
            "description": "Paired with fcaAuthEmail. Required for any watchList entry with checkFCA: 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}