{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Sponsor Register Alerts: Licence Added or Removed",
    "description": "Which UK employers gained or lost a Home Office sponsor licence since the last register update, with rating, routes and town, and a monitoring mode that returns and bills only changes you have not seen.",
    "version": "1.0",
    "x-build-id": "YEMyR8jNEHOz4urME"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/accountable_eel~uk-sponsor-register-change-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-accountable_eel-uk-sponsor-register-change-alerts",
        "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/accountable_eel~uk-sponsor-register-change-alerts/runs": {
      "post": {
        "operationId": "runs-sync-accountable_eel-uk-sponsor-register-change-alerts",
        "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/accountable_eel~uk-sponsor-register-change-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-accountable_eel-uk-sponsor-register-change-alerts",
        "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": {
          "organisationNames": {
            "title": "Employer names to watch (optional)",
            "type": "array",
            "description": "One name or part of a name per line. Only sponsors whose registered name contains one of these are reported. Leave empty to see every sponsor added or removed. Accepted formats: Tesco, Barclays, care. You're only charged for the ones we actually find — a miss costs nothing.",
            "items": {
              "type": "string"
            }
          },
          "changeType": {
            "title": "Which changes",
            "enum": [
              "all",
              "added",
              "removed"
            ],
            "type": "string",
            "description": "Added: organisations that appear on the newer register and not the older one. Removed: the reverse. A sponsor that only moved town is not reported as either.",
            "default": "all"
          },
          "testRun": {
            "title": "Try it first — only process the first 5",
            "type": "boolean",
            "description": "Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.",
            "default": false
          },
          "onlyFound": {
            "title": "Hide rows with no result",
            "type": "boolean",
            "description": "Only keep rows where something was actually found. Misses are always free, whether or not you show them here.",
            "default": false
          },
          "includeKeywords": {
            "title": "Only keep rows containing",
            "type": "array",
            "description": "Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Skip rows containing",
            "type": "array",
            "description": "Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Stop after this many results",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit."
          },
          "route": {
            "title": "Route contains",
            "type": "string",
            "description": "Optional. Keep sponsors holding a route whose name contains this text, for example Skilled Worker, Global Business Mobility or Health. Leave empty for every route.",
            "default": ""
          },
          "towns": {
            "title": "Town or county contains",
            "type": "array",
            "description": "Optional. Keep sponsors whose town or county contains any of these, for example Leeds or Kent. Leave empty for the whole UK.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max changes per run",
            "type": "integer",
            "description": "Up to 5000. Caps how many changes you get (and pay for) in one run. A weekly update can add or remove a few thousand sponsors.",
            "default": 100
          },
          "emitBaseline": {
            "title": "Return a sample of the current register when there are no changes yet",
            "type": "boolean",
            "description": "The Home Office publishes only the current register, so the very first run has nothing to compare. On: that run returns up to Max changes sponsors from the current register as LISTED rows (billed like any row). Off: it only stores the register and returns nothing.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only return changes I have not been given yet (monitoring)",
            "type": "boolean",
            "description": "On: each run returns only the changes from publications after the last one you were given, and a run with no new publication returns and bills nothing. Schedule it daily or weekly. Off: every run returns the latest comparison.",
            "default": false
          },
          "deltaName": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Optional. Name this watchlist's memory so you can tell two schedules of this actor apart, or keep one memory across a filter change. Leave empty to derive one from your filters.",
            "default": ""
          },
          "columns": {
            "title": "Which columns do you want?",
            "type": "array",
            "description": "Choose which pieces of information to include in each result row. All are included by default.",
            "items": {
              "type": "string",
              "enum": [
                "changeSummary",
                "changeCount",
                "truncated",
                "monitorStatus",
                "changes",
                "changeType",
                "organisationName",
                "town",
                "county",
                "holdsSkilledWorkerLicence",
                "rating",
                "licenceTypes",
                "routes",
                "licences",
                "registerDate",
                "previousRegisterDate",
                "registerFileUrl",
                "sourceUrl"
              ],
              "enumTitles": [
                "What was compared",
                "Changes returned",
                "More changes were available",
                "Monitoring status",
                "All changes (full list)",
                "Change",
                "Organisation",
                "Town/City",
                "County",
                "Skilled Worker route",
                "Rating",
                "Licence types",
                "Routes",
                "Licences (full detail)",
                "Register published",
                "Compared with",
                "Register file",
                "Source page"
              ]
            },
            "default": [
              "changeSummary",
              "changeCount",
              "truncated",
              "monitorStatus",
              "changes",
              "changeType",
              "organisationName",
              "town",
              "county",
              "holdsSkilledWorkerLicence",
              "rating",
              "licenceTypes",
              "routes",
              "licences",
              "registerDate",
              "previousRegisterDate",
              "registerFileUrl",
              "sourceUrl"
            ]
          },
          "expandRows": {
            "title": "One row per change (recommended) — turn off for one row per register comparison instead",
            "type": "boolean",
            "description": "When on, each change found gets its own row instead of being grouped under its register comparison. You're still only charged once per register comparison, no matter how many rows it produces.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}