# Mubawab Real Estate & Phone Lead Scraper (Morocco & Tunisia) (`ismyx-labs/mubawab-real-estate-leads-scraper`) Actor

Extract property listings, seller types, prices per m², GPS coordinates, verified phone numbers, and direct WhatsApp links from Mubawab.ma and Mubawab.tn.

- **URL**: https://apify.com/ismyx-labs/mubawab-real-estate-leads-scraper.md
- **Developed by:** [Ismail](https://apify.com/ismyx-labs) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped property leads

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

## Mubawab Real Estate & Phone Lead Scraper (Morocco & Tunisia)

Extract verified real estate listings, seller contacts, price per m², and direct **WhatsApp** links from [Mubawab.ma](https://www.mubawab.ma) and [Mubawab.tn](https://www.mubawab.tn).

Unlike generic scrapers that miss phone numbers due to client-side obfuscation, this Actor features **native phone decryption** to deliver verified telephone numbers and one-click WhatsApp chat links for every listing.

***

### 🌟 Why Use This Scraper?

- 📱 **Verified Phone Numbers & Direct WhatsApp Links:** Decrypts hidden advertiser contact numbers and provides international `https://wa.me/...` links for instant CRM outreach.
- 🏢 **Seller Type Classification:** Automatically distinguish between direct owners (**Particulier**) and real estate agencies / developers (**Professionnel**).
- 📐 **Calculated Price per m²:** Instantly calculates price per square meter to help you evaluate real estate deals and market rates.
- ⚡ **Ultra-Fast & Cost-Efficient:** Powered by lightweight HTTP streaming with CheerioCrawler (no heavy headless browsers required). Scrapes hundreds of leads per minute on minimal Apify compute units.
- 🇲🇦 🇹🇳 **Multi-Country Coverage:** Fully compatible with both Mubawab Morocco (`mubawab.ma`) and Mubawab Tunisia (`mubawab.tn`).
- 🔄 **Automated Pagination:** Effortlessly handles search results and category pagination (`:p:1`, `:p:2`, etc.).

***

### 💼 Commercial Use Cases

- **Real Estate Agencies & Brokers:** Discover FSBO (For Sale By Owner) properties to pitch your listing and brokerage services.
- **Property Investors & Wholesalers:** Identify below-market apartments, villas, and commercial real estate with calculated price/m².
- **B2B Lead Generation & Call Centers:** Generate targeted, phone-verified contact lists for mortgage brokers, renovators, interior designers, and moving companies.
- **PropTech & Market Intelligence:** Track property price trends, rental yields, and inventory across Casablanca, Marrakech, Rabat, Tangier, Tunis, and beyond.

***

### 📥 Input Configuration

Configure the scraper easily using the Apify Console form or JSON:

| Parameter             | Type    | Required | Default                                                           | Description                                                                                                |
| --------------------- | ------- | -------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `startUrls`           | Array   | **Yes**  | `[{"url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre"}]` | One or more Mubawab search or category URLs (apartments, villas, offices, land).                           |
| `maxItems`            | Integer | No       | `50`                                                              | Maximum number of property leads to extract.                                                               |
| `extractPhoneNumbers` | Boolean | No       | `true`                                                            | When enabled, decrypts telephone numbers and formats direct WhatsApp chat links.                           |
| `sellerTypeFilter`    | String  | No       | `"ALL"`                                                           | Filter results by `"ALL"`, `"Particulier"` (owners only), or `"Professionnel"` (agencies/developers only). |
| `proxyConfiguration`  | Object  | No       | `{ "useApifyProxy": true }`                                       | Apify proxy settings. Standard Datacenter proxies work seamlessly without residential proxy costs.         |

#### Example Input (JSON)

```json
{
    "startUrls": [
        { "url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre" },
        { "url": "https://www.mubawab.ma/fr/ct/casablanca/immobilier-a-vendre" }
    ],
    "maxItems": 100,
    "extractPhoneNumbers": true,
    "sellerTypeFilter": "Particulier"
}
```

***

### 📤 Output Format

Data is stored in the default dataset and can be exported as **JSON, CSV, Excel (XLSX), or XML**, or integrated with **Make, Zapier, Webhooks, or Google Sheets**.

#### Sample Output Record

```json
{
    "listing_id": "8422711",
    "title": "Bel appartement à vendre à Guéliz. Superficie 56 m². Grande terrasse",
    "seller_type": "Professionnel",
    "price_dh": 1100000,
    "surface_m2": 56,
    "price_per_m2": 19643,
    "city": "Marrakech",
    "neighborhood": "Guéliz",
    "latitude": 31.634,
    "longitude": -8.012,
    "phone_number": "06 61 88 69 44",
    "whatsapp_url": "https://wa.me/212661886944",
    "listing_url": "https://www.mubawab.ma/fr/a/8422711/bel-appartement-a-vendre-a-gueliz",
    "scraped_at": "2026-10-24T21:27:51.405Z"
}
```

***

### 🚀 How to Run

1. Click **Try for free** or **Run** on the Apify Actor page.
2. Enter your target Mubawab search URL (e.g., search for villas for sale in Marrakech).
3. Set your desired lead cap (`maxItems`).
4. Click **Start** and download your leads in Excel or CSV once the run completes.

# Actor input Schema

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

Paste any Mubawab search or category URL (e.g. Mubawab Morocco or Mubawab Tunisia apartments, villas, offices, land for sale or rent).

## `maxItems` (type: `integer`):

Maximum number of property leads to extract.

## `extractPhoneNumbers` (type: `boolean`):

Decrypts the seller or agency phone number and builds a direct WhatsApp click-to-chat link.

## `sellerTypeFilter` (type: `string`):

Filter leads by direct owners (Particulier), real estate agencies (Professionnel), or all.

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

Select proxies to be used. Datacenter proxies or Auto work smoothly without residential proxy costs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre"
    }
  ],
  "maxItems": 50,
  "extractPhoneNumbers": true,
  "sellerTypeFilter": "ALL",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ismyx-labs/mubawab-real-estate-leads-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 = { "startUrls": [{ "url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre" }] }

# Run the Actor and wait for it to finish
run = client.actor("ismyx-labs/mubawab-real-estate-leads-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 '{
  "startUrls": [
    {
      "url": "https://www.mubawab.ma/fr/sc/appartements-a-vendre"
    }
  ]
}' |
apify call ismyx-labs/mubawab-real-estate-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ismyx-labs/mubawab-real-estate-leads-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/h7tFYZuBbFPQTiIRR/builds/oNPTPIKYEelPPR2Ly/openapi.json
