# Portal Inmobiliario Search API Documentation

Search current Portal Inmobiliario listings for sale (venta) or rent (arriendo) in a comuna or region. Filter by property type, bedrooms, bathrooms, price in CLP or UF, area, parking, publisher and condition, then sort and page. The page size is fixed at 48 and the portal serves at most 42 pages (2000 results). Prices come in the listing currency (CLP or UF) with the CLP value added. Project cards show ranges, so a bedroom filter matches a project when one of its units fits. A search without results is a successful empty response.

- **Documentation:** [https://scrappa.co/docs/portal-inmobiliario-api/portal_inmobiliario_search](https://scrappa.co/docs/portal-inmobiliario-api/portal_inmobiliario_search)
- **API group:** Portal Inmobiliario API
- **Endpoint:** `GET https://scrappa.co/api/portal-inmobiliario/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 |
| --- | --- | --- | --- |
| `operation` | string | Yes | venta (sale) or arriendo (rent). |
| `location` | string | Yes | Location slug from the locations endpoint, e.g. providencia-metropolitana. An unknown slug returns a non-billable 404. |
| `property_type` | string | No | departamento, casa, oficina, terreno, sitio, parcela, bodega, estacionamiento, industrial, agricola or otros. Defaults to departamento. |
| `bedrooms` | integer | No | 0 (studio), 1, 2, 3 or 4. 4 means 4 or more. |
| `bathrooms` | integer | No | 1, 2 or 3. 3 means 3 or more. |
| `price_min` | integer | No | Minimum price, inclusive, in the currency parameter. Whole numbers. |
| `price_max` | integer | No | Maximum price, inclusive, in the currency parameter. Whole numbers. |
| `currency` | string | No | CLP or UF. Applies to price_min and price_max. Listings priced in the other currency are converted. Defaults to CLP. |
| `area_min` | integer | No | Minimum area in square metres, whole numbers. |
| `area_max` | integer | No | Maximum area in square metres, whole numbers. |
| `area_type` | string | No | total or covered. Applies to the area filters. Defaults to total. |
| `parking` | integer | No | 0 (no parking), 1 (one space) or 2 (two or more). |
| `publisher` | string | No | particular (private owner) or profesional (agency). |
| `condition` | string | No | usadas (used properties) or proyectos (new projects). |
| `sort` | string | No | relevance, price_asc, price_desc, newest or oldest. Defaults to relevance. |
| `page` | integer | No | Page number from 1 to 42. The page size is fixed at 48. Defaults to 1. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/portal-inmobiliario/search?operation=arriendo&location=providencia-metropolitana&property_type=departamento&bedrooms=2"
```

## Example response

```json
{
    "success": true,
    "data": {
        "listings": [
            {
                "id": "MLC4623230902",
                "url": "https://www.portalinmobiliario.com/MLC-4623230902-departamento-remodelado-metro-tobalaba-_JM",
                "title": "Departamento Remodelado / Metro Tobalaba",
                "headline": "Departamento en arriendo",
                "is_project": false,
                "price": {
                    "amount": 780000,
                    "currency": "CLP",
                    "amount_clp": 780000,
                    "is_from": false,
                    "previous_amount": null,
                    "is_price_drop": false
                },
                "bedrooms": 2,
                "bathrooms": 2,
                "area_m2": 80,
                "area_type": "covered",
                "location_text": "Av. Providencia 2457, Providencia, Metro Tobalaba - Mall Costanera, Providencia",
                "images": [
                    "https://http2.mlstatic.com/D_NQ_NP_902199-MLC118508683130_102026-O-departamento-remodelado-metro-tobalaba.webp"
                ],
                "category_id": "MLC183186"
            }
        ],
        "currency_conversions": {
            "uf_clp": 41215.78,
            "usd_clp": 986.58
        }
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true,
        "pagination": {
            "page": 1,
            "per_page": 48,
            "total": 264,
            "page_count": 6,
            "results_limit": 2000,
            "has_more": true,
            "next_page": 2
        }
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter or range is invalid. This response is not billable. |
| 404 | Not Found | The listing id or the location slug is unknown. This response is not billable. |
| 503 | Upstream Unavailable | Portal Inmobiliario blocked every route, did not answer or returned a page the API could not read. Retry shortly. This response is not billable. |

## 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)
