# QuintoAndar Search API Documentation

Scrappa's `GET /api/quintoandar/search` returns QuintoAndar listings for rent or sale in Brazil as structured JSON.

## What you get

One request returns one page of listings, the total match count and the location the search resolved to. Each listing has prices (`rent_price`, `sale_price`, `total_cost`, fees), area, rooms, address, coordinates, photos, amenities and installations. `origin` says whether QuintoAndar manages the listing (`TRANSACTIONAL`) or a partner publishes it (`CLASSIFIED`). Pass it to the property endpoint.

## Filters are honoured

Every returned listing is checked against the filters you sent. About 3 percent of upstream rows are mislabelled (for example a rent search returning a sale-only listing). Those rows are removed, so a page can hold fewer than `rows` listings. The count removed is in `meta.filtered_out`. Pages are never padded. `total` is the platform count before this check. `applied_filters` echoes what was applied.

## Location

`location` takes a slug from the autocomplete endpoint (`curitiba-pr-brasil`, `pinheiros-sao-paulo-sp-brasil`) or a plain city name that is unique in Brazil. An unknown slug returns a `422`, never a wider region.

## Pagination window

Only the first 1000 results of a query are reachable: `page` x `rows` must stay at or below 1000, and `rows` at or below 500. A deeper page, or a page past the last result, returns a non-billable `422` (`page_out_of_range`). Split large areas with price or neighbourhood filters.

## Sort

`relevance` (default), `price_asc` and `price_desc` (total monthly cost for rent), `newest`, and `highest_rent` (SALE only, highest rental return).

## What this API does not cover

Public listing data only. Contact details, lead references and agent accounts are not available. Free-text address search, new-build developments and map search are not available yet.

- **Documentation:** [https://scrappa.co/docs/quintoandar-api/quintoandar_search](https://scrappa.co/docs/quintoandar-api/quintoandar_search)
- **API group:** QuintoAndar API
- **Endpoint:** `GET https://scrappa.co/api/quintoandar/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 |
| --- | --- | --- | --- |
| `business` | string | Yes | RENT or SALE. |
| `location` | string | Yes | Location slug from autocomplete (curitiba-pr-brasil) or a plain city name. |
| `price_min` | number | No | Minimum rent (RENT) or sale price (SALE) in BRL. |
| `price_max` | number | No | Maximum rent (RENT) or sale price (SALE) in BRL. |
| `bedrooms` | integer | No | Minimum bedrooms. Add bedrooms_max for an exact count. |
| `bathrooms` | integer | No | Minimum bathrooms. Add bathrooms_max for an exact count. |
| `parking_spaces` | integer | No | Minimum parking spaces. |
| `suites` | integer | No | Minimum suites. |
| `area_min` | number | No | Minimum area in square metres. |
| `area_max` | number | No | Maximum area in square metres. |
| `property_type` | string | No | Comma list of apartment, studio, house, house_condominium. |
| `furnished` | string | No | true for furnished only, false for unfurnished only. |
| `amenities` | string | No | Comma list of amenity keys from the filters endpoint. A listing must have all of them. |
| `installations` | string | No | Comma list of building installation keys from the filters endpoint. A listing must have all of them. |
| `availability` | string | No | ANY (default) or IMMEDIATE. |
| `origin` | string | No | HYBRID (default), TRANSACTIONAL or CLASSIFIED. |
| `sort` | string | No | relevance (default), price_asc, price_desc, newest or highest_rent (SALE only). |
| `rows` | integer | No | Listings per page, 1-500 (default 24). page x rows must stay at or below 1000. |
| `page` | integer | No | Result page, 1-based. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/quintoandar/search?business=RENT&location=curitiba-pr-brasil&bedrooms=2&price_max=3000&sort=price_asc&rows=10"
```

## Example response

```json
{
    "success": true,
    "total": 584,
    "total_transactional": 584,
    "total_classified": 0,
    "page": 1,
    "rows": 10,
    "returned": 10,
    "has_more": true,
    "resolved_location": {
        "slug": "curitiba-pr-brasil",
        "type": "CITY",
        "name": "Curitiba",
        "city": "Curitiba",
        "state_code": "PR",
        "formatted_name": "Curitiba - PR",
        "latitude": -25.480876,
        "longitude": -49.304425
    },
    "applied_filters": {
        "business": "RENT",
        "location": "curitiba-pr-brasil",
        "sort": "price_asc",
        "price_max": 3000,
        "bedrooms": 2
    },
    "listings": [
        {
            "id": 893892728,
            "origin": "TRANSACTIONAL",
            "url": "https://www.quintoandar.com.br/imovel/893892728/alugar",
            "for_rent": true,
            "for_sale": false,
            "type": "Apartamento",
            "price": 1318,
            "rent_price": 1318,
            "sale_price": null,
            "total_cost": 1913,
            "condominium_fee": 500,
            "iptu": 42,
            "iptu_plus_condominium": 542,
            "area": 53,
            "bedrooms": 2,
            "bathrooms": 1,
            "suites": 0,
            "parking_spaces": 1,
            "is_furnished": false,
            "has_elevator": false,
            "address": "Rua Rosam\u00e9lia de Oliveira",
            "neighbourhood": "Campo Comprido",
            "region": "Campo Comprido",
            "city": "Curitiba",
            "latitude": -25.4582091,
            "longitude": -49.3285549,
            "cover_image": "https://www.quintoandar.com.br/img/893892728-393.9820271578673IMG9002.jpg",
            "images": [
                "https://www.quintoandar.com.br/img/893892728-44.647550986580576IMG1315.jpg"
            ],
            "image_captions": [
                "Quarto 2"
            ],
            "amenities": [
                "CHURRASQUEIRA",
                "AREA_DE_SERVICO"
            ],
            "installations": [
                "PLAYGROUND",
                "SALAO_DE_FESTAS"
            ],
            "condominium": {
                "id": 344059,
                "name": null
            },
            "visit_status": "ACCEPT_NEW",
            "special_conditions": [
                "Exclusivity"
            ],
            "tags": [
                "RENT_ON_TERMINATION"
            ]
        }
    ],
    "meta": {
        "billable": true,
        "attempts": 1,
        "last_status": 200,
        "endpoint_family": "search",
        "filtered_out": 0
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Unknown Location or Page Too Deep | The location is unknown (`unknown_location`), the filter combination was rejected (`invalid_request`), or the page passes the first 1000 results or the last result (`page_out_of_range`). Non-billable. |
| 422 | Validation Error | A query parameter failed validation or is not supported. Unsupported parameters are rejected instead of ignored. Non-billable. |
| 503 | Upstream Unavailable | QuintoAndar could not be reached after a retry, or answered with a body this API cannot read (`upstream_unavailable`, `upstream_blocked`, `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)
