# Realtor.ca Search

Searches Canadian property inventory. transaction_type accepts for_sale, for_rent and sold. property_type_group accepts residential and commercial. Range filters use min-max with 0 meaning no upper bound, so bed_range=3-0 is three or more bedrooms. Price filters map to the sale fields for sale and sold inventory and to the rental fields for rent inventory. Scope a search with a bounding box, a geo_id, an individual_id or an organization_id. Results carry the full listing record including the brokerage and the listing agents.

- **Documentation:** [https://scrappa.co/docs/realtor-ca-api/realtor_ca_search](https://scrappa.co/docs/realtor-ca-api/realtor_ca_search)
- **API group:** Realtor.ca API
- **Endpoint:** `GET https://scrappa.co/api/realtor-ca/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 |
| --- | --- | --- | --- |
| `transaction_type` | string | No | for_sale, for_rent or sold. |
| `property_type_group` | string | No | residential or commercial. |
| `sort` | string | No | price_asc, price_desc, newest, oldest, virtual_tour, most_photos or floor_area. |
| `property_type_id` | integer | No | Commercial sub-type, so it requires property_type_group=commercial and is refused with 422 on residential inventory. Coverage overlaps between sub-types, so totals are not additive. |
| `min_price` | integer | No | Minimum price in CAD. Applies to the rental range on rent inventory. |
| `max_price` | integer | No | Maximum price in CAD. Applies to the rental range on rent inventory. |
| `bed_range` | string | No | min-max with 0 for no upper bound, for example 3-0. |
| `bath_range` | string | No | min-max with 0 for no upper bound, for example 2-0. |
| `storey_range` | string | No | min-max with 0 for no upper bound, for example 1-0. |
| `garage` | boolean | No | Only listings with a garage. |
| `pool` | boolean | No | Only listings with a pool. |
| `waterfront` | boolean | No | Only waterfront listings. |
| `fireplace` | boolean | No | Only listings with a fireplace. |
| `air_condition` | boolean | No | Only listings with air conditioning. |
| `acreage` | boolean | No | Only acreage listings. |
| `latitude_min` | number | No | South edge of the bounding box. Send all four bounds together. |
| `latitude_max` | number | No | North edge of the bounding box. |
| `longitude_min` | number | No | West edge of the bounding box. |
| `longitude_max` | number | No | East edge of the bounding box. |
| `geo_id` | string | No | Location id from the locations endpoint. |
| `individual_id` | integer | No | Listings represented by one REALTOR. |
| `organization_id` | integer | No | Listings from one brokerage. |
| `page` | integer | No | Page number within the current scope, 1 to 100. The paging hint in a response never names a page beyond that. If the origin still reports pages past that limit, the response carries next.page_ceiling_reached with the current page and the origin's total_pages instead of next.scope_exhausted, so a capped result set is never mistaken for a complete one. |
| `records_per_page` | integer | No | Results requested per page. |
| `sold_within_days` | integer | No | Required when transaction_type=sold: look back this many days, capped at 365. A sold search without it is refused with 422 rather than answered with an unbounded national set or a silently narrowed one. Rejected on any other transaction type. |
| `zoom_level` | integer | No | Map zoom used to group result markers. Accepted range 1 to 20, default 12. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/realtor-ca/search?transaction_type=for_sale&latitude_min=43.63&latitude_max=43.68&longitude_min=-79.43&longitude_max=-79.35&records_per_page=2"
```

## Example response

```json
{
    "success": true,
    "data": {
        "search": {
            "results": [
                {
                    "Id": "30362491",
                    "MlsNumber": "C13859810",
                    "Price": 1200000
                }
            ],
            "count": 1,
            "paging": {
                "total_records": 2777
            },
            "map_pins": []
        }
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Listing Not Found | The requested listing reference number resolved to nothing on the origin. This response is not billable and is not retryable: a well-behaved client should not resend a reference number that does not exist. |
| 422 | Validation Error | A public parameter is invalid, including an unknown transaction type, property group or out-of-range price. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. 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)
