{
  "openapi": "3.0.1",
  "info": {
    "title": "TopJobs.lk Scraper",
    "description": "Search Sri Lanka's leading job board, TopJobs.lk, by keyword or category and pull full job details (location, closing date, job-type badges, description image, employer contact) -- no account or API key needed.",
    "version": "0.0",
    "x-build-id": "cbBnZE4Tyas3bUB1S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zucchini_gopher_m2v~topjobs-lk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zucchini_gopher_m2v-topjobs-lk-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/zucchini_gopher_m2v~topjobs-lk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zucchini_gopher_m2v-topjobs-lk-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/zucchini_gopher_m2v~topjobs-lk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zucchini_gopher_m2v-topjobs-lk-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "\"search\" runs a keyword or category search and (by default) hydrates each result into a full job record. \"detail\" fetches full detail for specific job URL(s) directly.",
            "default": "search"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "\"search\" mode -- free-text search (e.g. \"accountant\", \"software engineer\"). Leave empty to list all currently open vacancies. Ignored if \"Functional area\" below is set -- topjobs.lk's own search page treats category-browse and keyword-search as mutually exclusive, category wins."
          },
          "functionalArea": {
            "title": "Functional area (browse by category)",
            "enum": [
              "",
              "SDQ",
              "HNS",
              "ACA",
              "BAF",
              "SMM",
              "HAT",
              "COM",
              "OAS",
              "CCE",
              "ITT",
              "CUR",
              "LWT",
              "MAE",
              "POS",
              "MAC",
              "HRF",
              "HOT",
              "SRF",
              "MHN",
              "LEL",
              "SQC",
              "APC",
              "AIM",
              "TAL",
              "RLT",
              "AGD",
              "SEC",
              "BEC",
              "IDV",
              "KPO",
              "IME"
            ],
            "type": "string",
            "description": "\"search\" mode -- browse one of topjobs.lk's own job categories instead of a keyword search. When set, \"Keyword\" above is ignored server-side (confirmed live).",
            "default": ""
          },
          "government": {
            "title": "Government sector only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword (does NOT combine with Functional area).",
            "default": false
          },
          "ngo": {
            "title": "NGO sector only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword.",
            "default": false
          },
          "partTime": {
            "title": "Part-time only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword.",
            "default": false
          },
          "walkIn": {
            "title": "Walk-in interview only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword.",
            "default": false
          },
          "foreign": {
            "title": "Foreign employment only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword.",
            "default": false
          },
          "internship": {
            "title": "Internships only",
            "type": "boolean",
            "description": "\"search\" mode -- optional filter checkbox, combines with Keyword.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "\"search\" mode -- maximum number of job listings to return. Pagination is followed automatically (1000 results/page) until this cap or the end of the result set.",
            "default": 50
          },
          "fetchFullDetails": {
            "title": "Fetch full details for each result",
            "type": "boolean",
            "description": "\"search\" mode -- when on (default), each search result is hydrated into a full job record (location, closing date, job-type badges, description image, employer contact) with one extra request per job. Turn off for faster/cheaper runs that only need the compact search-result fields (title, employer, town, dates).",
            "default": true
          },
          "jobUrl": {
            "title": "Job detail URL",
            "type": "string",
            "description": "\"detail\" mode -- a single job's full topjobs.lk detail URL (from this actor's own `detailUrl` search-result field, or copied from the site)."
          },
          "jobUrls": {
            "title": "Job detail URLs",
            "type": "array",
            "description": "\"detail\" mode only -- multiple job detail URLs to fetch full detail for in one run.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max concurrent workers",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many detail requests to run in parallel (used in \"search\" mode when hydrating results, and in \"detail\" mode across multiple URLs).",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Residential is on by default.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}