{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Visa Sponsor Register: Licensed Sponsors & Changes Feed",
    "description": "Licensed UK visa sponsors from the official GOV.UK register (Worker and Temporary Worker), filtered by route, town, rating and name, plus a changes feed of sponsors added, removed or re-rated since your last run. Not affiliated with or endorsed by GOV.UK or the Home Office.",
    "version": "1.0",
    "x-build-id": "Pz6CS2WN2MgPwkzIm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearpath-data~uk-visa-sponsor-register/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearpath-data-uk-visa-sponsor-register",
        "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/clearpath-data~uk-visa-sponsor-register/runs": {
      "post": {
        "operationId": "runs-sync-clearpath-data-uk-visa-sponsor-register",
        "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/clearpath-data~uk-visa-sponsor-register/run-sync": {
      "post": {
        "operationId": "run-sync-clearpath-data-uk-visa-sponsor-register",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "register",
              "changes"
            ],
            "type": "string",
            "description": "\"Register\" returns sponsors from the current GOV.UK register of licensed sponsors (Worker and Temporary Worker), filtered as you choose. \"Changes\" returns sponsors added, removed or with a changed rating since your last run (or since an earlier dataset).",
            "default": "register"
          },
          "routes": {
            "title": "Visa routes",
            "type": "array",
            "description": "Keep only these sponsorship routes, as named in the register. Leave empty for all routes.",
            "items": {
              "type": "string",
              "enum": [
                "Skilled Worker",
                "Global Business Mobility: Senior or Specialist Worker",
                "Global Business Mobility: Graduate Trainee",
                "Global Business Mobility: UK Expansion Worker",
                "Global Business Mobility: Service Supplier",
                "Global Business Mobility: Secondment Worker",
                "Scale-up",
                "Creative Worker",
                "Charity Worker",
                "Religious Worker",
                "Tier 2 Ministers of Religion",
                "International Sportsperson",
                "Government Authorised Exchange",
                "International Agreement",
                "Seasonal Worker",
                "Intra Company Transfers (ICT)",
                "Intra-company Routes",
                "Tier 2 General"
              ]
            },
            "default": []
          },
          "towns": {
            "title": "Towns / counties",
            "type": "array",
            "description": "Keep sponsors whose Town/City or County contains one of these as a whole word, case-insensitive. \"London\" matches \"London\", \"Croydon, London\" and \"Greater London\", but not \"Londonderry\". Leave empty for everywhere.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ratings": {
            "title": "Ratings",
            "type": "array",
            "description": "Keep only these sponsor ratings. B-rated sponsors are on an action plan to fix compliance issues. Leave empty for all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "A rating",
                "B rating",
                "A (Premium)",
                "A (SME+)",
                "UK Expansion Worker: Provisional"
              ],
              "enumTitles": [
                "A rating",
                "B rating",
                "A (Premium)",
                "A (SME+)",
                "UK Expansion Worker: Provisional"
              ]
            },
            "default": []
          },
          "licenceTypes": {
            "title": "Licence type",
            "type": "array",
            "description": "Worker (e.g. Skilled Worker) or Temporary Worker (e.g. Creative, Charity, Seasonal). Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "Worker",
                "Temporary Worker"
              ]
            },
            "default": []
          },
          "nameContains": {
            "title": "Organisation name contains",
            "type": "array",
            "description": "Keep sponsors whose name contains any of these texts (case-insensitive), e.g. \"NHS\", \"University\", \"Care\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nameExcludes": {
            "title": "Organisation name excludes",
            "type": "array",
            "description": "Skip sponsors whose name contains any of these texts (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format (Register mode)",
            "enum": [
              "listings",
              "organisations"
            ],
            "type": "string",
            "description": "\"One row per listing\" keeps the register's layout: a sponsor licensed for two routes appears twice. \"One row per organisation\" merges listings of the same organisation in the same town and county into one row with a list of routes and ratings. You pay per saved row either way.",
            "default": "listings"
          },
          "changeTypes": {
            "title": "Change types",
            "type": "array",
            "description": "Which changes to return. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "added",
                "removed",
                "rating_changed"
              ]
            },
            "default": []
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "The register version from the last run is saved under this name in a key-value store named \"uk-visa-sponsor-register-state\" in your account, and the next run compares against it. Use a different name per schedule or task. Letters, digits and hyphens.",
            "default": "default"
          },
          "baselineDatasetId": {
            "title": "Compare with dataset (optional)",
            "type": "string",
            "description": "Instead of the saved state, compare with the dataset of an earlier Register run of this Actor. Use a complete run (not cut off by Max results) with the same filters, or listings outside it are reported as added or removed."
          },
          "updateState": {
            "title": "Save this run as the new baseline",
            "type": "boolean",
            "description": "After all changes are saved, store the current register under the state name so the next run starts from here. Not done when the run stops early (Max results or max cost).",
            "default": true
          },
          "firstRunRows": {
            "title": "First-run rows",
            "minimum": 0,
            "type": "integer",
            "description": "Changes mode, first run with a new state name only: how many current register listings within your filters to return, in register order (alphabetical), each charged as a sponsor row ($0.001). GOV.UK publishes only the latest file, so there is no earlier file to compare with yet. 0 = none. Max results also applies.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many rows (sponsors or changes). 0 = no limit. The full register has about 140,000 listings. Your maximum cost per run also stops the run.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}