{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayt.com Jobs Scraper — Middle East & Gulf Job Listings",
    "description": "Scrape jobs from Bayt.com across the UAE, Saudi Arabia, Egypt, Qatar and 11 more markets. Get titles, companies, locations, salaries, skills, full descriptions and candidate requirements as structured JSON — with incremental monitoring and notifications.",
    "version": "0.1",
    "x-build-id": "PjhkUnaPa5jNpQOsp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/corvuslab~bayt-jobs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-corvuslab-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/corvuslab~bayt-jobs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-corvuslab-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/corvuslab~bayt-jobs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-corvuslab-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": {
          "query": {
            "title": "🔑 Search keywords",
            "type": "string",
            "description": "Job keywords, e.g. \"software engineer\". Separate multiple searches with commas — each runs on its own and results are merged and de-duplicated. Leave empty to scrape all jobs (newest first)."
          },
          "country": {
            "title": "🌍 Country",
            "enum": [
              "international",
              "uae",
              "saudi-arabia",
              "egypt",
              "kuwait",
              "qatar",
              "bahrain",
              "oman",
              "jordan",
              "lebanon",
              "iraq",
              "morocco",
              "pakistan",
              "india",
              "usa"
            ],
            "type": "string",
            "description": "Which Bayt market to search. \"International\" spans every country.",
            "default": "international"
          },
          "startUrls": {
            "title": "📋 Start URLs",
            "type": "array",
            "description": "Paste Bayt.com search/listing URLs (with any filters already applied in the browser) or individual job URLs. These are scraped in addition to the keyword search above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of jobs to return. Set 0 for unlimited (bounded by how many the search has).",
            "default": 25
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "relevance",
              "newest"
            ],
            "type": "string",
            "description": "Result ordering.",
            "default": "newest"
          },
          "datePosted": {
            "title": "🗓️ Date posted",
            "enum": [
              "any",
              "24h",
              "3d",
              "7d",
              "14d",
              "30d"
            ],
            "type": "string",
            "description": "Only include jobs posted within this window (applied on the listing, so filtered jobs cost nothing).",
            "default": "any"
          },
          "location": {
            "title": "📍 City / location",
            "type": "string",
            "description": "City or region, e.g. \"Dubai\" or \"Riyadh\". Narrows results to that area."
          },
          "employmentType": {
            "title": "💼 Employment type",
            "enum": [
              "",
              "full-time",
              "part-time",
              "contractor",
              "freelance",
              "internship"
            ],
            "type": "string",
            "description": "Filter by employment type.",
            "default": ""
          },
          "careerLevel": {
            "title": "📊 Career level",
            "enum": [
              "",
              "student",
              "fresh graduate",
              "entry",
              "mid",
              "management"
            ],
            "type": "string",
            "description": "Filter by career level.",
            "default": ""
          },
          "easyApplyOnly": {
            "title": "⚡ Easy Apply only",
            "type": "boolean",
            "description": "Only include jobs with Bayt's direct Easy Apply button (drops before any detail fetch).",
            "default": false
          },
          "searchMinSalary": {
            "title": "💵 Minimum salary (USD/month)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include jobs that publish a salary at or above this USD/month threshold. Jobs without salary data are excluded when this is set."
          },
          "onlyCompanies": {
            "title": "🏢 Only these companies",
            "type": "array",
            "description": "Whitelist — only return jobs from these companies (case-insensitive). Leave empty for all companies.",
            "items": {
              "type": "string"
            }
          },
          "excludeCompanies": {
            "title": "🚫 Exclude companies",
            "type": "array",
            "description": "Blacklist — exclude jobs from these companies (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "matchKeywords": {
            "title": "🎯 Match keywords",
            "type": "array",
            "description": "Score each job by how many of these keywords appear in its title, description and skills. Adds matchScore (0–100) and matchedKeywords to every record — ideal for ranking relevance.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "🔬 Fetch full details",
            "type": "boolean",
            "description": "Open each job's page for the full description, skills, requirements and apply URL. Turn off for the fastest, cheapest listing-only runs.",
            "default": true
          },
          "descriptionFormat": {
            "title": "📝 Description format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Which representation(s) of the job description to include.",
            "default": "all"
          },
          "descriptionMaxLength": {
            "title": "✂️ Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate each description to at most this many characters (0 or empty = no limit)."
          },
          "compact": {
            "title": "📦 Compact records",
            "type": "boolean",
            "description": "Emit only the core fields (id, title, url, company, location, dates, AI summary). Ideal for AI agents and MCP clients.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Drop empty fields",
            "type": "boolean",
            "description": "Remove null, empty-string and empty-array fields from each record.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental mode",
            "type": "boolean",
            "description": "Track state between runs and tag every job with a changeType (NEW / UPDATED / UNCHANGED / EXPIRED). Unchanged jobs are skipped before any detail fetch, so recurring runs stay cheap.",
            "default": false
          },
          "stateKey": {
            "title": "🗝️ State key",
            "type": "string",
            "description": "Stable name for the tracked search. Leave empty to derive one automatically from your search settings."
          },
          "emitUnchanged": {
            "title": "🔁 Include unchanged jobs",
            "type": "boolean",
            "description": "Also emit jobs that have not changed since the previous run.",
            "default": false
          },
          "emitExpired": {
            "title": "🗑️ Include expired jobs",
            "type": "boolean",
            "description": "Emit jobs that were present last run but have since disappeared.",
            "default": false
          },
          "skipReposts": {
            "title": "🔄 Skip reposts",
            "type": "boolean",
            "description": "Filter out recycled postings (same title, new job id). Only effective in incremental mode.",
            "default": false
          },
          "telegramToken": {
            "title": "💬 Telegram bot token",
            "type": "string",
            "description": "Bot token from @BotFather."
          },
          "telegramChatId": {
            "title": "🆔 Telegram chat ID",
            "type": "string",
            "description": "Chat or channel ID, e.g. \"-100123456789\" or \"@yourchannel\"."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack webhook URL",
            "type": "string",
            "description": "Slack incoming-webhook URL."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord webhook URL",
            "type": "string",
            "description": "Discord incoming-webhook URL."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp access token",
            "type": "string",
            "description": "WhatsApp Business API access token (from Meta for Developers)."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp phone number ID",
            "type": "string",
            "description": "WhatsApp Business phone number ID."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp recipient",
            "type": "string",
            "description": "Recipient phone number in international format (e.g. \"971501234567\")."
          },
          "webhookUrl": {
            "title": "🪝 Webhook URL",
            "type": "string",
            "description": "Any HTTPS endpoint. Receives a JSON POST with the matched jobs — works with n8n, Make and Zapier."
          },
          "webhookHeaders": {
            "title": "🧾 Webhook headers",
            "type": "object",
            "description": "Extra headers for the webhook request, e.g. {\"Authorization\": \"Bearer xyz\"}."
          },
          "notificationLimit": {
            "title": "🔢 Jobs per notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many jobs to include in each notification message.",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🆕 Notify only on changes",
            "type": "boolean",
            "description": "When incremental mode is on, only send notifications for NEW and UPDATED jobs — not the full batch.",
            "default": false
          },
          "maxRequestRetries": {
            "title": "🔄 Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up on it.",
            "default": 3
          },
          "phoneExtractionMode": {
            "title": "📞 Phone extraction mode",
            "enum": [
              "strict",
              "lenient"
            ],
            "type": "string",
            "description": "Strict catches standard international numbers (7–15 digits). Lenient catches shorter local numbers too (5+ digits).",
            "default": "strict"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}