{
  "openapi": "3.0.1",
  "info": {
    "title": "NHS Jobs Scraper: UK Trust Vacancy Alerts",
    "description": "Scrape NHS Jobs vacancies by keyword, trust, location and distance, pay band, salary, contract, working pattern, staff group and visa sponsorship. Get new vacancies only, full adverts and contact details on request. Schedule it for UK hiring alerts.",
    "version": "0.3",
    "x-build-id": "wAET5Yhgi8vEqNOKf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~nhs-trust-vacancy-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-nhs-trust-vacancy-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/getascraper~nhs-trust-vacancy-monitor/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-nhs-trust-vacancy-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/getascraper~nhs-trust-vacancy-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-nhs-trust-vacancy-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": {
          "keyword": {
            "title": "Vacancy keyword",
            "type": "string",
            "description": "Word or phrase to look for in NHS vacancies, for example nurse, physiotherapist or ward clerk. It matches the whole advert, so combine it with \"Keyword must be in the job title\" for tighter results. Leave empty to browse every vacancy that matches the other filters.",
            "default": "nurse"
          },
          "keywordInTitleOnly": {
            "title": "Keyword must be in the job title",
            "type": "boolean",
            "description": "Keep only vacancies whose title contains every word of the keyword. This removes adverts that only mention the word in passing.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude title words",
            "type": "array",
            "description": "Drop vacancies whose title contains any of these words, for example Bank or Student. One word or phrase per row.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Town, city or postcode, for example Leeds or SW1A 1AA. Combine it with a distance to include the surrounding area."
          },
          "distanceMiles": {
            "title": "Distance from location",
            "enum": [
              "exact",
              "5",
              "10",
              "20",
              "30",
              "50",
              "100"
            ],
            "type": "string",
            "description": "How far from the location to search, in miles. \"Only in this place\" keeps vacancies in the named town or postcode itself. Used only when a location is set.",
            "default": "exact"
          },
          "employerName": {
            "title": "Employer name",
            "type": "string",
            "description": "Only vacancies whose employer name matches this text, for example Guys and St Thomas or Royal Marsden. Use this to watch one NHS trust without knowing its code."
          },
          "employerCodes": {
            "title": "Approved employer codes",
            "maxItems": 20,
            "type": "array",
            "description": "Optional NHS employer codes to search one by one, for example C9236. The code is the first part of every vacancy reference and is returned in the employerCode field of each row.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "staffGroups": {
            "title": "Staff groups",
            "type": "array",
            "description": "Only vacancies in the selected NHS staff groups. Pick several to combine groups.",
            "items": {
              "type": "string",
              "enum": [
                "NURSING_AND_MIDWIFERY_REGD",
                "MEDICAL_AND_DENTAL",
                "ALLIED_HEALTH_PROF",
                "HEALTHCARE_SCIENTISTS",
                "CLINICAL_SERVICES",
                "PROF_SCIENTIFIC_AND_TECHNICAL",
                "ADMINISTRATIVE_AND_CLERICAL",
                "ESTATES_AND_ANCILLARY",
                "STUDENTS"
              ],
              "enumTitles": [
                "Nursing and midwifery (registered)",
                "Medical and dental",
                "Allied health professionals",
                "Healthcare scientists",
                "Additional clinical services",
                "Professional, scientific and technical",
                "Administrative and clerical",
                "Estates and ancillary",
                "Students"
              ]
            },
            "default": []
          },
          "staffGroup": {
            "title": "Staff group",
            "type": "string",
            "description": "Older single-value staff group code, kept so existing saved runs keep working. Use Staff groups above for new searches; both are combined if both are set."
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Only vacancies with the selected contract types. Bank and Locum are the usual choices for staffing agencies and flexible workers.",
            "items": {
              "type": "string",
              "enum": [
                "Permanent",
                "Fixed-Term",
                "Bank",
                "Locum",
                "Secondment",
                "Apprenticeship",
                "Training",
                "Voluntary",
                "Honorary",
                "NHS Reservist"
              ],
              "enumTitles": [
                "Permanent",
                "Fixed term",
                "Bank",
                "Locum",
                "Secondment",
                "Apprenticeship",
                "Training",
                "Voluntary",
                "Honorary",
                "NHS Reservist"
              ]
            },
            "default": []
          },
          "contractType": {
            "title": "Contract type",
            "type": "string",
            "description": "Older single-value contract type, kept so existing saved runs keep working. Use Contract types above for new searches; both are combined if both are set."
          },
          "workingPatterns": {
            "title": "Working patterns",
            "type": "array",
            "description": "Only vacancies offering the selected working patterns, for example part time, job share or remote working.",
            "items": {
              "type": "string",
              "enum": [
                "full-time",
                "part-time",
                "job-share",
                "flexible-working",
                "remote-working",
                "compressed-hours",
                "term-time-hours",
                "annualised-hours"
              ],
              "enumTitles": [
                "Full time",
                "Part time",
                "Job share",
                "Flexible working",
                "Remote working",
                "Compressed hours",
                "Term time hours",
                "Annualised hours"
              ]
            },
            "default": []
          },
          "payBands": {
            "title": "NHS pay bands and grades",
            "type": "array",
            "description": "Agenda for Change bands 2 to 9 and medical and dental grades. Pick several, for example Band 5 and Band 6 for newly qualified nurses.",
            "items": {
              "type": "string",
              "enum": [
                "BAND_2",
                "BAND_3",
                "BAND_4",
                "BAND_5",
                "BAND_6",
                "BAND_7",
                "BAND_8A",
                "BAND_8B",
                "BAND_8C",
                "BAND_8D",
                "BAND_9",
                "FOUNDATION_DOCTOR",
                "SPECIALTY_REGISTRAR",
                "SPECIALTY_DOCTOR",
                "CONSULTANT",
                "DOCTOR_OTHER",
                "SPECIALIST",
                "VERY_SENIOR_MANAGER"
              ],
              "enumTitles": [
                "Band 2",
                "Band 3",
                "Band 4",
                "Band 5",
                "Band 6",
                "Band 7",
                "Band 8A",
                "Band 8B",
                "Band 8C",
                "Band 8D",
                "Band 9",
                "Foundation doctor",
                "Specialty registrar",
                "Specialty doctor",
                "Consultant",
                "Doctor (other)",
                "Specialist",
                "Very senior manager"
              ]
            },
            "default": []
          },
          "minSalary": {
            "title": "Minimum salary",
            "minimum": 0,
            "maximum": 500000,
            "type": "integer",
            "description": "Only vacancies paying at least this much, in pounds per year. Leave empty for no lower limit."
          },
          "maxSalary": {
            "title": "Maximum salary",
            "minimum": 0,
            "maximum": 500000,
            "type": "integer",
            "description": "Only vacancies paying at most this much, in pounds per year. Leave empty for no upper limit."
          },
          "visaSponsorship": {
            "title": "Visa sponsorship",
            "enum": [
              "any",
              "welcomed"
            ],
            "type": "string",
            "description": "Only vacancies whose advert has a Certificate of Sponsorship section welcoming applicants who need Skilled Worker sponsorship. Each advert page is read to check this, so runs with this filter take longer. Absence of the section does not prove an employer cannot sponsor.",
            "default": "any"
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only vacancies published on or after this date. For a rolling window use Posted within days instead."
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only vacancies published in the last N days. 1 means since yesterday. Good for daily or weekly scheduled runs."
          },
          "closingWithinDays": {
            "title": "Closing within days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Only vacancies whose closing date is within the next N days. Results are returned closing soonest first. Useful for last-chance alerts."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "closingSoonest",
              "salaryHighest",
              "salaryLowest"
            ],
            "type": "string",
            "description": "Order of the results. Best match is the NHS Jobs default. Newest first is what you want for feeds and monitoring. Closing within days always sorts by closing date.",
            "default": "relevance"
          },
          "maxItemsPerEmployer": {
            "title": "Maximum vacancies per employer",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep at most this many vacancies from each employer, to see a wide spread of trusts instead of one big employer. Leave empty for no limit."
          },
          "includeDetails": {
            "title": "Fetch full advert details",
            "type": "boolean",
            "description": "Adds the full job description, person specification, pay band and scheme, working pattern, contract duration, work location address, employer website, apply link, supporting documents, visa sponsorship statement and registration notes. It opens one extra page per vacancy, so runs are slower and a separate details charge applies.",
            "default": false
          },
          "includeContactDetails": {
            "title": "Include advert contact person",
            "type": "boolean",
            "description": "Adds the contact job title, name, email and phone the employer published on the advert for questions about the job. Only used together with Fetch full advert details. Handle these personal details in line with data protection rules.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum vacancies",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum vacancies returned in total across every search. With the default paging, raising this number is enough to collect more: pages are read automatically (up to 20,000).",
            "default": 5
          },
          "limit": {
            "title": "Rows per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Vacancies requested per page of the feed (1 to 100). Leave it at 5 together with Maximum pages 1 to let the Actor choose the page size from Maximum vacancies; set both yourself to control paging exactly.",
            "default": 5
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum pages fetched for each employer search. Leave it at 1 together with Rows per page 5 to let the Actor read as many pages as Maximum vacancies needs.",
            "default": 1
          },
          "outputMode": {
            "title": "Output and monitoring mode",
            "enum": [
              "full",
              "compact",
              "changes_only",
              "all_with_status",
              "new_only"
            ],
            "type": "string",
            "description": "Full or compact current rows, changed rows only, all rows with change status, or only vacancies not delivered before under this monitoring state name (best for new-vacancy alerts).",
            "default": "compact"
          },
          "stateName": {
            "title": "Monitoring state name",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,79}$",
            "type": "string",
            "description": "Names this watchlist. The Actor remembers which vacancies it already delivered under this name, so use a different name for each saved search or client. Used by Changes only, All rows with status and New vacancies only.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to fetch the feed and advert pages. The default (no proxy) is enough for normal runs.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}