# Bayt Jobs Data Scraper for MENA Listings (`khadinakbar/bayt-jobs-scraper`) Actor

Search Bayt job listings by keyword, market, category, or public URL. Receive titles, companies, locations, snippets, job IDs, and apply URLs for MENA hiring research.

- **URL**: https://apify.com/khadinakbar/bayt-jobs-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Jobs, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 job founds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Bayt Jobs Data Scraper for MENA Listings

Turn a Bayt keyword, market, category, listing URL, or job-detail URL into structured job records for recruiters, labor-market researchers, sourcing teams, and AI agents. Each row can include the job title, company, city, country, listing snippet, Bayt job ID, apply URL, source query, source market, source URL, and collection time.

### Best fit for this Actor

- Choose this Actor for focused Bayt research across MENA markets using keyword, category, or direct URL inputs.
- Use country-specific searches when the research brief is tied to a local hiring market, or use the international market for regional discovery.
- For a cross-platform hiring brief, start with the [Multi-Platform Jobs Scraper](https://apify.com/khadinakbar/jobs-scraper), then use this Actor for a focused Bayt dataset.

### From a hiring question to a reviewable shortlist

A talent researcher starts with a role keyword and a target Bayt market. The Actor builds the matching listing route, collects job cards until the requested scope is reached, and returns source-linked rows. The researcher then groups openings by company and location, opens selected `applyUrl` values for review, and retains `searchQuery`, `sourceCountry`, and `sourceUrl` to explain how every record entered the shortlist.

### Quick start input

```json
{
  "searchQuery": "software engineer",
  "country": "uae",
  "maxResults": 50
}
````

For category-led collection, provide a real Bayt category slug in `jobCategory`. For a known listing page or job page, provide `startUrls`; that route becomes the starting point for the run.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `searchQuery` | string | Free-text role or skill query used to create a Bayt search. |
| `country` | string | Bayt market and localized listing route. |
| `jobCategory` | string | Bayt category slug for category-led collection. |
| `startUrls` | array | Public Bayt listing or job-detail pages supplied directly. |
| `maxResults` | integer | Stable dataset cap for a focused run. |
| `proxyConfiguration` | object | Apify proxy route used for Bayt pages. |

### What data you receive

One dataset row represents one Bayt job listing discovered by the selected search, category, listing page, or detail page.

| Field | Meaning |
|---|---|
| `jobTitle` | Job title displayed by Bayt. |
| `companyName` | Hiring organization name. |
| `location`, `city`, `country` | Display location plus normalized geography. |
| `snippet` | Listing-card description preview. |
| `applyUrl` | Public Bayt job detail or apply page. |
| `jobId` | Bayt identifier parsed from the job URL. |
| `searchQuery`, `sourceCountry` | Search context echoed into the row. |
| `sourceUrl`, `scrapedAt` | Listing provenance and collection time. |

```json
{
  "jobTitle": "Software Engineer",
  "companyName": "Example Company",
  "location": "Dubai, United Arab Emirates",
  "city": "Dubai",
  "country": "United Arab Emirates",
  "snippet": "Build and maintain customer-facing applications.",
  "applyUrl": "https://www.bayt.com/en/uae/jobs/example-job-12345/",
  "jobId": "12345",
  "searchQuery": "software engineer",
  "sourceCountry": "uae",
  "sourceUrl": "https://www.bayt.com/en/uae/jobs/software-engineer-jobs/",
  "scrapedAt": "2026-06-02T09:00:00.000Z"
}
```

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~bayt-jobs-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "software engineer",
    "country": "uae",
    "maxResults": 50
  }'
```

Read the default dataset after completion to receive the structured job rows.

### Use with AI agents through Apify MCP

> Search Bayt for software engineering roles in the selected MENA market. Return title, company, city, country, snippet, apply URL, source query, source URL, and collection time. Keep the scope bounded, read the dataset after completion, group the results by company and location, and retain provenance beside each recommendation.

An agent can route confidently when the prompt includes the target role, market, desired scope, and output fields. Ask it to inspect the outcome, read the dataset, preserve source URLs, and keep cost aligned with the requested `maxResults`.

### Connect the workflow

Use the [Multi-Platform Jobs Scraper](https://apify.com/khadinakbar/jobs-scraper) when the research question spans several job sources. Continue with this Bayt Actor when the next step calls for focused MENA listings and Bayt apply URLs.

### Pricing

This Actor uses Pay per event plus Apify platform usage. Open the live Pricing tab for current event details, and use `maxResults` with Apify run cost controls to keep each search aligned with your budget.

### Best results

- Use a specific role, skill, or category that matches the hiring brief.
- Select the Bayt market that matches the desired geography.
- Supply a canonical public listing URL when a saved Bayt search already represents the brief.
- Keep `sourceUrl`, `searchQuery`, and `sourceCountry` with every downstream shortlist or analysis.

### Builder's note

I designed each job row to echo its query, market, and source URL because I found that a title and company alone are too easy to separate from the search intent that produced them. Keeping the discovery context beside the apply URL makes agent summaries, spreadsheet review, and later reruns much easier to reason about.

### Responsible use

Use public job data for authorized research and recruitment workflows, and handle employer and applicant-related information in line with applicable laws, Bayt terms, and your organization's hiring policies.

# Actor input Schema

## `searchQuery` (type: `string`):

Free-text job search keyword to run on Bayt.com (e.g., 'senior accountant', 'odoo developer'). Used with `country` to build the listing URL. Defaults to 'software engineer'. NOT a Bayt category slug — for category-based scraping leave this empty and set `jobCategory`.

## `country` (type: `string`):

Bayt MENA market to search. Determines locale and currency in results. Defaults to 'international' (cross-region). Country-specific slugs hit each country's localized Bayt subsite. Ignored when `startUrls` is set.

## `jobCategory` (type: `string`):

Optional Bayt category slug for category-based scraping (e.g., 'accounting', 'sales', 'engineering'). When set, overrides `searchQuery`. Leave empty to use keyword search. NOT a free-text field — must be a real Bayt category slug.

## `startUrls` (type: `array`):

Optional list of Bayt listing or job-detail URLs to scrape directly. When provided, overrides `searchQuery`, `country`, and `jobCategory`. Each URL must be a Bayt.com page (e.g., https://www.bayt.com/en/uae/jobs/sales-jobs/). Listing URLs auto-paginate up to `maxResults`; detail URLs extract a single job.

## `maxResults` (type: `integer`):

Hard cap on jobs returned per run. Pricing is billed per job-found. Defaults to 50. Maximum 500. Set lower for budget caps; set higher for backfills.

## `proxyConfiguration` (type: `object`):

Apify proxy settings. Bayt blocks datacenter IPs — RESIDENTIAL is required. Leave the default unless you have a specific reason to change groups.

## Actor input object example

```json
{
  "searchQuery": "senior accountant",
  "country": "international",
  "jobCategory": "accounting",
  "startUrls": [],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `jobs` (type: `string`):

All scraped Bayt job records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "software engineer",
    "country": "international",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/bayt-jobs-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "software engineer",
    "country": "international",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/bayt-jobs-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "software engineer",
  "country": "international",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/bayt-jobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/bayt-jobs-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bayt Jobs Data Scraper for MENA Listings",
        "description": "Search Bayt job listings by keyword, market, category, or public URL. Receive titles, companies, locations, snippets, job IDs, and apply URLs for MENA hiring research.",
        "version": "0.6",
        "x-build-id": "gcklftlErtmKz1HWR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~bayt-jobs-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~bayt-jobs-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-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/khadinakbar~bayt-jobs-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-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": {
                    "searchQuery": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Free-text job search keyword to run on Bayt.com (e.g., 'senior accountant', 'odoo developer'). Used with `country` to build the listing URL. Defaults to 'software engineer'. NOT a Bayt category slug — for category-based scraping leave this empty and set `jobCategory`."
                    },
                    "country": {
                        "title": "Country / market",
                        "enum": [
                            "international",
                            "uae",
                            "saudi-arabia",
                            "qatar",
                            "kuwait",
                            "bahrain",
                            "oman",
                            "egypt",
                            "lebanon",
                            "jordan",
                            "iraq",
                            "morocco",
                            "tunisia",
                            "algeria"
                        ],
                        "type": "string",
                        "description": "Bayt MENA market to search. Determines locale and currency in results. Defaults to 'international' (cross-region). Country-specific slugs hit each country's localized Bayt subsite. Ignored when `startUrls` is set.",
                        "default": "international"
                    },
                    "jobCategory": {
                        "title": "Job category (optional)",
                        "type": "string",
                        "description": "Optional Bayt category slug for category-based scraping (e.g., 'accounting', 'sales', 'engineering'). When set, overrides `searchQuery`. Leave empty to use keyword search. NOT a free-text field — must be a real Bayt category slug."
                    },
                    "startUrls": {
                        "title": "Start URLs (advanced)",
                        "type": "array",
                        "description": "Optional list of Bayt listing or job-detail URLs to scrape directly. When provided, overrides `searchQuery`, `country`, and `jobCategory`. Each URL must be a Bayt.com page (e.g., https://www.bayt.com/en/uae/jobs/sales-jobs/). Listing URLs auto-paginate up to `maxResults`; detail URLs extract a single job.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Hard cap on jobs returned per run. Pricing is billed per job-found. Defaults to 50. Maximum 500. Set lower for budget caps; set higher for backfills.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy settings. Bayt blocks datacenter IPs — RESIDENTIAL is required. Leave the default unless you have a specific reason to change groups.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
