Most Houski API endpoints let you select which fields to return.
Use the select query parameter. For full and half bathrooms: ?select=bathroom_full,bathroom_half
'select' is a single key. Separate multiple fields with a comma.
Use ?select=all to select every available field.
Some endpoints select relevant fields by default. The properties endpoint defaults to property_id and address.
Select the programming language you want to display the code examples in.
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&page=1&province_abbreviation=ab&results_per_page=3&select=bathroom_full,bathroom_half"
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('page', '1');
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);
})();
{
"cache_hit": false,
"cost_cents": 0.6600000262260437,
"data": [
{
"address": "5313 Township Road 522",
"bathroom_full": 2,
"bathroom_half": 1,
"property_id": "10000ac3e3c04e78"
},
{
"address": "31 Hawkside Park NW",
"bathroom_full": 3,
"bathroom_half": 1,
"property_id": "10000f97f5cb7b9f"
},
{
"address": "415 475 Lancaster Drive",
"bathroom_full": 2,
"bathroom_half": 0,
"property_id": "100016c94ed5b43"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 715549
},
"price_quote": false,
"result_total": 2146647,
"time_ms": 91,
"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"
}
}