# Bayt Jobs Scraper | Middle East UAE Jobs Companies (`lentic_clockss/bayt-scraper`) Actor

Scrape Bayt.com jobs and company profiles across UAE, Saudi Arabia & MENA. Extract titles, salaries, locations, JobPosting fields & URLs — Bayt API alternative.

- **URL**: https://apify.com/lentic\_clockss/bayt-scraper.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** Jobs, Lead generation, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 Scraper (Apify)

Thin Apify Actor that calls the **bayt-com** Cloud Run worker over **HTTPS + API key**.

Does **not** scrape inside Apify CU — no Chrome/patchright in this image.

> **Worker URL is config, not code:** the Actor reads `WORKER_BASE_URL` from Actor environment variables (plus optional per-run `workerBaseUrl`). If you migrate the worker to a new host, update `WORKER_BASE_URL` (and `WORKER_AUTH` if the API key changes) in Apify Console — no Actor code change required. Set `WORKER_PROVIDES_PROXY=1` when the worker supplies its own `PROXY_URL`.

### Architecture

````

This Actor  --HTTPS + WORKER\_AUTH-->  bayt-com Cloud Run (me-west1)  -->  bayt.com

````

Worker URL (default / env):

`https://bayt-com-l7fhldkljq-zf.a.run.app`

### Channels

- `jobs` — SERP (`/en/{geo}/jobs/{keyword}-jobs/`), optional `enrichDetails`
- `company` — company profile via `companyId` / `companyUrl`
- Detail mode — `detailUrls` / `jobIds` → `/v1/listings`

#### Free Apify plan limits (set by this Actor's developer)

| Limit | Free Apify plan | Paid Apify plan |
| --- | --- | --- |
| Runs of this Actor | **10 runs total** | Unlimited |
| Results per run (`maxResults`) | **Up to 200** | Up to 200 |

These caps are enforced by the Actor developer (not Apify platform errors). When you hit the 10-run limit, the run finishes gracefully with a clear status message asking you to upgrade. Paying Apify users are not subject to the run cap.

### Env

| Variable | Purpose |
| --- | --- |
| `WORKER_BASE_URL` | HTTPS worker root (production source of truth) |
| `WORKER_AUTH` | Must match Cloud Run `WORKER_API_KEY` (secret `@baytWorkerApiKey`) |
| `WORKER_PROVIDES_PROXY` | `1` = skip forwarding proxyUrl; worker uses `PROXY_URL` |

### Local

