Skip to content
Scrappa Get API key
Mubawab API 1 credit/request

Mubawab Search API Documentation

GET https://scrappa.co/api/mubawab/search

Mubawab Search API lists property for sale or rent in Morocco and Tunisia. Each item has the id, URL, price, currency, location, area, rooms, bedrooms, bathrooms, amenities, a description excerpt and photos. New-build projects appear as items with is_project set to true and no price.

pagination.total is the total the site reports for the search before the bedroom and room checks. Page size varies from 31 to 34 cards. excluded_by_filters counts cards removed because they do not meet min_bedrooms or min_rooms, so a page can hold fewer items than the page size. The tn site lists prices in TND and the ma site in DH. French and English are supported. Arabic pages are not available. Failed requests are not billed.

Mubawab Search API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/mubawab/search
Auth header
x-api-key
Cost
1 credit/request
Response preview
200 OK
{
    "data": {
        "items": [
            {
                "id": 8287523,
                "url": "https://www.mubawab.ma/fr/a/8287523/appartement-avec-terrasse-et-vue-mer",
                "kind": "ad",
                "tags": [],
                "price": 1000000,
                "rooms": 1,
                "title": "Appartement avec terrasse et vue mer",
                "images": [
                    "https://www.mubawab-media.com/ad/8/287/523F/h/WhatsApp%20Image%202026-01-16%20at%2018.07.21%20%283%29_81796288.avif",
                    "https://www.mubawab-media.com/ad/8/287/523F/h/WhatsApp%20Image%202026-01-16%20at%2018.07.21%20%282%29_81796289.avif",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

This endpoint has no required query parameters.

19 optional filters available.

country string Optional

ma (Morocco, default) or tn (Tunisia).

Example value US
language string Optional

fr (default) or en. Texts and labels come in this language.

Example value en
transaction string Optional

sale (default) or rent.

Example value example
property_type string Optional

apartments (default), villas, houses, land, offices, premises, riads or all. The value all needs a location.

Example value example
location string Optional

City slug from the autocomplete route, for example rabat or la-marsa. A slug that does not exist answers 404.

Example value Austin, Texas
sort string Optional

default, newest, price_asc or price_desc.

Example value relevance
min_price integer Optional

Minimum price in the local currency (DH in Morocco, TND in Tunisia). Rent prices are per month.

Example value 10
max_price integer Optional

Maximum price in the local currency.

Example value 10
min_area integer Optional

Minimum living area in square metres.

Example value 10
max_area integer Optional

Maximum living area in square metres.

Example value 10
min_bedrooms integer Optional

Minimum bedrooms. A card that does not state its bedrooms (for example a new-build project) is dropped and counted in excluded_by_filters.

Example value 10
min_rooms integer Optional

Minimum rooms (pieces). Checked on the cards of the returned page: cards below it are dropped and counted in excluded_by_filters.

Example value 10
min_bathrooms integer Optional

Minimum bathrooms.

Example value 10
promotion boolean Optional

true to list new-build promotions only.

Example value true
second_hand boolean Optional

true to list resale properties only.

Example value true
pool boolean Optional

true for listings with a swimming pool.

Example value true
elevator boolean Optional

true for listings with an elevator.

Example value true
garden boolean Optional

true for listings with a garden.

Example value true
page integer Optional

One-based page number, 1 to 1000 (default 1). A page past the last page answers 404. The page in the answer is always the page you asked for.

Example value 1

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "items": [
            {
                "id": 8287523,
                "url": "https://www.mubawab.ma/fr/a/8287523/appartement-avec-terrasse-et-vue-mer",
                "kind": "ad",
                "tags": [],
                "price": 1000000,
                "rooms": 1,
                "title": "Appartement avec terrasse et vue mer",
                "images": [
                    "https://www.mubawab-media.com/ad/8/287/523F/h/WhatsApp%20Image%202026-01-16%20at%2018.07.21%20%283%29_81796288.avif",
                    "https://www.mubawab-media.com/ad/8/287/523F/h/WhatsApp%20Image%202026-01-16%20at%2018.07.21%20%282%29_81796289.avif",
                    "https://www.mubawab-media.com/ad/8/287/523F/h/WhatsApp%20Image%202026-01-16%20at%2018.07.21%20%281%29_81796290.avif"
                ],
                "area_m2": 126,
                "bedrooms": 1,
                "currency": "DH",
                "location": "L'Ocean, Rabat",
                "amenities": [
                    "Terrasse",
                    "Garage",
                    "Vue sur mer",
                    "Concierge"
                ],
                "bathrooms": 1,
                "is_project": false,
                "offer_type": "sale",
                "units_label": null,
                "property_type": "apartments",
                "title_truncated": false,
                "price_on_request": false,
                "description_excerpt": "Nous proposons \u00e0 la vente un appartement spacieux de 126 m\u00b2, situ\u00e9 au 4\u1d49 \u00e9tage dans le quartier recherch\u00e9 de L\u2019Oc\u00e9an \u00e0 Rabat. L\u2019appartement n\u2019est pas enti\u00e8remen..."
            },
            {
                "id": 8432965,
                "url": "https://www.mubawab.ma/fr/a/8432965/appartement-r%C3%A9nov%C3%A9-de-80-m%C2%B2-%C3%A0-vendre-%C3%A0-l%E2%80%99oc%C3%A9an",
                "kind": "ad",
                "tags": [],
                "price": 1000000,
                "rooms": 3,
                "title": "Appartement r\u00e9nov\u00e9 de 80 m\u00b2 \u00e0 vendre \u00e0 l\u2019Oc\u00e9an",
                "images": [
                    "https://www.mubawab-media.com/ad/8/432/965F/h/WhatsApp_Image_2026-10-12_at_11.21.18_83488548.avif",
                    "https://www.mubawab-media.com/ad/8/432/965F/h/WhatsApp_Image_2026-10-12_at_11.21.19__2__83488549.avif",
                    "https://www.mubawab-media.com/ad/8/432/965F/h/WhatsApp_Image_2026-10-12_at_11.21.21__2__83488550.avif"
                ],
                "area_m2": 80,
                "bedrooms": 2,
                "currency": "DH",
                "location": "L'Ocean, Rabat",
                "amenities": [
                    "Terrasse",
                    "Salon Marocain",
                    "Salon europ\u00e9en",
                    "S\u00e9curit\u00e9",
                    "Cuisine \u00e9quip\u00e9e"
                ],
                "bathrooms": 2,
                "is_project": false,
                "offer_type": "sale",
                "units_label": null,
                "property_type": "apartments",
                "title_truncated": false,
                "price_on_request": false,
                "description_excerpt": "Century 21 vous propose \u00e0 la vente un appartement r\u00e9nov\u00e9 de 80 m\u00b2, situ\u00e9 au 3\u1d49 \u00e9tage d\u2019un immeuble dans le quartier de l\u2019Oc\u00e9an \u00e0 Rabat. Ce bien repr\u00e9sente une b..."
            }
        ],
        "pagination": {
            "page": 1,
            "total": 74,
            "has_next": true,
            "page_size": 32,
            "total_pages": 3
        },
        "filters_applied": {
            "sort": "price_asc",
            "location": "rabat",
            "max_price": 2000000,
            "min_price": 1000000
        },
        "excluded_by_filters": 0
    },
    "meta": {
        "country": "ma",
        "billable": true,
        "language": "fr",
        "endpoint_family": "search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "min_price": [
            "The min price field must be an integer."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

The city slug does not exist, or the page is past the last page. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "search"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested resource was not found."
    },
    "success": false
}
503

Upstream Unavailable

Mubawab could not be reached or returned data that does not match the request. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Mubawab could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.