Mubawab.ma Housing Scraper avatar

Mubawab.ma Housing Scraper

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Mubawab.ma Housing Scraper

Mubawab.ma Housing Scraper

Scrapes Moroccan real estate listings from mubawab.ma and outputs a structured dataset ready for ML model training (price prediction, classification).

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

LIAICHI MUSTAPHA

LIAICHI MUSTAPHA

Maintained by Community

Actor stats

1

Bookmarked

28

Total users

3

Monthly active users

5 hours ago

Last modified

Share

Extract real estate listings from mubawab.ma — Morocco's largest property portal — with prices, surfaces, locations, property types, and transaction details. Ready for market analysis, price prediction models, and investment research.

Features

  • 15 data fields per listing — price (MAD), price per m², surface, rooms, bathrooms, floor, property type, standing, condition, city, neighborhood, transaction type, and more
  • Full Morocco coverage — all major cities: Casablanca, Rabat, Marrakech, Fès, Tanger, Agadir, and more
  • Both transaction types — vente (sale) and location (rental) listings
  • Multiple property types — appartements, villas, maisons, riads, terrains, bureaux, commerces
  • Playwright rendering — handles JavaScript-rendered pages reliably
  • ML-ready output — flat JSON/CSV format, null-safe fields, derived price-per-m² column

Use Cases

  • Price prediction models — build regression models on Moroccan property prices by city, type, and surface
  • Market analysis — track average prices per m² by city, neighborhood, and property type
  • Investment research — identify undervalued areas by comparing price-per-m² across regions
  • Real estate dashboards — power BI or data studio dashboards with fresh listing data
  • Geo-spatial analysis — map property density and pricing across Moroccan cities

Input

FieldTypeRequiredDefaultDescription
transactionTypeStringNovente"both", "vente" (sale), or "location" (rental)
citiesArrayNoall citiesList of cities to scrape (e.g. ["casablanca", "rabat"])
propertyTypesArrayNomain typesProperty types: appartements, villas, maisons, riads, terrains, bureaux, commerces
maxListingsIntegerNo5000Max listings to scrape — 0 for unlimited
maxConcurrencyIntegerNo5Parallel browser tabs (lower = more stable)
startUrlsArrayNoautoOverride seed URLs (leave empty for auto-generation)
proxyConfigurationObjectNoApify ProxyProxy settings

Example — scrape Casablanca apartments for sale:

{
"transactionType": "vente",
"cities": ["casablanca"],
"propertyTypes": ["appartements"],
"maxListings": 1000
}

Output

Each dataset item is one property listing:

{
"priceDh": 1250000,
"pricePerM2": 12500,
"surfaceM2": 100,
"numRooms": 3,
"numBathrooms": 2,
"floor": 3,
"propertyType": "appartement",
"standing": "moyen_standing",
"state": "bon_etat",
"city": "casablanca",
"neighborhood": "maârif",
"transactionType": "vente",
"url": "https://www.mubawab.ma/fr/a/12345/appartement-a-vendre-casablanca",
"title": "Appartement à vendre à Maârif, Casablanca",
"scrapedAt": "2025-03-27T14:32:00.000Z"
}

Field reference:

FieldTypeDescription
priceDhnumber|nullPrice in Moroccan Dirhams (MAD)
pricePerM2number|nullDerived: price ÷ surface (MAD/m²)
surfaceM2number|nullLiving area in m²
numRoomsinteger|nullBedrooms
numBathroomsinteger|nullBathrooms
floorinteger|nullFloor number (0 = ground floor)
propertyTypestring|nullappartement, villa, maison, riad, etc.
standingstring|nulleconomique, moyen_standing, haut_standing
statestring|nullneuf, bon_etat, a_renover, en_cours_de_construction
citystring|nullLowercase ASCII city name
neighborhoodstring|nullSub-area within the city
transactionTypestring|nullvente or location

How to Use

Via Apify Console

  1. Open the actor on Apify Store
  2. Click Try for free
  3. Set your Transaction Type, Cities, and Property Types
  4. Set maxListings to 10 for a quick test run first
  5. Click Start — typical runs complete in 10–60 minutes depending on scale
  6. Download results as JSON, CSV, or Excel

Via Apify API (Python)

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("scraper_guru/mubawab-housing-scraper").call(run_input={
"transactionType": "vente",
"cities": ["casablanca", "rabat"],
"propertyTypes": ["appartements", "villas"],
"maxListings": 2000
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["city"], item["priceDh"], item["surfaceM2"])

Pricing

This actor is billed by compute units — you pay for runtime and memory only.

ScaleApproximate CostEstimated Time
10 listings (quick test)< $0.01< 1 minute
500 listings$0.05–$0.205–15 minutes
5,000 listings (default)$0.50–$2.0030–90 minutes
Full Morocco dataset (10,000+)$2–$52–4 hours

New to Apify? Every account includes $5 in free monthly credits.

FAQ

What cities are covered? All major Moroccan cities: Casablanca, Rabat, Marrakech, Fès, Tanger, Agadir, Meknès, Oujda, Kénitra, Tétouan. Leave the cities field empty to scrape all cities.

Why are some fields null? Not all listings on mubawab.ma include every field (e.g. some listings omit the price or surface). Null values mean the data wasn't present on the listing page.

How fresh is the data? Data is pulled in real-time when you run the actor. Each run reflects the current state of mubawab.ma listings.

Can I get rental prices too? Yes — set transactionType to "location" or "both" to include rental listings alongside sale listings.

How do I build a price prediction model with this data? Export as CSV, load into pandas, filter out rows where priceDh or surfaceM2 is null, then train a regression model on surfaceM2, numRooms, city, propertyType, and standing as features.


Built by Mustapha Liaichi — Automation & Web Scraping Specialist