```bash
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export WORKER_BASE_URL='https://bayt-com-l7fhldkljq-zf.a.run.app'
export WORKER_AUTH='…'
apify run --purge
````

### FAQ

**Q: Why did my free-plan run stop with a free-tier message?**\
A: Free Apify plan users get **10 runs** of this Actor and **up to 200 results per run**. These limits are set by the Actor developer (not Apify). Upgrade to a paid Apify plan for unlimited runs.

### Notes

- Proxy: worker uses durable `PROXY_URL`; Apify actor-run proxy passwords are not forwarded.
- Standby Live View: `usesStandbyMode` + `python -m src`.

# Actor input Schema

## `keyword` (type: `string`):

Jobs search keyword (e.g. software engineer).

## `location` (type: `string`):

Optional city slug for jobs-in-{city} URLs (e.g. dubai).

## `channel` (type: `string`):

Jobs SERP or company profile.

## `geo` (type: `string`):

Bayt geo path segment (international, uae, saudi-arabia, …).

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

Optional alias for geo (ae, uae, sa, …).

## `companyId` (type: `string`):

Required for channel=company when companyUrl is empty.

## `companyName` (type: `string`):

Used when building company URLs from companyId.

## `companyUrl` (type: `string`):

Optional Bayt company URL instead of companyId.

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

Maximum rows to return (1–200). Free Apify plan users are limited to 200 results per run and 10 total runs of this Actor — limits set by the Actor developer.

## `maxPages` (type: `integer`):

SERP pages to crawl (?page=N, 30 jobs/page).

## `detailUrls` (type: `array`):

When set, Actor calls /v1/listings instead of search.

## `jobIds` (type: `array`):

Numeric Bayt job ids for /v1/listings.

## `enrichDetails` (type: `boolean`):

Open Job LDP for JobPosting fields after SERP.

## `sortBy` (type: `string`):

r|d|l or relevance|date|language.

## `dateInterval` (type: `string`):

1|2|3 or 30d|7d|24h.

## `remote` (type: `boolean`):

Apply remote\_working\_type filter when true.

## `includeRaw` (type: `boolean`):

Reserved for worker raw payloads.

## `failover` (type: `boolean`):

Allow worker retries.

## `workerBaseUrl` (type: `string`):

Override the Cloud Run worker origin for this run. Defaults to Actor env WORKER\_BASE\_URL. Use when testing a staging worker; production migrations should update WORKER\_BASE\_URL in Actor settings (no code change).

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

Apify proxy UI. Ignored when Actor env WORKER\_PROVIDES\_PROXY=1 (worker uses its own PROXY\_URL). Actor-run proxy passwords are never forwarded to Cloud Run.

## Actor input object example

```json
{
  "keyword": "software engineer",
  "location": "",
  "channel": "jobs",
  "geo": "international",
  "country": "",
  "companyId": "",
  "companyName": "",
  "companyUrl": "",
  "maxResults": 20,
  "maxPages": 1,
  "detailUrls": [],
  "jobIds": [],
  "enrichDetails": false,
  "sortBy": "",
  "dateInterval": "",
  "remote": false,
  "includeRaw": false,
  "failover": true,
  "workerBaseUrl": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Normalized Bayt records.

## `runSummary` (type: `string`):

Run outcome summary.

## `inputEcho` (type: `string`):

Normalized non-secret input.

## `errorSummary` (type: `string`):

Structured failure details.

# 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 = {
    "keyword": "software engineer",
    "location": "",
    "channel": "jobs",
    "geo": "international",
    "country": "",
    "companyId": "",
    "companyName": "",
    "companyUrl": "",
    "maxResults": 20,
    "maxPages": 1,
    "detailUrls": [],
    "jobIds": [],
    "enrichDetails": false,
    "sortBy": "",
    "dateInterval": "",
    "workerBaseUrl": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/bayt-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 = {
    "keyword": "software engineer",
    "location": "",
    "channel": "jobs",
    "geo": "international",
    "country": "",
    "companyId": "",
    "companyName": "",
    "companyUrl": "",
    "maxResults": 20,
    "maxPages": 1,
    "detailUrls": [],
    "jobIds": [],
    "enrichDetails": False,
    "sortBy": "",
    "dateInterval": "",
    "workerBaseUrl": "",
}

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/bayt-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 '{
  "keyword": "software engineer",
  "location": "",
  "channel": "jobs",
  "geo": "international",
  "country": "",
  "companyId": "",
  "companyName": "",
  "companyUrl": "",
  "maxResults": 20,
  "maxPages": 1,
  "detailUrls": [],
  "jobIds": [],
  "enrichDetails": false,
  "sortBy": "",
  "dateInterval": "",
  "workerBaseUrl": ""
}' |
apify call lentic_clockss/bayt-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bayt Jobs Scraper | Middle East UAE Jobs Companies",
        "description": "Scrape Bayt.com jobs and company profiles across UAE, Saudi Arabia & MENA. Extract titles, salaries, locations, JobPosting fields & URLs — Bayt API alternative.",
        "version": "0.2",
        "x-build-id": "3OYxHBGLI1gAMNOiC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~bayt-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-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/lentic_clockss~bayt-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-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/lentic_clockss~bayt-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-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": {
                    "keyword": {
                        "title": "Keyword",
                        "maxLength": 160,
                        "type": "string",
                        "description": "Jobs search keyword (e.g. software engineer).",
                        "default": "software engineer"
                    },
                    "location": {
                        "title": "City (optional)",
                        "maxLength": 160,
                        "type": "string",
                        "description": "Optional city slug for jobs-in-{city} URLs (e.g. dubai).",
                        "default": ""
                    },
                    "channel": {
                        "title": "Channel",
                        "enum": [
                            "jobs",
                            "company"
                        ],
                        "type": "string",
                        "description": "Jobs SERP or company profile.",
                        "default": "jobs"
                    },
                    "geo": {
                        "title": "Geo",
                        "type": "string",
                        "description": "Bayt geo path segment (international, uae, saudi-arabia, …).",
                        "default": "international"
                    },
                    "country": {
                        "title": "Country alias",
                        "type": "string",
                        "description": "Optional alias for geo (ae, uae, sa, …).",
                        "default": ""
                    },
                    "companyId": {
                        "title": "Company ID",
                        "type": "string",
                        "description": "Required for channel=company when companyUrl is empty.",
                        "default": ""
                    },
                    "companyName": {
                        "title": "Company name / slug",
                        "type": "string",
                        "description": "Used when building company URLs from companyId.",
                        "default": ""
                    },
                    "companyUrl": {
                        "title": "Company URL",
                        "type": "string",
                        "description": "Optional Bayt company URL instead of companyId.",
                        "default": ""
                    },
                    "maxResults": {
                        "title": "Max results (max 200; free users capped at 200/run)",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum rows to return (1–200). Free Apify plan users are limited to 200 results per run and 10 total runs of this Actor — limits set by the Actor developer.",
                        "default": 20
                    },
                    "maxPages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "SERP pages to crawl (?page=N, 30 jobs/page).",
                        "default": 1
                    },
                    "detailUrls": {
                        "title": "Job detail URLs",
                        "type": "array",
                        "description": "When set, Actor calls /v1/listings instead of search.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "jobIds": {
                        "title": "Job IDs",
                        "type": "array",
                        "description": "Numeric Bayt job ids for /v1/listings.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "enrichDetails": {
                        "title": "Enrich job details",
                        "type": "boolean",
                        "description": "Open Job LDP for JobPosting fields after SERP.",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort",
                        "type": "string",
                        "description": "r|d|l or relevance|date|language.",
                        "default": ""
                    },
                    "dateInterval": {
                        "title": "Date interval",
                        "type": "string",
                        "description": "1|2|3 or 30d|7d|24h.",
                        "default": ""
                    },
                    "remote": {
                        "title": "Remote only",
                        "type": "boolean",
                        "description": "Apply remote_working_type filter when true.",
                        "default": false
                    },
                    "includeRaw": {
                        "title": "Include raw",
                        "type": "boolean",
                        "description": "Reserved for worker raw payloads.",
                        "default": false
                    },
                    "failover": {
                        "title": "Failover",
                        "type": "boolean",
                        "description": "Allow worker retries.",
                        "default": true
                    },
                    "workerBaseUrl": {
                        "title": "Worker base URL (optional)",
                        "type": "string",
                        "description": "Override the Cloud Run worker origin for this run. Defaults to Actor env WORKER_BASE_URL. Use when testing a staging worker; production migrations should update WORKER_BASE_URL in Actor settings (no code change).",
                        "default": ""
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy UI. Ignored when Actor env WORKER_PROVIDES_PROXY=1 (worker uses its own PROXY_URL). Actor-run proxy passwords are never forwarded to Cloud Run.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
