# ImoveisWeb Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/imoveisweb/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/imoveisweb-search | ## Description Search the Imobiliária Aquários catalog on imoveisweb.com.br. Pass a catalog name such as casas. price_display is rebuilt from the asking amount. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/imoveisweb/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Casas page 1, code 3151, Extrema ```json { "results": [ { "id": "3151", "url": "https://www.imoveisweb.com.br/imoveis/casas/3151/", "area": 534, "city": "Extrema", "image": "https://www.imoveisweb.com.br/imoveis/casas/3151/destaque.jpg", "price": 450000, "state": "MG", "title": "Casa próximo aos Bombeiros, contendo ponto comercial com 2 portas de aço e banheiro, 2 dormitórios, sala, cozinha, banheiro, lavanderia e quintal.", "currency": "BRL", "locality": "Extrema - MG", "operation": "venda", "description": "Casa próximo aos Bombeiros, contendo ponto comercial com 2 portas de aço e banheiro, 2 dormitórios, sala, cozinha, banheiro, lavanderia e quintal.", "area_display": "534 m²", "price_display": "R$ 450.000", "property_type": "casas" } ], "pagination": { "next": "https://www.imoveisweb.com.br/casas_02.htm", "page": 1, "per_page": 79, "total_pages": null, "total_results": null } } ``` ## Documentation ## Overview Search the static catalog of Imobiliária Aquários on www.imoveisweb.com.br. The catalogs cover houses, apartments, lots, small farms, and rentals around Extrema, Minas Gerais. This is not ZonaProp. `price` is the asking amount. `price_display` is that amount rebuilt with Brazilian grouping, such as `R$ 450.000`. `currency` is `BRL` when a price is present. When the price cell lists two amounts, `price` is null. ## Quickstart Houses for sale. `property_type` becomes `casas` and `operation` becomes `venda`. ``` GET https://api.piloterr.com/v2/imoveisweb/search?query=casas ``` Page 2 of that catalog. The site path is `casas_02.htm`. ``` GET https://api.piloterr.com/v2/imoveisweb/search?query=casas&page=2 ``` Small farms. ``` GET https://api.piloterr.com/v2/imoveisweb/search?query=chacaras ``` Rentals. `operation` becomes `locacao`. ``` GET https://api.piloterr.com/v2/imoveisweb/search?query=https://www.imoveisweb.com.br/locacao.htm ``` ## Parameters ### query Required string. A catalog name or a full results URL. - Catalogs: `apartamentos`, `casas`, `lotes`, `chacaras`, `sitios`, `fazendas`, `terrenos`, `locacao`. - Accents are optional (`chácaras`, `sítios`, `locação`). `rent` and `aluguel` select `locacao`. - `casas` calls `https://www.imoveisweb.com.br/casas.htm`. `results[].property_type` is `casas` and `results[].operation` is `venda`. - `locacao` sets `operation` to `locacao`. - A property URL returns 400. Use `/v2/imoveisweb/property`. - A place name on its own, such as `extrema`, returns 400. - There is no default. ### property_type Optional string. Same allowed values as a catalog name. - Use it when `query` is a URL and you want to confirm the catalog. - It sets `results[].property_type`. - If `query` is also a catalog name and the two names differ, the call returns 400. - Default: taken from `query`. ### page Optional integer. Default `1`. - Page 1 requests `casas.htm` and removes a `_NN` suffix. `pagination.page` is 1. - Page 2 requests `casas_02.htm`. - `pagination.per_page` is the number of cards on that page. - When the pager ends in an ellipsis, `total_results` and `total_pages` are null. - `pagination.next` is the next results URL, or null. - A value below 1 returns 400. ### return_page_source Optional boolean. Default `false`. `true` returns `{ "result": "" }` instead of the catalog JSON. ## Response fields | Field | Type | Description | |---|---|---| | `results[].id` | string | Listing code | | `results[].url` | string | Listing URL for `/v2/imoveisweb/property` | | `results[].title` | string or null | Lead of the description, up to 160 characters | | `results[].description` | string or null | Full description | | `results[].property_type` | string | Folder, such as `casas` or `locacao` | | `results[].operation` | string | `locacao` for the rental folder, otherwise `venda` | | `results[].price` | number or null | Asking amount. `R$ 450.000` becomes `450000` | | `results[].price_display` | string or null | Amount rebuilt as `R$ 450.000` | | `results[].currency` | string or null | `BRL` when `price` is set | | `results[].price_qualifier` | string | Extra words such as `mensais`. Omitted when the amount stands alone | | `results[].locality` | string or null | Locality line | | `results[].city` | string or null | Place before ` - ` | | `results[].state` | string or null | Two-letter state | | `results[].area` | number or null | Area. `5.000,00` becomes `5000` | | `results[].area_display` | string or null | Area rebuilt with its unit, such as `534 m²` | | `results[].image` | string or null | Thumbnail | | `results[].status` | string | `vendido`, `alugado`, or `venda_suspensa` when the thumbnail says so. Omitted otherwise | | `pagination.page` | integer | Page requested | | `pagination.per_page` | integer | Cards on this page | | `pagination.total_results` | integer or null | Card count when the page has no pager | | `pagination.total_pages` | integer or null | Highest pager number when the pager has no ellipsis | | `pagination.next` | string or null | Next results URL, or null | ## Notes When `price` is present, `price_display` is rebuilt from it. A trailing dash printed after the amount is not kept. Two amounts in the price cell leave `price` null. ## Use cases - Scan houses for sale in Extrema - Page a catalog such as chácaras or locação - Hand a listing URL to the property endpoint ## Error codes | Code | Meaning | |---|---| | 400 | Empty query, unknown catalog, page below 1, mismatched property type, wrong domain, or a listing URL | | 401 | Missing API key | | 403 | Blocked by the site | | 404 | The page had no listing cards | | 500 | Fetch or parse failure |