Discover/Mubawab API
live

Mubawab APImubawab.ma

Search and retrieve apartment-for-sale listings across Moroccan cities via the Mubawab.ma API. Get prices, rooms, bathrooms, seller info, and more.

Endpoint health
verified 18h ago
search_apartments_for_sale
get_listing_details
2/2 passing latest checkself-healing
Endpoints
2
Updated
26d ago

What is the Mubawab API?

The Mubawab.ma API provides 2 endpoints to search and inspect apartment-for-sale listings across major Moroccan cities. The search_apartments_for_sale endpoint returns paginated results with listing IDs, titles, prices, and URLs, while get_listing_details exposes up to 9 structured fields per property including room counts, surface data, seller name, currency, and location. Both regular listings and promoted project entries are covered.

Try it
City slug to search in (e.g. casablanca, rabat, marrakech, tanger, agadir)
Page number for pagination, must be a positive integer
api.parse.bot/scraper/56aec35b-5e3a-491d-8543-287613d93fd9/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
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'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace mubawab-ma-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Mubawab Real Estate API — search apartments and get details."""
from parse_apis.mubawab_real_estate_api import Mubawab, City_, ListingNotFound

client = Mubawab()

# Search apartments in Casablanca — limit caps total items fetched.
for listing in client.city(City_.CASABLANCA).search_apartments(limit=5):
    print(listing.title, listing.price)

# Drill-down: take one listing and fetch its full details.
summary = client.city(City_.RABAT).search_apartments(limit=1).first()
if summary:
    detail = summary.details()
    print(detail.title, detail.price, detail.currency)
    print(detail.bedrooms, detail.surface_area, detail.location)

# Typed error handling: catch ListingNotFound for invalid URLs.
try:
    bad_summary = client.city("marrakech").search_apartments(limit=1).first()
    if bad_summary:
        info = bad_summary.details()
        print(info.seller, info.rooms)
except ListingNotFound as exc:
    print(f"Listing gone: {exc.url}")

print("exercised: city / search_apartments / details / ListingNotFound")
All endpoints · 2 totalmissing one? ·

Search for apartments for sale in a specific Moroccan city. Returns paginated listings with title, price, URL, and listing ID. Results include both individual listings and promoted project listings (projects may have null listing_id). Paginate by incrementing the page parameter.

Input
ParamTypeDescription
citystringCity slug to search in (e.g. casablanca, rabat, marrakech, tanger, agadir)
pageintegerPage number for pagination, must be a positive integer
Response
{
  "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": "8148178",
          "url": "https://www.mubawab.ma/fr/pa/8148178/appartement-neuf",
          "price": "1 021 270 DH",
          "title": "Appartement neuf à vendre à Nozha"
        },
        {
          "id": "8345081",
          "url": "https://www.mubawab.ma/fr/a/8345081/appartement-2-chambres",
          "price": "1 390 000 DH",
          "title": "Appartement 2 Chambres Haut Standing"
        }
      ]
    },
    "status": "success"
  }
}

About the Mubawab API

Search Apartments by City

The search_apartments_for_sale endpoint accepts a city slug — such as casablanca, rabat, marrakech, tanger, or agadir — and an integer page parameter for pagination. Each result in the listings array includes the listing id, url, title, and price. Note that promoted project listings may return a null listing_id; your code should handle this case before passing IDs downstream.

Retrieve Full Listing Details

Pass any url value from a search result into get_listing_details to retrieve the complete property record. The response includes price (numeric, in currency such as MAD), rooms, bedrooms, bathrooms, location (city or neighborhood string), seller name or agency, and a listing_id string. Fields that the listing does not publish — such as bathrooms or seller — will return null rather than being omitted, so response shapes are consistent.

Coverage and Pagination

The API covers apartment-for-sale listings. Pagination is controlled entirely by the page integer; increment it to retrieve subsequent pages until the listings array returns fewer results than a full page. There is no separate endpoint for total result counts, so termination logic should be based on response length.

Reliability & maintenanceVerified

