{
  "openapi": "3.0.1",
  "info": {
    "title": "Hong Kong Jobs & Salary Scraper",
    "description": "Extract public Hong Kong government vacancies with search, single, and multiple modes plus rich official detail fields and local-only quality metadata.",
    "version": "1.2",
    "x-build-id": "RhWEaZgeffeijjgEp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jobsapi~hongkong-jobs-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jobsapi-hongkong-jobs-search-scraper",
        "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/jobsapi~hongkong-jobs-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jobsapi-hongkong-jobs-search-scraper",
        "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/jobsapi~hongkong-jobs-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jobsapi-hongkong-jobs-search-scraper",
        "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": "Run mode",
            "enum": [
              "search",
              "single",
              "multiple"
            ],
            "type": "string",
            "description": "Search public vacancies, fetch one public vacancy, or fetch several public vacancies.",
            "default": "search"
          },
          "sourceUrl": {
            "title": "Public source URL",
            "pattern": "^https://(?:csboa(?:1|2)?\\.csb\\.gov\\.hk|(?:www\\.)?csb\\.gov\\.hk)/",
            "type": "string",
            "description": "Optional official public Hong Kong government vacancy page on csboa.csb.gov.hk or csb.gov.hk. The default is the public English vacancy listing. The Actor rejects other hosts and non-HTTPS URLs.",
            "default": "https://csboa1.csb.gov.hk/csboa/joa/JVE_001.action"
          },
          "jobIds": {
            "title": "Public job IDs",
            "maxItems": 100,
            "type": "array",
            "description": "Numeric public Hong Kong government vacancy IDs for single or multiple mode.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          "jobId": {
            "title": "Single job ID",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Numeric public Hong Kong government vacancy ID."
          },
          "jobUrls": {
            "title": "Public detail URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Official public vacancy detail URLs for single or multiple mode.",
            "items": {
              "type": "string",
              "minLength": 1,
              "pattern": "^https://(?:csboa(?:1|2)?\\.csb\\.gov\\.hk|(?:www\\.)?csb\\.gov\\.hk)/"
            }
          },
          "jobUrl": {
            "title": "Single detail URL",
            "pattern": "^https://(?:csboa(?:1|2)?\\.csb\\.gov\\.hk|(?:www\\.)?csb\\.gov\\.hk)/",
            "type": "string",
            "description": "Public official vacancy detail URL."
          },
          "urls": {
            "title": "Compatible URL list",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for jobUrls in single or multiple mode.",
            "items": {
              "type": "string",
              "minLength": 1,
              "pattern": "^https://(?:csboa(?:1|2)?\\.csb\\.gov\\.hk|(?:www\\.)?csb\\.gov\\.hk)/"
            }
          },
          "keyword": {
            "title": "Keyword",
            "maxLength": 160,
            "type": "string",
            "description": "Optional case-insensitive filter over public title, department, and entry requirements."
          },
          "jobType": {
            "title": "Job type",
            "enum": [
              "all",
              "civil_service",
              "non_civil_service"
            ],
            "type": "string",
            "description": "Optional public vacancy category filter.",
            "default": "all"
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum normalized public vacancy rows to emit.",
            "default": 25
          },
          "includeDetails": {
            "title": "Fetch detail pages",
            "type": "boolean",
            "description": "Fetch official public vacancy details for duties, requirements, terms, benefits, and application fields. Enabled by default so search mode returns enriched records.",
            "default": true
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for each public request. Retries, request headers, and concurrency are fixed by the Actor.",
            "default": 30
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Small polite delay before each public request.",
            "default": 75
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}