# Bayt Jobs Scraper (`devilscrapes/bayt-jobs-scraper`) Actor

Scrape job listings from Bayt.com, the Middle East's largest job site, by keyword. Get title, company, location, career level, salary, remote flag, posted date, and detail URL in normalized, paginated rows — built for recruiter pipelines and hiring-intent signals. UAE, Dubai, Saudi & Egypt jobs.

- **URL**: https://apify.com/devilscrapes/bayt-jobs-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />
</div>

## Bayt Jobs Scraper

**💰 $2.00 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*The devil's in the data.* 😈

Scrape job listings from Bayt.com, the Middle East's largest job site, by
keyword. Get clean, normalized rows — title, company, location, career
level, salary if published, a remote flag, posted date, and the full
detail URL — paginated and ready for a recruiter pipeline or a
hiring-intent feed.

### 🎯 What this scrapes

Bayt.com lists thousands of MENA-region job postings across every
industry, ~20 to a page, with no bulk export. This Actor searches by
keyword against a country path (default `uae`), walks the result pages,
and returns one row per job: title, company, location, career level,
salary (when published), a remote flag, a relative posted-date string,
and the absolute detail URL.

### 🔥 Features

- 🛡️ **We rotate browser fingerprints** (Firefox / Chrome impersonation)
  so Bayt sees a real browser's TLS handshake, not a Python script.
- 🌐 **We rotate residential proxies** through Apify Proxy on every
  block — fresh session, fresh exit IP, pinned to the UAE by default.
- 🔁 **We retry with exponential backoff** on rate limits, server
  errors, and interactive challenges, honouring `Retry-After`.
- 🧱 **We back off when the target rate-limits.** Partial successes
  surface with a clear status message; we never silently return an
  empty dataset when the target actually blocked us.
- 🧾 **Multi-keyword batching in one run** — search several terms at
  once and every row is tagged with the keyword that found it.
- 💰 **You pay only for results that land.** No data → no charge (only
  the small `actor-start` warm-up fee).

### 💡 Use cases

- **MENA recruiters and sourcers** — pull every open role matching a
  skill or title across Bayt's employer base.
- **HR-tech and comp-benchmarking builders** — feed live listing data
  (career level, location, salary where published) into a benchmarking
  or ATS product.
- **BD / SDR teams** — new job openings are a public hiring-intent
  signal; a company opening five engineering roles just funded a team.
- **Market research** — track which titles and locations a sector is
  hiring for across the Gulf and wider MENA region over time.

### ⚙️ How to use it

1. Set one or more `keywords` — the search terms to run.
2. Optionally set `country` — the Bayt country path segment (default
   `"uae"`; also accepts values like `"saudi-arabia"`, `"egypt"`).
3. Set `max_results` and `max_pages_per_keyword` to bound how much you
   pull per run.
4. Run it, then export to JSON, CSV, or Excel — or pull the dataset
   straight from the Apify API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `keywords` | `array<string>` | yes | — | Search keyword(s); one or more searches run per Actor call. |
| `country` | `string` | no | `"uae"` | Bayt country path segment, e.g. `"uae"`, `"saudi-arabia"`, `"egypt"`. |
| `max_results` | `integer` | no | `100` | Hard cap on total rows emitted across all keywords (1-2000). |
| `max_pages_per_keyword` | `integer` | no | `20` | Safety cap on pages fetched per keyword, ~20 jobs/page (1-100). |
| `proxy_configuration` | `object` | no | RESIDENTIAL / AE | Apify Proxy configuration — residential is mandatory-by-default here. |

#### Example input

```json
{
  "keywords": ["software engineer", "accountant"],
  "country": "uae",
  "max_results": 60,
  "max_pages_per_keyword": 3
}
```

### 📤 Output

One row per job matching your search.

