# Mubawab Search API Documentation

<p><strong>Mubawab Search API</strong> 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 <code>is_project</code> set to true and no price.</p><p><code>pagination.total</code> is the total the site reports for the search before the bedroom and room checks. Page size varies from 31 to 34 cards. <code>excluded_by_filters</code> 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.</p>

- **Documentation:** [https://scrappa.co/docs/mubawab-api/mubawab_search](https://scrappa.co/docs/mubawab-api/mubawab_search)
- **API group:** Mubawab API
- **Endpoint:** `GET https://scrappa.co/api/mubawab/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | No | ma (Morocco, default) or tn (Tunisia). |
| `language` | string | No | fr (default) or en. Texts and labels come in this language. |
| `transaction` | string | No | sale (default) or rent. |
| `property_type` | string | No | apartments (default), villas, houses, land, offices, premises, riads or all. The value all needs a location. |
| `location` | string | No | City slug from the autocomplete route, for example rabat or la-marsa. A slug that does not exist answers 404. |
| `sort` | string | No | default, newest, price_asc or price_desc. |
| `min_price` | integer | No | Minimum price in the local currency (DH in Morocco, TND in Tunisia). Rent prices are per month. |
| `max_price` | integer | No | Maximum price in the local currency. |
| `min_area` | integer | No | Minimum living area in square metres. |
| `max_area` | integer | No | Maximum living area in square metres. |
| `min_bedrooms` | integer | No | Minimum bedrooms. A card that does not state its bedrooms (for example a new-build project) is dropped and counted in excluded_by_filters. |
| `min_rooms` | integer | No | Minimum rooms (pieces). Checked on the cards of the returned page: cards below it are dropped and counted in excluded_by_filters. |
| `min_bathrooms` | integer | No | Minimum bathrooms. |
| `promotion` | boolean | No | true to list new-build promotions only. |
| `second_hand` | boolean | No | true to list resale properties only. |
| `pool` | boolean | No | true for listings with a swimming pool. |
| `elevator` | boolean | No | true for listings with an elevator. |
| `garden` | boolean | No | true for listings with a garden. |
| `page` | integer | No | 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 response

```json
{
    "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

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 404 | Not Found | The city slug does not exist, or the page is past the last page. This response is not billable. |
| 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. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
