# Goplaceit Property Search API Documentation

Scrappa's `GET /api/goplaceit/search` returns property and new-development projects for sale or rent in Chile, Mexico and Colombia as structured JSON. Set `country` (`cl`, `mx`, `co`) and `mode` (`buy`, `rent`).

## What you get

Each row has `id`, `entity_type` (`property` or `project`), `title`, `price`, `price_from`, `currency`, `mode`, `type`, `country`, `commune`, rooms, baths, `area_m2`, `image` and the public `url`. Projects carry ranges (`bedrooms_min`, `bedrooms_max`, `area_m2_min`) and `price_from` instead of single values. A price of 0 is shown as `null`. Search rows have no coordinates: read `latitude` and `longitude` from listing.

## Filters are honoured

Goplaceit ignores a sort, type or filter it does not know, so unknown values are rejected with 422. Bedrooms, bathrooms, area, type, mode, country, commune and entity type are checked again on every row. A row that breaks one is never returned and is counted in `filtered_out_count`. `applied_filters` echoes what was used.

## Currencies and price

Use `currency` with `price_min` or `price_max`: `CLP` or `UF` for `cl`, `MXN` or `USD` for `mx`, `COP` for `co`. Goplaceit converts currencies, so a UF filter also returns CLP rows of equal value. Every row has its own `currency`. Price sorts (`price_asc`, `price_max`) order the raw number across currencies, so they are not a single-currency order.

## Locations

Take `region` and `commune` ids from `/api/goplaceit/location-autocomplete` or `/api/goplaceit/locations`. Province is not offered because Goplaceit does not apply it.

## Pagination

`page` is 1-based and `per_page` is 1-50 (default 20). `pagination` is computed by Scrappa. A page past the last one returns an empty `listings` list with the correct totals, never another page's data.

- **Documentation:** [https://scrappa.co/docs/goplaceit-api/goplaceit_search](https://scrappa.co/docs/goplaceit-api/goplaceit_search)
- **API group:** Goplaceit API
- **Endpoint:** `GET https://scrappa.co/api/goplaceit/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 | Yes | cl, mx or co. |
| `mode` | string | Yes | buy for sale listings or rent for rentals. |
| `property_type` | string | No | house, apartment, office, land, parking or storage. |
| `entity_type` | string | No | property for single listings, project for new developments. Default: both. |
| `region` | integer | No | Region id from locations or location-autocomplete. |
| `commune` | integer | No | Commune id from locations or location-autocomplete. |
| `neighborhood` | integer | No | Neighborhood id from locations (parent: commune). |
| `bedrooms_min` | integer | No | Minimum bedrooms. |
| `bedrooms_max` | integer | No | Maximum bedrooms. |
| `bathrooms_min` | integer | No | Minimum bathrooms. |
| `bathrooms_max` | integer | No | Maximum bathrooms. |
| `area_min` | number | No | Minimum built area in square metres. |
| `area_max` | number | No | Maximum built area in square metres. |
| `price_min` | number | No | Minimum price in the given currency. Needs currency. |
| `price_max` | number | No | Maximum price in the given currency. Needs currency. |
| `currency` | string | No | CLP or UF (cl), MXN or USD (mx), COP (co). Only with a price filter. |
| `sort` | string | No | featured (default), newest, oldest, price_asc or price_max. |
| `page` | integer | No | Result page, 1-based. |
| `per_page` | integer | No | Listings per page, 1-50 (default 20). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/goplaceit/search?country=cl&mode=rent&property_type=apartment&region=13&bedrooms_min=3&per_page=20"
```

## Example response

```json
{
    "success": true,
    "total_results": 6367,
    "returned": 1,
    "filtered_out_count": 0,
    "pagination": {
        "page": 1,
        "per_page": 20,
        "total_pages": 319,
        "has_next_page": true
    },
    "applied_filters": {
        "country": "cl",
        "mode": "rent",
        "property_type": "apartment",
        "region": 13,
        "bedrooms_min": 3,
        "sort": "featured"
    },
    "listings": [
        {
            "id": 13248055,
            "entity_type": "property",
            "title": "Departamento en Arriendo en Estoril",
            "price": 90,
            "price_from": null,
            "currency": {
                "id": 2,
                "code": "UF",
                "symbol": "UF",
                "name": "Unidad de Fomento",
                "iso_code": "CLF"
            },
            "mode": "rent",
            "type": "apartment",
            "type_label": "Departamento",
            "country": "cl",
            "commune": {
                "id": 288,
                "name": "Las Condes"
            },
            "bedrooms": 4,
            "bedrooms_min": null,
            "bedrooms_max": null,
            "bathrooms": 3,
            "bathrooms_min": null,
            "bathrooms_max": null,
            "area_m2": 160,
            "area_m2_min": null,
            "area_m2_max": null,
            "image": "https://example.com/photo-220x220.jpg",
            "url": "https://www.goplaceit.com/cl/propiedad/arriendo/departamento/las-condes/13248055-departamento-en-arriendo-en-estoril"
        }
    ],
    "meta": {
        "endpoint_family": "search",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown sort or type values are rejected, never ignored. Non-billable. |
| 503 | Source Unavailable | Goplaceit could not be reached in time, refused the request, or its answer changed shape (`upstream_unavailable`, `request_blocked`, `deadline_exhausted`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

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