{
  "openapi": "3.0.1",
  "info": {
    "title": "Civil Service Jobs Search Scraper",
    "description": "Scrape job listings from Civil Service Jobs (civilservicejobs.service.gov.uk), the official UK government civil service recruitment portal. Extract job titles, departments, locations, salary ranges, grades, and descriptions for public sector recruitment.",
    "version": "2.1",
    "x-build-id": "ab3JxgHUHdxnCCGoM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jobsapi~civilservice-jobs-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jobsapi-civilservice-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~civilservice-jobs-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jobsapi-civilservice-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~civilservice-jobs-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jobsapi-civilservice-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": "Mode",
            "enum": [
              "search",
              "searchMultiple",
              "single",
              "multiple",
              "startUrls"
            ],
            "type": "string",
            "description": "Search, multiple query search, one detail, multiple details, or official start URLs.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Job title, skill, or keyword for search mode.",
            "default": "policy advisor"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Optional location text. Verified detail locations are filtered against this value.",
            "default": "London"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Query strings or objects such as { query, location } for searchMultiple mode."
          },
          "searchQueries": {
            "title": "Search query objects",
            "type": "array",
            "description": "Alias for queries; each entry may contain query and location."
          },
          "jobUrl": {
            "title": "Single job URL",
            "type": "string",
            "description": "Official stable URL such as https://www.civilservicejobs.service.gov.uk/csr/jobs.cgi?jcode=2010702."
          },
          "url": {
            "title": "Single URL alias",
            "type": "string",
            "description": "Alias for jobUrl."
          },
          "jobId": {
            "title": "Single public job code",
            "type": "string",
            "description": "Numeric public jcode from a Civil Service Jobs stable detail URL."
          },
          "jobUrls": {
            "title": "Job URLs",
            "type": "array",
            "description": "Official stable detail URLs for multiple mode."
          },
          "urls": {
            "title": "URL alias list",
            "type": "array",
            "description": "Alias for jobUrls."
          },
          "jobIds": {
            "title": "Public job codes",
            "type": "array",
            "description": "Numeric public jcodes for multiple mode."
          },
          "startUrls": {
            "title": "Official start URLs",
            "type": "array",
            "description": "Official Civil Service search or stable detail URLs."
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum complete detail-verified records to emit.",
            "default": 3
          },
          "maxCandidates": {
            "title": "Maximum candidates",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum search candidates to inspect before detail enrichment.",
            "default": 12
          },
          "maxPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum result pages to visit per search query.",
            "default": 1
          },
          "maxRequests": {
            "title": "Maximum page requests",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Maximum bounded official page navigations for one run.",
            "default": 24
          },
          "concurrency": {
            "title": "Detail concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Reserved detail concurrency bound; one normal session is used by default.",
            "default": 1
          },
          "locationMatches": {
            "title": "Filter by verified location",
            "type": "boolean",
            "description": "Only retain search results whose official detail location contains the requested location.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}