Skip to content
Scrappa Get API key
Rentals.ca API 1 credit/request

Rentals.ca Autocomplete API Documentation

GET https://scrappa.co/api/rentals-ca/autocomplete

Rentals.ca Autocomplete API resolves text to cities, neighbourhoods and buildings. City results carry a ready location value: pass it into the search route unchanged. Neighbourhood and building results have location set to null because the search does not work by neighbourhood or single building. Their path works with the listing route (buildings). A query with no match returns an empty list. Failed requests are not billed.

Rentals.ca Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/rentals-ca/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "annex",
        "results": [
            {
                "url": "https://rentals.ca/toronto/annex",
                "city": "Toronto",
                "name": "Annex",
                "path": "toronto/annex",
                "type": "neighbourhood",
                "region": "ON",
                "location": null
            },
            {
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

1 optional filter available.

query string Required

Search text, 2 to 100 characters. Example: toron.

Example value coffee shops
limit integer Optional

Number of results, 1 to 25 (default 10).

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "annex",
        "results": [
            {
                "url": "https://rentals.ca/toronto/annex",
                "city": "Toronto",
                "name": "Annex",
                "path": "toronto/annex",
                "type": "neighbourhood",
                "region": "ON",
                "location": null
            },
            {
                "url": "https://rentals.ca/sainte-anne-de-bellevue",
                "name": "Sainte-Anne-de-Bellevue",
                "path": "sainte-anne-de-bellevue",
                "type": "city",
                "region": "QC",
                "location": "sainte-anne-de-bellevue, qc, ca"
            },
            {
                "url": "https://rentals.ca/ste-anne",
                "name": "Ste Anne",
                "path": "ste-anne",
                "type": "city",
                "region": "MB",
                "location": "ste anne, mb, ca"
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter, a range or a value is invalid. This response is not billable.

{
    "errors": {
        "query": [
            "The query field is required."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

Rentals.ca could not be reached or returned data that does not match the request. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "autocomplete"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Rentals.ca could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.