# Mustakbil Jobs Scraper — Pakistan Jobs API (`umararshad2/mustakbil-jobs-scraper`) Actor

Scrape Mustakbil.com (Pakistan + regional) jobs into JSON via JobPosting JSON-LD, RSS, and city listings. CheerioCrawler. PPE $1.20/1k. Karachi, Lahore, Islamabad jobs scraper.

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

## Pricing

from $1.20 / 1,000 job scrapeds

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

## Mustakbil Jobs Scraper — Pakistan Jobs API

Scrape public job listings from **[Mustakbil.com](https://www.mustakbil.com)** (Pakistan’s large multi-category job board, plus regional subdomains) into clean, structured JSON. This Apify Actor parses **schema.org JobPosting JSON-LD** from server-rendered detail pages and discovers openings via **RSS**, **city/country listing pages**, and optional **sitemap** URLs — all through **Crawlee CheerioCrawler** and the **Apify SDK**. No browser automation for the happy path. No login. No email enrichment.

**Store niche:** dedicated Mustakbil scrapers were missing from the Apify Store when this Actor shipped. Pair it with our India-focused boards:

- [Foundit Jobs Scraper](https://apify.com/umararshad2/foundit-jobs-scraper)
- [Instahyre Jobs Scraper](https://apify.com/umararshad2/instahyre-jobs-scraper)

### What this Actor does

Mustakbil indexes **140K+** jobs across Pakistan (Karachi, Lahore, Islamabad, Rawalpindi, Faisalabad, online/remote) and regional markets. Recruiters, analysts, and automation pipelines need bulk access to titles, employers, cities, salaries (often PKR monthly), employment type, and apply URLs.

Each run:

1. Discovers jobs from `searchUrls` **or** default **Pakistan RSS** (`rss.mustakbil.com/jobs-rss?c=162`) + `/jobs/pakistan/{city}` listing pages.
2. Optionally filters by `keywords` (title / company / description) and `location` (city slug map: lahore, karachi, islamabad, …).
3. Fetches each `/jobs/job/{id}` detail page and parses JobPosting JSON-LD (title, description, datePosted, validThrough, employmentType, hiringOrganization, jobLocation, baseSalary).
4. Deduplicates on `jobId`, tags `source=mustakbil`, stops at `maxJobs` (default **100**, hard max **5000**).
5. Charges pay-per-event (PPE) event **`job-scraped`** at **$1.20 per 1,000 jobs**.

### Scrape Mustakbil.com / Pakistan jobs

```json
{
  "keywords": ["software", "developer"],
  "location": "Lahore",
  "maxJobs": 200,
  "includeDescription": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Or paste listing / job / RSS URLs:

```json
{
  "searchUrls": [
    "https://www.mustakbil.com/jobs/pakistan/karachi",
    "https://www.mustakbil.com/jobs/job/1435310",
    "https://rss.mustakbil.com/jobs-rss?c=162"
  ],
  "maxJobs": 100
}
```

### Mustakbil jobs API alternative

Mustakbil has no official public bulk developer API. This Actor is a practical **Mustakbil / Pakistan jobs API alternative**: it uses the same public SSR HTML (JobPosting JSON-LD), RSS feed, and listing pages the site already exposes. Prefer **Apify RESIDENTIAL proxy** — Cloudflare often challenges datacenter IPs. Set `useMockData: true` to run against bundled fixtures.

### Input

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `keywords` | string\[] | — | Client-side match on title/company/description |
| `location` | string | — | City slug (lahore, karachi, islamabad, rawalpindi, online, …) |
| `searchUrls` | string\[] | — | Listing, job, RSS, or sitemap URLs |
| `maxJobs` | integer | 100 | Cap 1–5000 |
| `includeDescription` | boolean | true | Fetch detail JSON-LD per job |
| `useMockData` | boolean | false | Force fixtures (also auto on 403) |
| `proxyConfiguration` | object | **RESIDENTIAL** | Apify Proxy groups |

### Output fields

`jobId`, `title`, `company`, `companyUrl`, `companyLogo`, `locationCity`, `locationCountry`, `employmentType`, `datePosted`, `validThrough`, `salaryMin`, `salaryMax`, `salaryCurrency`, `salaryUnit`, `description`, `url`, `source` (= `mustakbil`), `scrapedAt`.

### Pricing (PPE)

**$1.20 / 1,000 jobs** via custom event `job-scraped` ($0.0012 each), plus a small `apify-actor-start`. No usage pass-through. Do **not** enable synthetic `apify-default-dataset-item` alongside `job-scraped` (avoids double billing). Memory: **512–2048 MB** (default 1024).

### Local development

```bash
cd /workspace/mustakbil-jobs-scraper
npm install
npm run build
APIFY_LOCAL_STORAGE_DIR=./storage npm run start:dev
```

Default local `INPUT.json` sets `useMockData: true`.

### Deploy

```bash
apify push
```

See **BUILD.md** for Console PPE + Publication steps.

### Limitations & ethics

- Public data only. Does not log in, bypass CAPTCHAs, or scrape private profiles.
- Does not enrich employer emails.
- Mustakbil / Cloudflare may rate-limit some IP ranges; use RESIDENTIAL proxy.
- Users must comply with Mustakbil’s Terms of Service and applicable law (including Pakistan PECA / data rules where relevant).

### Related Actors

- [Foundit Jobs Scraper](https://apify.com/umararshad2/foundit-jobs-scraper) — Monster India / Foundit.in
- [Instahyre Jobs Scraper](https://apify.com/umararshad2/instahyre-jobs-scraper) — Instahyre tech jobs

### SEO keywords

Mustakbil scraper, Mustakbil.com jobs scraper, Pakistan jobs scraper, Karachi jobs scraper, Lahore jobs scraper, Islamabad jobs scraper, Rawalpindi jobs, Mustakbil job board API, Apify job scraper, PPE job-scraped, Cheerio Crawlee Apify Actor, JobPosting JSON-LD scraper.

# Actor input Schema

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

Optional list of keywords. Jobs are kept when title, company, or description matches any keyword (case-insensitive). Leave empty for all jobs from the discovery sources.

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

City filter mapped to Mustakbil slugs (lahore, karachi, islamabad, rawalpindi, faisalabad, online, …) or free text. Builds /jobs/pakistan/{city} listing + filters RSS. Blank defaults to all Pakistan via RSS + /jobs/pakistan.

## `searchUrls` (type: `array`):

Optional Mustakbil listing URLs (/jobs/pakistan/lahore), direct job URLs (/jobs/job/{id}), RSS (rss.mustakbil.com/jobs-rss), or sitemap URLs. When set, these replace the default keyword/location discovery plan.

## `maxJobs` (type: `integer`):

Hard cap on jobs written to the dataset (after dedupe). Default 100, maximum 5000.

## `includeDescription` (type: `boolean`):

When true, fetch each job detail page and parse JobPosting JSON-LD (description, salary, employment type, dates). When false, RSS-only fields are emitted where available.

## `useMockData` (type: `boolean`):

Force fixture mode (no live Mustakbil calls). Useful for local CI. Auto-fallback also engages if Cloudflare returns 403.

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

Apify Proxy settings. Default uses RESIDENTIAL — Mustakbil sits behind Cloudflare and often blocks datacenter IPs.

## Actor input object example

```json
{
  "keywords": [
    "software",
    "sales"
  ],
  "location": "Lahore",
  "searchUrls": [
    "https://www.mustakbil.com/jobs/pakistan/lahore"
  ],
  "maxJobs": 100,
  "includeDescription": true,
  "useMockData": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset of Mustakbil job rows (title, company, location, salary, employment type, URLs, descriptions).

# 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",
        "sales"
    ],
    "location": "Lahore",
    "searchUrls": [
        "https://www.mustakbil.com/jobs/pakistan/lahore"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("umararshad2/mustakbil-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",
        "sales",
    ],
    "location": "Lahore",
    "searchUrls": ["https://www.mustakbil.com/jobs/pakistan/lahore"],
}

# Run the Actor and wait for it to finish
run = client.actor("umararshad2/mustakbil-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",
    "sales"
  ],
  "location": "Lahore",
  "searchUrls": [
    "https://www.mustakbil.com/jobs/pakistan/lahore"
  ]
}' |
apify call umararshad2/mustakbil-jobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,umararshad2/mustakbil-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/TvhUpSVffCdpraSQk/builds/KiZbBdzyFxxwNUTAc/openapi.json