The Mubawab API is a managed, monitored endpoint for mubawab.ma — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when mubawab.ma changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official mubawab.ma API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
18h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a price-comparison tool for apartments across Casablanca, Rabat, and Marrakech using the price and location fields.
  • Track listing inventory changes over time by polling search_apartments_for_sale for a given city slug and storing returned listing_id values.
  • Enrich a CRM with seller or agency names by feeding listing URLs into get_listing_details and extracting the seller field.
  • Filter properties by bedroom count for a buyer-facing search UI using the bedrooms field from get_listing_details.
  • Aggregate median apartment prices by neighborhood using the location and price fields across paginated search results.
  • Identify promoted project listings in search results by detecting entries where listing_id is null.
  • Feed listing URLs and phone availability into a lead-qualification pipeline for real estate agents operating in Morocco.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Mubawab.ma have an official developer API?+
Mubawab.ma does not publish a public developer API or documented data access program. This Parse API is the structured way to access listing data from the platform.
What does `get_listing_details` return that the search endpoint does not?+
The search endpoint returns only id, url, title, and price per listing. get_listing_details adds rooms, bedrooms, bathrooms, seller, currency, location, and listing_id — fields that are only available on the individual listing page.
Are rental listings or property types other than apartments for sale covered?+
Not currently. Both endpoints are scoped to apartments listed for sale. Rentals, villas, commercial properties, and land listings are not covered by the current endpoints. You can fork this API on Parse and revise it to add endpoints targeting those listing categories.
How does pagination work, and is there a total result count returned?+
Pagination is driven by the page integer parameter in search_apartments_for_sale. The response does not include a total result count or page count field. To paginate fully, increment page until a response returns an empty or undersized listings array.
Is nationwide coverage across all Moroccan cities supported, or only the listed slugs?+
The documented city slugs are casablanca, rabat, marrakech, tanger, and agadir. Listings from other Moroccan cities are not guaranteed to be accessible through the current city parameter. You can fork the API on Parse and revise it to test or add additional city slugs.
Page content last updated . Spec covers 2 endpoints from mubawab.ma.
Related APIs in Real EstateSee all →
inmuebles.mercadolibre.com.ar API
Search and browse apartment listings on Mercado Libre Argentina with detailed information including prices, addresses, and full descriptions. Get access to paginated results to easily explore available properties across different areas.
olx.ba API
Search and browse listings on OLX.ba across all categories. Retrieve listing names, prices, categories, and URLs, or drill into individual listings for detailed attributes such as location, address, area, floor, condition, and seller information. Includes dedicated support for apartment listings.
imovelweb.com.br API
Search and browse detailed real estate listings on imovelweb.com.br by city, state, and neighborhood. Retrieve structured property data including pricing, size, room counts, features, and full listing descriptions — ready for analysis, comparison, or portfolio tracking.
casasapo.pt API
Search and browse Portuguese real estate listings from Casa Sapo for both sale and rent, view detailed property information, access bank-owned properties, and analyze market statistics to make informed decisions. Track new listings and price reductions to stay updated on the latest opportunities in the Portuguese property market.
Craigslist Apartments API
Search and filter Craigslist apartment listings by neighborhood, bedroom count, price range, and image availability. Retrieve detailed listing information including full descriptions, contact details, photos, and location data.
apartments.com API
Search thousands of apartment listings, view detailed property information including amenities and pricing, and discover properties managed by specific companies all in one place. Find your ideal rental by filtering through available apartments and learning more about the management companies behind them.
rentals.ca API
Search and browse rental listings across Canada by city or neighbourhood, and view detailed property information including prices, amenities, and availability. Find your next home by filtering thousands of rental properties on Rentals.ca in real-time.
portalinmobiliario.com API
Search and analyze property listings from Chile's top real estate platform, accessing detailed information like prices in UF or CLP, room and bathroom counts, square footage, and locations for apartments, houses, and other properties. Quickly compare available properties and gather market data to find your ideal home or investment opportunity.