# Bayt Markets Scraper — compare Gulf countries by openings (`entrogix_works/bayt-market-benchmark`) Actor

Pick one role and compare Gulf countries side by side on Bayt. One row per country: how many postings are actually open to you once nationality-restricted and stale listings are removed, with a confidence range. Unofficial; not affiliated with Bayt.

- **URL**: https://apify.com/entrogix\_works/bayt-market-benchmark.md
- **Developed by:** [Entrogix Works](https://apify.com/entrogix_works) (community)
- **Categories:** Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 market benchmarkeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Gulf Jobs Scraper — compare countries by real openings

Pick **one role** and **two or more Gulf countries**, and get back one row per country ranked by the number most job boards never show you: **what share of the postings you can actually apply to.**

A Gulf search that returns 300 results looks like a strong market. Strip out the postings that restrict applicants by nationality, then strip out the ones that have been sitting there for over a month, and the number that is genuinely open to you can be a fraction of that. This Actor does that arithmetic per country and shows its working.

### What you get per country

| Field | Example |
|---|---|
| `market` | `saudi-arabia` |
| `openFreshRate` | `0.42` — share that is neither nationality-restricted nor stale |
| `openFreshRateRange` | `[0.31, 0.54]` — 95% range for that share |
| `openFreshJobs`, `jobs`, `jobsDated` | `13`, `30`, `31` |
| `nationalityRestrictedRate` | `0.27` — share whose text restricts by nationality |
| `staleRate`, `medianPostedDaysAgo` | `0.31`, `18` |
| `uniqueCompanies`, `topPosterShare`, `topPoster` | `14`, `0.30`, `Gulf Recruitment LLC` |
| `rank`, `notRankedReason` | `1`, or why the row was left out |

The run summary reports `totalJobs` next to `totalOpenFreshJobs`, so the gap between the headline count and the real one is a single line.

### What this Actor refuses to do

**Rank by job count.** Every country is sampled the same number of postings, so the count reflects your sample size, not the market. Ranking is by *rate*, with a Wilson confidence range — which stays honest at 0% and 100%, where the textbook formula collapses to zero width and would let a 0-of-8 result read as certainty.

**Count a posting as fresh because it could not be dated.** Listings whose posted date cannot be read are excluded from both sides of the freshness ratio. Folding them in as "recent" would make the stalest markets look best.

**Let one recruiter stand in for a market.** `topPosterShare` is on every row, and the summary names any country where a single company holds 30% or more.

Countries with fewer than 10 datable postings get `rank: null` rather than a rate that swings on one listing.

### Summary (key-value store, `BENCHMARK_SUMMARY`)

`query`, `markets`, `ranked`, `mostOpen`, `mostOpenRate`, **`topTwoTooClose`**, `medianOpenFreshRate`, **`totalJobs`** vs **`totalOpenFreshJobs`**, `restrictedMarkets`, `concentrated`, `notRanked`.

### Input

```json
{
  "query": "data analyst",
  "countries": ["uae", "saudi-arabia", "qatar"],
  "samplePerCountry": 30
}
```

Available markets: `uae`, `saudi-arabia`, `qatar`, `kuwait`, `bahrain`, `oman`, `egypt`, `jordan`, `lebanon`, `morocco`. A single country is rejected — one market is not a comparison. You are charged **per country**, not per job.

### Limits, stated plainly

- Nationality restrictions are detected from the wording of the posting. A restriction expressed only during screening will not appear here, so `openFreshRate` is an upper bound on how open a market is.
- Only job listings are read. Nothing about applicants is collected.
- Bayt refuses direct traffic, so a residential proxy is required.

Unofficial; not affiliated with Bayt.

# Actor input Schema

## `query` (type: `string`):

A single job title, for example 'data analyst'. The same term is used in every country so the comparison stays fair.

## `countries` (type: `array`):

Two or more Bayt country markets. One country is not a comparison and is rejected.

## `samplePerCountry` (type: `integer`):

Every country is sampled the same way so the comparison stays fair. A larger sample narrows the reported range. You are charged per country, not per job, so raising this does not cost you more.

## `minIntervalMs` (type: `integer`):

Pacing between fetches. Do not lower this.

## `useProxy` (type: `boolean`):

Required. Bayt refuses direct traffic.

## `proxyType` (type: `string`):

Residential is what works in practice on Bayt.

## Actor input object example

```json
{
  "query": "data analyst",
  "countries": [
    "uae",
    "saudi-arabia",
    "qatar"
  ],
  "samplePerCountry": 30,
  "minIntervalMs": 3000,
  "useProxy": true,
  "proxyType": "RESIDENTIAL"
}
```

# Actor output Schema

## `results` (type: `string`):

Every row this run produced, as JSON.

## `summary` (type: `string`):

Which country is most open, whether the top two are separable, and how far the headline job count falls once restricted and stale postings are removed.

# 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 = {
    "query": "data analyst",
    "countries": [
        "uae",
        "saudi-arabia",
        "qatar"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("entrogix_works/bayt-market-benchmark").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 = {
    "query": "data analyst",
    "countries": [
        "uae",
        "saudi-arabia",
        "qatar",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("entrogix_works/bayt-market-benchmark").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 '{
  "query": "data analyst",
  "countries": [
    "uae",
    "saudi-arabia",
    "qatar"
  ]
}' |
apify call entrogix_works/bayt-market-benchmark --silent --output-dataset

```

## MCP server setup

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

```

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/56jcwzz7d3ymGHHYQ/builds/kVH1gGUbTX5LhF9SW/openapi.json
