{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Visa Sponsor Register Scraper: Home Office Sponsor Monitor",
    "description": "UK visa sponsor licence register monitor: the Home Office Register of Licensed Sponsors with new, removed and downgraded sponsors by town and route, for Skilled Worker job leads and recruiters. CSV or JSON. By RawTrader | UK Industry & Bills",
    "version": "0.2",
    "x-build-id": "UiwhEb8YCVD9e60MT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seaf999ield~uk-visa-sponsor-register-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seaf999ield-uk-visa-sponsor-register-monitor",
        "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/seaf999ield~uk-visa-sponsor-register-monitor/runs": {
      "post": {
        "operationId": "runs-sync-seaf999ield-uk-visa-sponsor-register-monitor",
        "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/seaf999ield~uk-visa-sponsor-register-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-seaf999ield-uk-visa-sponsor-register-monitor",
        "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": {
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "State is saved under this name (named key-value store uk-sponsor-monitor-<name>), so you can run separate monitors, e.g. one per client. Changes are computed against the previous run with the same name. A new name starts a new baseline.",
            "default": "default"
          },
          "towns": {
            "title": "Towns / cities",
            "type": "array",
            "description": "Only report changes for these towns (case-insensitive, partial match, e.g. 'London', 'Manchester'). Empty = all UK.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "routes": {
            "title": "Visa routes",
            "type": "array",
            "description": "Partial match on route, e.g. 'Skilled Worker', 'Global Business Mobility', 'Scale-up', 'Creative Worker'. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ratings": {
            "title": "Ratings",
            "type": "array",
            "description": "Partial match on type & rating, e.g. 'A rating', 'B rating', 'Temporary Worker'. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "changeTypes": {
            "title": "Change types",
            "type": "array",
            "description": "Which changes to output. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "SPONSOR_ADDED",
                "SPONSOR_REMOVED",
                "ROUTE_ADDED",
                "ROUTE_REMOVED",
                "RATING_CHANGED"
              ],
              "enumTitles": [
                "Sponsor added",
                "Sponsor removed",
                "Route added",
                "Route removed",
                "Rating changed (e.g. A → B)"
              ]
            },
            "default": []
          },
          "organisationsOnly": {
            "title": "Organisations only (exclude likely individuals)",
            "type": "boolean",
            "description": "Skip register entries that look like a private individual's name (e.g. sole traders) rather than an organisation. Heuristic; recommended for GDPR data-minimisation.",
            "default": true
          },
          "outputSnapshotOnFirstRun": {
            "title": "Output full list on first run",
            "type": "boolean",
            "description": "On the first (baseline) run for a monitor name, also output every matching sponsor route as a SNAPSHOT row (billed per row; use filters to keep it small — the full register is ~140k rows). Off = the baseline run outputs nothing and only saves state.",
            "default": false
          },
          "minSeverity": {
            "title": "Minimum severity",
            "enum": [
              "info",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Only output rows at or above this severity. high = sponsor removed or rating downgraded (A → B); medium = a route removed or other rating change; info = additions, upgrades, snapshot rows. Default 'info' outputs everything.",
            "default": "info"
          },
          "maxSnapshotRows": {
            "title": "Max snapshot rows",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on SNAPSHOT rows output on a baseline run with 'Output full list on first run' on. 0 = no cap.",
            "default": 0
          },
          "enrichWithCompaniesHouse": {
            "title": "Enrich with Companies House",
            "type": "boolean",
            "description": "Optional, off by default. Match each output row's organisation name to Companies House (official search API) and add company number, status, type, SIC codes, incorporation date and an insolvency flag. Company-level data only: no officers or personal data. Rows with a confident match are billed an extra 'enriched-row' event ($0.004); unmatched rows are not billed for enrichment.",
            "default": false
          },
          "maxEnrichments": {
            "title": "Max organisations to enrich",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper limit on Companies House lookups (distinct organisations) per run; rows beyond it are output without enrichment. Each lookup takes ~2 API calls and the API allows 600 calls per 5 minutes, so large numbers slow the run.",
            "default": 500
          },
          "companiesHouseApiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use the actor's built-in key. Supply your own free key (developer.company-information.service.gov.uk) for large runs to get your own rate limit."
          },
          "csvUrl": {
            "title": "Register CSV URL (advanced)",
            "type": "string",
            "description": "Advanced/testing: a direct URL to a register CSV. Leave empty to auto-discover the latest official file from GOV.UK.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}