{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayt Jobs Scraper",
    "description": "Extract job listings from Bayt.com, the leading job portal for the Middle East and North Africa region.",
    "version": "1.1",
    "x-build-id": "wLUKypKfgltBimF8r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeai~bayt-jobs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeai-bayt-jobs-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/scrapeai~bayt-jobs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapeai-bayt-jobs-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/scrapeai~bayt-jobs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeai-bayt-jobs-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": {
          "startUrls": {
            "title": "Target Start URLs",
            "type": "array",
            "description": "Live public target URLs to request first. These can be replaced at run time.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "Absolute live target URL.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ]
            },
            "default": [
              {
                "url": "https://www.bayt.com/en/international/jobs/Risk%20Engineer-jobs/"
              }
            ]
          },
          "endUrls": {
            "title": "Target End URLs",
            "type": "array",
            "description": "Optional live target boundary URLs. They are fetched after start URLs and are kept separate in output.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "Absolute live target URL.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Target query used by a derived source URL when the actor supports query search.",
            "default": "Risk Engineer"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of live records to return. Production default/prefill is 50; maximum is 50. Local input.json stays capped at 10.",
            "default": 50
          },
          "maxRequestRetries": {
            "title": "Max Request Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Number of retries for a live target request.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request Timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for one live target request.",
            "default": 25
          },
          "maxPages": {
            "title": "Maximum Live Pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum live listing/API pages to request, including discovered next pages.",
            "default": 3
          },
          "crawlDetails": {
            "title": "Fetch Detail Pages",
            "type": "boolean",
            "description": "When live rows expose same-site item URLs, fetch those detail pages in bulk and attach their fields.",
            "default": true
          },
          "maxDetailPages": {
            "title": "Maximum Detail Pages",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum same-site detail URLs to fetch per run.",
            "default": 5
          },
          "detailConcurrency": {
            "title": "Detail Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of live detail requests in flight at once.",
            "default": 4
          },
          "browserFallback": {
            "title": "Browser DOM Fallback",
            "type": "boolean",
            "description": "If the direct live request is blocked or returns a JavaScript shell, render the same target in a local headless browser and parse the live DOM.",
            "default": true
          },
          "proxyEnabled": {
            "title": "Enable Apify Proxy",
            "type": "boolean",
            "description": "If the direct live request fails without a clear access challenge, retry once through the configured Apify datacenter proxy.",
            "default": true
          },
          "targetInput": {
            "title": "Original Target Input",
            "type": "object",
            "description": "Optional source-specific fields copied from this actor input schema. URL/query values are normalized by this actor.",
            "properties": {
              "max_results": {
                "title": "📊 Max Results",
                "type": "integer",
                "description": "Maximum Bayt job rows to return",
                "prefill": 2
              },
              "keyword": {
                "title": "🔍 Keyword",
                "type": "string",
                "description": "Job title, skill, or company query to search on Bayt",
                "prefill": "Risk Engineer"
              },
              "country": {
                "title": "🌍 Country",
                "type": "string",
                "description": "Country-specific Bayt market used for the search",
                "prefill": "Egypt"
              },
              "location": {
                "title": "📍 Location",
                "type": "string",
                "description": "Optional city, area, or postal code for the Bayt search"
              },
              "posted_since": {
                "title": "📅 Posted Since",
                "type": "string",
                "description": "Optional earliest posting date for the Bayt search"
              },
              "job_type": {
                "title": "💼 Job Type",
                "type": "string",
                "description": "Optional employment type for the Bayt search; `all` disables this filter"
              },
              "currency": {
                "title": "💱 Currency",
                "type": "string",
                "description": "Optional target currency for normalized Bayt salary amounts"
              }
            },
            "default": {},
            "additionalProperties": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}