Selecting

Most of the endpoints on the Houski API let you select the exact fields you want to be returned.

This is done by utilizing the query parameter in the request URL. For example, to select the the full bathrooms, and half bathrooms, you would add the following to the request URL: ?select=bathroom_full,bathroom_half

It's important to note that 'select' is a single query key, and you specify multiple fields by seperating them with a comma.

Additionally, you can specify ?select=all to select all available fields.

Some endpoints select relevant fields by default. For example, the properties endpoint selects property_id and address by default.

Programming language

Select the programming language you want to display the code examples in.

Programming language

Select the programming language you want to display the code examples in.

Selecting full and half bathrooms

Note that property_id and address are selected by default by the properties endpoint.

Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&province_abbreviation=ab&results_per_page=3&select=bathroom_full,bathroom_half"
TypeScript code
const houski_properties_data = async (): Promise<PropertiesResponse> => {

    // You must copy the PropertiesResponse type declarations from the 
    // Houski API documentation to strongly type the response

    const url = new URL('https://api.houski.ca/properties');
    url.searchParams.set('api_key', 'YOUR_API_KEY');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('province_abbreviation', 'ab');
    url.searchParams.set('results_per_page', '3');
    url.searchParams.set('select', 'bathroom_full,bathroom_half');

    const response = await fetch(url);
    const data = await response.json();

    return data;
}

(async () => {
let data: PropertiesResponse = await houski_properties_data();

// Log the response
console.log(data);
})();
Response
JSON
{
  "cache_hit": true,
  "cost_cents": 1.2000000476837158,
  "data": [
    {
      "address": "1276 Sunvista Way SE",
      "bathroom_full": 3,
      "bathroom_half": 0,
      "property_id": "6a5a9b0b89cdda3d"
    },
    {
      "address": "695 Strathcona Drive SW",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "property_id": "8ee73a17b8605179"
    },
    {
      "address": "804 39 Hidden Creek Place NW",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "property_id": "3692f712fd505e12"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 496946
  },
  "price_quote": false,
  "result_total": 1490837,
  "time_ms": 89,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "Alberta",
    "province_abbreviation": "AB",
    "province_abbreviation_id": "aae1f05a0f89d2c7",
    "province_abbreviation_link": "ca/ab",
    "province_slug": "alberta"
  }
}
© 2023 Houski Inc. Unit 302, 610 17 Avenue, Calgary, Alberta, Canada.