| Field | Type | Notes |
|---|---|---|
| `job_id` | `string` | Bayt's numeric job id. |
| `title` | `string` | Job title. |
| `company` | `string \| null` | Hiring company's name; null for anonymized/agency-blind postings. |
| `company_url` | `string \| null` | Absolute URL to the company's Bayt profile page. |
| `location` | `string \| null` | Free-text job location. |
| `career_level` | `string \| null` | Free-text career level, e.g. "Management". |
| `salary` | `string \| null` | Free-text salary, present only on a minority of postings. |
| `remote` | `boolean` | True if the card carries a remote-work tag. |
| `summary` | `string \| null` | Free-text job summary snippet. |
| `posted_at_raw` | `string \| null` | Relative posting text verbatim, e.g. "3 days ago". |
| `detail_url` | `string` | Absolute URL to the full job posting. |
| `keyword` | `string` | The input keyword that produced this row. |
| `scraped_at` | `string` | ISO-8601 wall-clock time of row construction. |

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.01 | One-off warm-up charge per run |
| `result` | $0.002 | Per job posting written to the dataset |

Example: 1 000 job postings = **$2.01 per run** ($0.01 start + 1000 x
$0.002). No subscription, no minimum, no card required to try it.

### 🚧 Limitations

- **List-page fields only.** This returns the fields Bayt's search
  result page publishes; full job-description text isn't fetched — use
  the returned `detail_url` for a follow-up detail-page job.
- **`posted_at_raw` stays relative text.** Bayt's list page gives no
  absolute timestamp, so this field is kept verbatim ("3 days ago"),
  never guessed into a fabricated date.
- **A narrow search can legitimately return zero rows.** That's a
  successful run, not a failure — widen your keyword or country.

### ❓ FAQ

**Do I need a Bayt account or API key?**
No. This reads Bayt's public search result pages.

**Why did my run return fewer rows than `max_results`?**
Either the search genuinely has fewer matching jobs than your cap, or
`max_pages_per_keyword` stopped the run first — the status message
tells you which.

**Can I search multiple keywords in one run?**
Yes — pass an array to `keywords`; every row is tagged with the keyword
that found it via `keyword`.

**Can I run this on a schedule?**
Yes — use Apify Schedules to re-run your keyword set on a cadence and
catch newly posted jobs.

### 💬 Your feedback

Found a bug, or need a field we don't return yet? Open an issue on the
Actor's Issues tab — we read every one.

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/bayt-jobs-scraper/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

Search keyword(s), e.g. \["software engineer", "accountant"]; each is slugified into a Bayt search path and run independently.

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

Bayt country path segment, e.g. "uae", "saudi-arabia", "egypt". Passed through verbatim (lowercased).

## `max_results` (type: `integer`):

Hard cap on total rows emitted across all keywords in the run.

## `max_pages_per_keyword` (type: `integer`):

Safety cap on pages fetched per keyword (~20 jobs/page).

## `proxy_configuration` (type: `object`):

Apify Proxy configuration. RESIDENTIAL/AE is mandatory-by-default — bayt.com serves an intermittent Cloudflare interactive challenge to non-residential exits.

## Actor input object example

```json
{
  "keywords": [
    "software engineer",
    "accountant",
    "sales manager"
  ],
  "country": "uae",
  "max_results": 60,
  "max_pages_per_keyword": 3,
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "keywords": [
        "software engineer",
        "accountant",
        "sales manager"
    ],
    "country": "uae",
    "max_results": 60,
    "max_pages_per_keyword": 3,
    "proxy_configuration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "GB"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/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 = {
    "keywords": [
        "software engineer",
        "accountant",
        "sales manager",
    ],
    "country": "uae",
    "max_results": 60,
    "max_pages_per_keyword": 3,
    "proxy_configuration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "GB",
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "software engineer",
    "accountant",
    "sales manager"
  ],
  "country": "uae",
  "max_results": 60,
  "max_pages_per_keyword": 3,
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}' |
apify call devilscrapes/bayt-jobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/bayt-jobs-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/l4zBJdo3FBuPaeMyo/builds/ZdjiV01GfTtHH0llu/openapi.json
