Mubawab API & Scraper
The Mubawab API returns Mubawab, the largest property portal in Morocco and also active in Tunisia, as clean JSON in two actions.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
search takes a market (ma or tn), a deal (sale, rent or holiday rental), one of nine property types - apartment, house, villa, riad, land, commercial premises, office, farm or room - and optionally a city and a neighbourhood, then narrows by price, surface, bedrooms, bathrooms, a free-text keyword and 13 amenities such as pool, garden, elevator, terrace, garage or furnished. Every row carries the price as a number with its currency read from the listing itself, area in m2, rooms, bedrooms, bathrooms, neighbourhood and city, the amenities shown on the card, the photo list and a description snippet. detail opens one listing in full: the complete description, every characteristic the page lists (condition, building age, floor, orientation, standing, delivery date for new builds), GPS coordinates, the advertiser - estate agency, property developer or private owner, with the agency's profile link - and the page's own structured data beside it as an independent check. When fewer listings match than a page holds, Mubawab fills the rest of the page with unrelated listings from the wider area; the API removes them and tells you how many it removed.
What is on Mubawab right now, by market and property type
Mubawab's own result counts on 2026-10-07, country-wide. These are the numbers the total field returns for the same query.
| Slice | Morocco (mubawab.ma) | Tunisia (mubawab.tn) |
|---|---|---|
| Apartments for sale | 16,201 | 5,133 |
| Apartments for rent | 15,425 | 4,811 |
| Villas and luxury houses for sale | 6,637 | 2,606 |
| Land for sale | 7,262 | 3,617 |
| Houses for sale | 2,109 | not measured |
| Riads for sale | 1,198 | not measured |
| Offices and business premises for rent | 3,156 | not measured |
| Shops and commercial premises for rent | 2,221 | not measured |
| Farms for sale | 641 | not measured |
| Holiday apartments | 1,050 | not measured |
| Rooms for rent | 109 | not measured |
| Casablanca apartments for sale | 5,301 | - |
| Rabat apartments for rent | 1,543 | - |
| Tunis apartments for sale | - | 802 |
Pages hold 32 listings, or 31 when Mubawab places a promoted project box on the page. Paging reaches the end of the result set: the 16,199-apartment national query served exactly 522 pages of 31 and a last page of 17.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/mubawab/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"country": "ma",
"deal": "sale",
"property_type": "apartment",
"city": "casablanca",
"price_min": 1000000,
"price_max": 2000000
}
}{
"ok": true,
"meta": {
"api": "mubawab",
"endpoint": "search",
"mode": "live",
"latency_ms": 1299.1,
"record_count": 31,
"bytes": 404977,
"cache_hit": false,
"market": "MA",
"currency": "MAD",
"charged_credits": 3,
"version": "1.0.0",
"request_id": "b036819e18eb4b52",
"queue_ms": 1.3,
"fetched_at": "2026-10-07T15:52:10.701Z"
},
"data": {
"results": [
{
"id": "8299839",
"listing_id": "8299839",
"url": "https://www.mubawab.ma/fr/pa/8299839/appartement-de-66m%C2%B2-%C3%A0-vendre-%C3%A0-riviera",
"listing_kind": "project_unit",
"deal": null,
"title_deal": "sale",
"title": "Appartement de 66m² à vendre à Riviera",
"price": {
"amount": 1726000,
"currency": "MAD",
"display": "1 726 000 DH",
"on_request": false,
"is_starting_price": false,
"period": null
},
"area_m2": 66,
"rooms": 3,
"bedrooms": 2,
"bathrooms": 1,
"area_display": "66m²",
"location": "Riviera, Casablanca",
"district": "Riviera",
"city": "Casablanca",
"amenities": [
"Garage",
"Ascenseur",
"Climatisation"
],
"description_snippet": "Pekorino est un projet résidentiel intimiste situé au cœur du quartier Riviera à Casablanca. Composé de 38 appartements, il allie architecture contemporaine, prestations haut de gamme et qualité de vie. Sa façade élégante, imaginée par l’agence MAM Archi Studio, s’inspire du mouvement des vagues et confère à l’immeuble une identité unique. Idéalement situé à proximité du boulevard Ghandi, de Casablanca Finance City et de l’aéroport, Pekorino...",
"images": [
"https://www.mubawab-media.com/ad/8/299/839F/h/WhatsApp%20Image%202025-08-07%20%C3%A0%2011.37.08_ae691a82_81931112_81931119.avif",
"https://www.mubawab-media.com/ad/8/299/839F/h/WhatsApp%20Image%202025-08-07%20%C3%A0%2011.37.08_c0b13105_81931113_81931121.avif",
"https://www.mubawab-media.com/ad/8/299/839F/h/IMG-20250910-WA0461_81931114_81931122.avif"
],
"image_count": 7,
"listing_tier": "super_premium",
"has_whatsapp": true
},
{
"id": "8319803",
"listing_id": "8319803",
"url": "https://www.mubawab.ma/fr/pa/8319803/appartement-%C3%A0-vendre-%C3%A0-oasis-superficie-88-m%C2%B2",
"listing_kind": "project_unit",
"deal": null,
"title_deal": "sale",
"title": "Appartement à vendre à Oasis. Superficie 88 m²",
"price": {
"amount": 1825000,
"currency": "MAD",
"display": "1 825 000 DH",
"on_request": false,
"is_starting_price": false,
"period": null
},
"area_m2": 88,
"rooms": 3,
"bedrooms": 2,
"bathrooms": 1,
"area_display": "88m²",
"location": "Oasis, Casablanca",
"district": "Oasis",
"city": "Casablanca",
"amenities": [
"Garage",
"Ascenseur",
"Climatisation"
],
"description_snippet": "Située à Oasis à Casablanca, la Résidence Batucada bénéficie d’un emplacement stratégique à proximité des principales commodités et axes routiers, alliant praticité et confort au quotidien. Le projet propose une sélection raffinée de studios et appartements 2 chambres + salon, avec des superficies allant de 53 à 89 m², conçus pour offrir des espaces lumineux et fonctionnels. Chaque logement se distingue par des finitions haut de gamme, un raff...",
"images": [
"https://www.mubawab-media.com/ad/8/319/803F/h/0_82946560.avif",
"https://www.mubawab-media.com/ad/8/319/803F/h/1000051896_82138991_82139001.avif",
"https://www.mubawab-media.com/ad/8/319/803F/h/1_82946561.avif"
],
"image_count": 7,
"listing_tier": "super_premium",
"has_whatsapp": true
},
{
"id": "8234643",
"listing_id": "8234643",
"url": "https://www.mubawab.ma/fr/pa/8234643/appartement-%C3%A0-vendre-%C3%A0-oasis-2-chambres-ascenseur-et-stationnement",
"listing_kind": "project_unit",
"deal": null,
"title_deal": "sale",
"title": "Appartement à vendre à Oasis. 2 chambres. Ascenseur et stati...",
"price": {
"amount": 1204500,
"currency": "MAD",
"display": "1 204 500 DH",
"on_request": false,
"is_starting_price": false,
"period": null
},
"area_m2": 55,
"rooms": 3,
"bedrooms": null,
"bathrooms": null,
"area_display": "55m²",
"location": "Oasis, Casablanca",
"district": "Oasis",
"city": "Casablanca",
"amenities": [
"Terrasse",
"Garage",
"Ascenseur"
],
"description_snippet": "Achetez votre appartement. 3 pièces, 1 salle de bains, superficie 43 m². 2 chambres. Nouveau. Cet appartement est en vente à Oasis. Résidence parfaitement équipée avec ascenseur et parking. Vous profiterez également d'une belle terrasse. Conciergerie à disposition. Soyez le premier à visiter cet appartement en vente à Casablanca. Sécurité",
"images": [
"https://www.mubawab-media.com/ad/8/234/643F/h/9AC4B052-D278-44C5-BA56-CD1E8C9C036C_81227396_81227398.avif",
"https://www.mubawab-media.com/ad/8/234/643F/h/0FDADC0E-21D4-4472-B948-2A2337AC716A_81227397_81227399.avif"
],
"image_count": 2,
"listing_tier": "super_premium",
"has_whatsapp": true
}
],
"total": 2326,
"count": 31,
"page": 1,
"page_size": 31,
"last_page": 76,
"has_more": true,
"dropped_padding": 0,
"promoted_boxes_dropped": 2,
"search_url": "https://www.mubawab.ma/fr/st/casablanca/appartements-a-vendre:prmn:1000000:prmx:2000000",
"page_title": "Appartement à vendre à Casablanca",
"query": {
"deal": "sale",
"property_type": "apartment",
"category_slug": "appartements-a-vendre",
"country": "ma",
"city": "casablanca",
"district": null,
"tokens": "[redacted-secret]"
},
"warnings": []
}
}What the Mubawab API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| search | Search Mubawab listings in Morocco (default) or Tunisia. Pick the deal (sale, rent, holiday rental), the property type and optionally a city and neighbourhood, then narrow with price, m², rooms, bathrooms, amenities and a keyword. Every filter was measured against the unfiltered count in the same run. `total` is Mubawab's own count. When fewer listings match than a page holds, Mubawab fills the page with unrelated listings from the wider area — this action removes them and says how many in `dropped_padding`. | Real-estate investors call search to search Mubawab listings in Morocco (default) or Tunisia. | country, deal, property_type, city, district, ... |
| detail | The full record of one Mubawab listing: description, price, m², rooms, bedrooms, bathrooms, every characteristic the page lists (condition, age, floor, orientation, standing, delivery date for new builds…), amenities, all photos, video, GPS coordinates, and the advertiser — agency or developer name, kind and profile link. The page's own schema.org data is returned beside it as an independent second witness, with any disagreement listed in `witness_mismatch`. `deal` (sale / rent / vacation) is the category the page itself files the ad under; when the advertiser's title names the other deal — Mubawab does file sale ads in rent results — `deal_conflict` is true. | Brokerage tools call detail to get the full record of one Mubawab listing. | id, country |
Call search from your stack
curl -X POST https://api.reefapi.com/mubawab/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"country":"ma","deal":"sale","property_type":"apartment","city":"casablanca","price_min":1000000,"price_max":2000000}'import requests
r = requests.post(
"https://api.reefapi.com/mubawab/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"country": "ma",
"deal": "sale",
"property_type": "apartment",
"city": "casablanca",
"price_min": 1000000,
"price_max": 2000000
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/mubawab/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"country": "ma",
"deal": "sale",
"property_type": "apartment",
"city": "casablanca",
"price_min": 1000000,
"price_max": 2000000
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.mubawab.search with {"country":"ma","deal":"sale","property_type":"apartment","city":"casablanca","price_min":1000000,"price_max":2000000}.Who uses this API and why
- Moroccan property analysts call search per city and neighbourhood with price and surface bands to size supply - Casablanca apartments for sale counted 5,301, of which 1,873 were priced at 2 million MAD or more.
- Rental-market trackers page search with deal rent and sort newest for Rabat, Casablanca or Tunis, and read price, m2 and bedrooms off every row for a price-per-m2 series.
- Agency and developer prospecting teams call detail on listings to collect the advertising agency or developer name, its kind and profile link - the card itself does not name the advertiser.
- New-build researchers filter search with amenities new_development (465 Casablanca apartments for sale) and read each unit's delivery date and developer from detail.
- Holiday-let and short-stay operators call search with deal vacation in Agadir or Marrakech to monitor furnished apartment and villa supply and asking prices.
Questions developers ask before integrating
Which countries does the Mubawab API cover?
Morocco and Tunisia - the two country sites Mubawab runs, mubawab.ma and mubawab.tn. Pass country ma (the default) or tn. Both use the same page layout, so every field comes back the same way. Moroccan prices are in MAD and Tunisian prices in TND, and the currency is read from each listing rather than assumed: one Marrakech villa in a sample of 31 was priced in euros, and the API says EUR for it.
Why does a search sometimes return fewer rows than a page holds?
Because that is all that matches. When a query has fewer results than a page, Mubawab fills the page with other listings from the surrounding area without marking them - a neighbourhood with 3 apartments for sale rendered 33 cards. The API keeps only as many rows as Mubawab's own count says exist and reports the rest in dropped_padding. The same applies to a page past the end: it returns no rows and has_more false instead of 32 unrelated listings.
Does the API return the agency or seller?
Yes, on detail. Mubawab does not show the advertiser on the search card, so search rows have no seller. detail returns the advertiser block the listing page shows: the name, whether it is an estate agency (Agence), a property developer (Promoteur) or a private owner (Particulier), and for agencies and developers their Mubawab id, profile link and logo. Phone numbers sit behind a click-to-reveal button on Mubawab and are not returned.
Is the rent price monthly?
Mubawab does not say, and the API does not guess. Neither the card, the listing page nor its structured data states a rent period, and the rent results mix monthly rentals with nightly ones - a studio advertised per night at 300 MAD sat in the same Rabat rent results as 10,000 MAD monthly flats. price.period is therefore null; read the title and description when the period matters.
How do I search a neighbourhood?
Pass city and district as Mubawab spells them, for example city casablanca and district Maârif - Casablanca apartments for sale go from 5,301 to 191. Accents matter on this site: Fès, Salé and Maârif are spelled with them. For the cities Mubawab links from its home page an unaccented spelling also works, so Fes finds Fès's 333 apartments for sale. You can also copy any result-page address from mubawab.ma or mubawab.tn into search_url.
Are the prices accurate?
They are the figures Mubawab prints. On 12 listings per run across seven categories and both markets, the price, area and bedroom count on the search card, on the listing page and in the page's own structured data were identical, 12 of 12 in each of two runs. detail returns the structured-data copy as structured_data and lists any disagreement in witness_mismatch. Listings marked Prix à consulter come back with amount null and on_request true - 22 of 392 rows in a 13-search sample.
Do the filters really narrow the results?
Each one was measured against the unfiltered count in the same run. On Casablanca apartments for sale (5,301): 2 million MAD and up 1,873, up to 800,000 MAD 597, 150 m2 and up 1,427, up to 60 m2 743, four bedrooms and up 354, three bathrooms and up 926, keyword piscine 194, pool 260, garden 783, terrace 2,636, elevator 3,737, furnished 889, new development 465. Sorting by price leaves out listings without a price - 5,301 becomes 5,027.
Can a rent search return a property that is for sale?
Yes, because Mubawab itself files some ads under the wrong deal. A premium row in the Rabat apartments-for-rent results on 2026-10-07 was a villa titled for sale at 27,000,000 MAD, and its own listing page files it under apartments for rent too. Search cards do not state a deal, so search rows return deal as null - the deal of a result comes from your query, not from the card - and add title_deal, the deal the advertiser's title names. detail returns deal from the category the listing page files the ad under, and sets deal_conflict to true when the title says otherwise. Filter on deal_conflict, or compare title_deal with your query, before averaging rents.
What is the difference between rooms and bedrooms?
rooms is Mubawab's pieces count and bedrooms its chambres count, exactly as the listing prints them. They do not always add up the way you expect: one Rabat flat prints 1 piece and 2 bedrooms, and its own structured data agrees. The bedrooms_min filter counts bedrooms - every row it returned had at least that many bedrooms, while some printed fewer pieces.
What is the Mubawab API?
Mubawab API is a ReefAPI endpoint group for morocco's and tunisia's main property portal as json: apartments, villas, riads, land and offices for sale or rent, with the advertising agency on every listing. It returns live JSON through POST requests under /mubawab/v1.
Is the Mubawab API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Mubawab calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Mubawab login or account?
No login to Mubawab is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Mubawab data?
The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Mubawab API use?
Mubawab actions currently cost 3 credits per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.