mubawab.ma APImubawab.ma ↗
Access Mubawab.ma apartment listings via API. Search by city, paginate results, and retrieve price, rooms, seller, and contact data for Moroccan properties.
curl -X GET 'https://api.parse.bot/scraper/56aec35b-5e3a-491d-8543-287613d93fd9/search_apartments_for_sale?city=casablanca&page=1' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for apartments for sale in a specific Moroccan city. Returns paginated listings with title, price, URL, and listing ID.
| Param | Type | Description |
|---|---|---|
| city | string | City slug to search in (e.g. casablanca, rabat, marrakech, tanger, agadir) |
| page | integer | Page number for pagination, must be a positive integer |
{
"type": "object",
"fields": {
"city": "string, city slug used in the search",
"page": "integer, current page number",
"listings": "array of listing objects with id, url, title, and price"
},
"sample": {
"data": {
"city": "casablanca",
"page": 1,
"listings": [
{
"id": "8322586",
"url": "https://www.mubawab.ma/fr/a/8322586/vend-appartement-%C3%A0-palmier-3-chambres-terrasse-et-ascenseur",
"price": "2 200 000 DH",
"title": "Vend appartement à Palmier. 3 chambres. Terrasse et ascenseu..."
},
{
"id": "8137157",
"url": "https://www.mubawab.ma/fr/pa/8137157/nozha-r%C3%A9sidence-%C3%A0-ain-seba%C3%A2-appartement-3-chambres-salon",
"price": "1 060 620 DH",
"title": "Nozha Résidence à Ain Sebaâ _ Appartement 3 chambres Salon"
}
]
},
"status": "success"
}
}About the mubawab.ma API
The Mubawab.ma API provides 2 endpoints for accessing apartment-for-sale listings on Morocco's major real estate portal. Use search_apartments_for_sale to retrieve paginated listings across cities like Casablanca, Rabat, and Marrakech, and get_listing_details to pull 10 structured fields per property including price, room count, seller name, and currency.
Search Apartments by City
The search_apartments_for_sale endpoint accepts a city slug (e.g. casablanca, rabat, marrakech, tanger, agadir) and an optional page integer for pagination. Each response returns the matched city, the current page, and a listings array. Each listing object includes a numeric id, a direct url to the detail page, a title, and a price.
Retrieve Full Listing Details
Pass any url from search results into get_listing_details to get the complete property record. The response returns price as a number with an explicit currency field (e.g. MAD), plus rooms, bedrooms, bathrooms, location, title, seller, and listing_id. The seller field contains either the individual owner name or the agency name as listed on the property page.
Coverage and Data Shape
Coverage is limited to apartments for sale. The city parameter uses Mubawab's own slug conventions, so values must match the site's URL structure. Pagination starts at page 1; the API echoes back the page number in the response so you can track position across paginated crawls. Not all listings include a complete set of room or bathroom counts — those fields may be absent for listings where the seller has not filled in full details.
- Build a Moroccan property price index by aggregating
priceandlocationfields across cities. - Track listing inventory changes over time by comparing paginated
search_apartments_for_saleresults on a schedule. - Enrich a CRM with seller contact details by feeding listing URLs into
get_listing_details. - Compare average price per room across cities using
price,rooms, andcityfields. - Generate neighborhood-level reports by grouping
locationvalues from detail responses. - Alert users when new listings appear in a target city by diffing listing IDs between crawl runs.
- Populate a property comparison tool with bedroom, bathroom, and price data for side-by-side display.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Mubawab.ma have an official public developer API?+
What does `get_listing_details` return beyond what the search results include?+
search_apartments_for_sale returns only id, url, title, and price per listing. get_listing_details adds rooms, bedrooms, bathrooms, location, seller, currency, and listing_id — fields that are only available on the individual listing page.Does the API cover rental listings or only apartments for sale?+
Are property types other than apartments available, such as villas or commercial spaces?+
How should I handle missing room or bathroom counts in listing detail responses?+
rooms, bedrooms, and bathrooms as nullable in your data model and filter out null values before any aggregation.