{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayt.com Scraper — MENA Jobs with Salary & Skills Filter",
    "description": "Scrape bayt.com — the leading Middle East job board covering UAE, Saudi Arabia, Qatar, Egypt and more. Salary data, experience requirements, skill-based filtering, career level, and full job descriptions across 10,000+ active listings. Incremental mode detects new jobs.",
    "version": "0.3",
    "x-build-id": "fEwgH3EgkIFuOtYn7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~bayt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-bayt-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/blackfalcondata~bayt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-bayt-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/blackfalcondata~bayt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-bayt-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 Term(s)",
            "type": "string",
            "description": "Job search keywords (e.g. `software engineer`, `marketing manager`, `accountant`). Bayt matches against job title and description. Use multiple words for narrower results — `software engineer` returns fewer (more relevant) jobs than `software`. Leave empty if you use Start URLs below."
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Optional alternative to **Search Term(s)** — paste Bayt URLs directly:\n\n- **Search URLs** (e.g. `https://www.bayt.com/en/uae/jobs/?q=accountant`) are crawled page-by-page like a normal search. Build the search in your browser with the filters you want, then copy the URL.\n- **Job detail URLs** (e.g. `https://www.bayt.com/en/uae/jobs/it-support-engineer-5444606/`) skip the search step entirely and fetch only those specific listings. Useful for refreshing a known set of jobs.\n\nYou can mix both types in one run. Filters/Country/Location below are ignored when Start URLs are set.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "A Bayt search URL or job detail URL."
                }
              }
            }
          },
          "country": {
            "title": "🌍 Country",
            "enum": [
              "INTERNATIONAL",
              "AE",
              "SA",
              "EG",
              "KW",
              "QA",
              "BH",
              "JO",
              "LB",
              "PK",
              "IN",
              "OM",
              "IQ",
              "MA"
            ],
            "type": "string",
            "description": "Country to search in. **International** searches across all 13 supported Bayt markets at once. Pick a specific country to scope results — recommended for higher-quality matches and faster runs. Supported: UAE, Saudi Arabia, Egypt, Kuwait, Qatar, Bahrain, Jordan, Lebanon, Pakistan, India, Oman, Iraq, Morocco.",
            "default": "INTERNATIONAL"
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "Optional city or region within the selected country (e.g. `Dubai`, `Riyadh`, `Cairo`, `Doha`). Narrows results geographically — leave empty to search the whole country. Bayt's free-text location field, so spelling matches what appears in listings."
          },
          "employmentType": {
            "title": "💼 Employment Type",
            "enum": [
              "full-time",
              "part-time",
              "freelance",
              "contract",
              "remote",
              "internship"
            ],
            "type": "string",
            "description": "Filter by employment contract type. **Full time** is the default behavior on Bayt and usually the largest segment. **Remote** filters for jobs explicitly tagged remote-first by the employer (also surfaced via the `isRemote` output flag). Leave empty to include all types."
          },
          "careerLevel": {
            "title": "📈 Career Level",
            "enum": [
              "student",
              "entry-level",
              "mid-career",
              "senior",
              "manager",
              "director",
              "executive"
            ],
            "type": "string",
            "description": "Filter by required seniority. **Mid career** and **Senior** typically have the most listings; **Executive / C-level** the fewest. Career level also appears in the output as both the raw `careerLevel` string and the structured `yearsOfExperience` field when Bayt provides it."
          },
          "datePosted": {
            "title": "📅 Date Posted",
            "enum": [
              "past-24h",
              "past-week",
              "past-month"
            ],
            "type": "string",
            "description": "Filter by how recently the job was posted. **Past 24 hours** is the tightest — useful when running on a daily cron to catch fresh jobs. **Past 30 days** gives the largest pool. Combine with `incrementalMode` for a near-zero-cost daily delta feed."
          },
          "maxResults": {
            "title": "💯 Max Results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of job records to return per run. Set to `0` for unlimited (returns every matching job — can be thousands for broad queries). For ad-hoc exploration start with 10–50; for production monitoring 100–500 is typical. You pay $0.001 per result returned, so this is also your hard cost cap per run.",
            "default": 50
          },
          "includeDetails": {
            "title": "📋 Include Full Details",
            "type": "boolean",
            "description": "When enabled (default), fetches each job's full detail page to populate `description`, `skills`, `salaryMin`/`Max`, `employmentTypeNormalized`, `hiringOrganizationId`, `isAiTranslated`, `nationality`, `gender`, `directApply`, and the preferred-candidate criteria. Disable to skip detail fetches — runs ~3× faster but only SERP-card fields are populated.",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "✂️ Description Max Length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate the `description` field to N characters. `0` keeps full descriptions. Useful for LLM pipelines where descriptions cost tokens — try `500`–`2000` to keep enough context while capping prompt size. Does not affect `descriptionHtml` or `descriptionMarkdown`.",
            "default": 0
          },
          "compact": {
            "title": "📦 Compact Output",
            "type": "boolean",
            "description": "Returns only 11 core fields per record: `jobId`, `title`, `company`, `location`, `salaryText`, `employmentType`, `careerLevel`, `url`, `postedDate`, `contentHash`, `changeType`. Designed for AI-agent and MCP workflows where token budget matters. Mutually exclusive with `removeEmptyFields` — `compact` wins if both are enabled.",
            "default": false
          },
          "removeEmptyFields": {
            "title": "🧹 Remove Empty Fields",
            "type": "boolean",
            "description": "Recursively drops `null`, empty string `\"\"`, and empty array `[]` values from each record before output. Empty nested objects (e.g. `socialProfiles` with all-null values) are also pruned. **Preserves** `false` and `0` since those are real signals. Recommended for AI agents, Make, Zapier, n8n, and any webhook flow where smaller payloads matter. **Keep disabled** for fixed-schema warehouse loads (Snowflake/BigQuery `COPY INTO`) where every row needs identical columns.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental Mode",
            "type": "boolean",
            "description": "When enabled, the actor tracks state across runs and emits/charges only for jobs that are **NEW** or **UPDATED** (or **REAPPEARED** — a previously expired job that came back). Identical, unchanged jobs are silently skipped. On daily monitors this typically cuts cost by 80–90% after the first baseline run. First run with a given `stateKey` always emits everything (the baseline). State is stored in Apify Key-Value Store and pruned after 30 days.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Stable identifier for the tracked search universe. **Leave empty to auto-derive** from your inputs — different keyword/location/filter combinations get isolated state automatically. Set explicitly only if you want two different searches to share a single tracked universe (rare). Two concurrent runs with the same stateKey will not corrupt each other — the second exits gracefully."
          },
          "emitUnchanged": {
            "title": "♻️ Emit Unchanged",
            "type": "boolean",
            "description": "Also emit (and charge for) jobs that haven't changed since the last run, with `changeType: \"UNCHANGED\"`. Off by default — that's the whole point of incremental mode. Enable only if your downstream pipeline needs the full current universe every run rather than just the delta.",
            "default": false
          },
          "emitExpired": {
            "title": "⚰️ Emit Expired",
            "type": "boolean",
            "description": "Also emit records for jobs that **disappeared** from the search universe since the last run, marked `changeType: \"EXPIRED\"` with the `expiredAt` timestamp. Useful for tracking when listings close. These are synthetic records — only lifecycle metadata, no fresh job details.",
            "default": false
          },
          "skipReposts": {
            "title": "🚫 Skip Reposts",
            "type": "boolean",
            "description": "When a new job's tracked content (title, company, location, salary, description) matches a previously expired job exactly, treat it as a repost rather than NEW. By default reposts are still emitted with `isRepost: true` and `repostOfId` pointing to the original — enable this to suppress them entirely. Useful for filtering out employers who recycle the same listing weekly.",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token from [@BotFather](https://t.me/BotFather). Create a bot with `/newbot`, copy the token (looks like `123456:ABC-DEF...`), and paste here. Required to enable Telegram notifications — also fill in **Telegram Chat ID** below."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "ID of the chat or channel to send job alerts to. For a personal chat: message your bot once, then visit `https://api.telegram.org/bot<TOKEN>/getUpdates` to find your chat ID. For a channel: add the bot as admin, then forward a channel message to [@userinfobot](https://t.me/userinfobot). Required when **Telegram Bot Token** is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL. Create one in **Server Settings → Integrations → Webhooks → New Webhook**, then copy the URL (looks like `https://discord.com/api/webhooks/<id>/<token>`). Jobs are posted as rich embeds with title, company, salary, and apply link."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL (looks like `https://hooks.slack.com/services/T.../B.../...`). Create one at [api.slack.com/apps](https://api.slack.com/apps) → your app → **Incoming Webhooks**. Jobs are posted as Block Kit messages with title, company, salary, and apply button."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API access token from Meta Business. **Important constraint:** the recipient phone must have messaged your business number within the last 24 hours (Meta's free service-conversation window since Nov 2024). Cold-start outreach requires pre-approved message templates — not supported here."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp Phone Number ID",
            "type": "string",
            "description": "WhatsApp Business phone-number ID (numeric, found in Meta Business dashboard under **WhatsApp → API Setup**). Different from the phone number itself — this is Meta's internal ID. Required when **WhatsApp Access Token** is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone in [E.164 format](https://en.wikipedia.org/wiki/E.164) without the leading `+` (e.g. `971501234567` for UAE, `971` is the country code). Must have messaged your business number within the last 24h."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Catch-all webhook for n8n, Make, Zapier, or your own backend. Receives a single `POST` after each run with `{ metadata: {...}, items: [...] }` as JSON. Sent once at run end — not per-item. Use the standard Apify integrations tab for per-result webhooks instead."
          },
          "webhookHeaders": {
            "title": "📋 Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of extra HTTP headers sent with the webhook POST. Use for auth tokens or content negotiation. Example: `{\"Authorization\": \"Bearer abc123\", \"X-Source\": \"apify\"}`."
          },
          "notificationLimit": {
            "title": "📊 Max Jobs Per Notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many job records to include in each Telegram/Discord/Slack/WhatsApp message (1–20). Default `5` keeps notifications readable. The webhook destination always receives the full unlimited list — this cap only applies to chat-style platforms.",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify Only New/Updated",
            "type": "boolean",
            "description": "When **Incremental Mode** is on, restrict notifications to `NEW` and `UPDATED` jobs only — skip `UNCHANGED`, `EXPIRED`, and `REAPPEARED`. Recommended for daily monitors so you only get pinged about genuinely fresh listings. Has no effect when incremental mode is off.",
            "default": false
          },
          "phoneExtractionMode": {
            "title": "📞 Phone Extraction Mode",
            "enum": [
              "strict",
              "lenient"
            ],
            "type": "string",
            "description": "How aggressively to detect phone numbers in job descriptions. **Strict** (default) only accepts numbers with explicit phone-context prefix (Tel:, Phone:, هاتف, جوال, تماس, etc.) or an international `+CC` prefix — high precision, may miss bare local numbers. **Lenient** also accepts bare local numbers starting with `0` followed by 9–15 digits, filtered against VAT IDs and dates — more recall but some false positives.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}