Practical examples for using the Houski API.
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=bc&results_per_page=5&score_fire_lte=1&score_flood_lte=1&select=address,city,score_flood,score_fire,score_earthquake,construction_year,foundation_type,estimate_list_price"
const houski_recipe_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', 'bc');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('score_fire_lte', '1');
url.searchParams.set('score_flood_lte', '1');
url.searchParams.set('select', 'address,city,score_flood,score_fire,score_earthquake,construction_year,foundation_type,estimate_list_price');
const response = await fetch(url);
const data = await response.json();
return data;
}
(async () => {
let data: PropertiesResponse = await houski_recipe_data();
// Log the response
console.log(data);
})();
{
"cache_hit": false,
"cost_cents": 3.1500000953674316,
"data": [
{
"address": "1245 Little Shuswap Lake Road W",
"city": "Quaaout 1",
"construction_year": 2008,
"estimate_list_price": 370616,
"foundation_type": "Wood",
"property_id": "100273c20fc6378e",
"score_earthquake": 7,
"score_fire": 0,
"score_flood": 1
},
{
"address": "396 11 Avenue",
"city": "Keremeos",
"construction_year": 2025,
"estimate_list_price": 679853,
"foundation_type": "Wood",
"property_id": "1004bd1f89e2f4a9",
"score_earthquake": 9,
"score_fire": 1,
"score_flood": 1
},
{
"address": "4120 Eckert Street",
"city": "Chilliwack",
"construction_year": 1981,
"estimate_list_price": 2090884,
"foundation_type": "Wood",
"property_id": "10056f8f8440b5f3",
"score_earthquake": 3,
"score_fire": 1,
"score_flood": 0
},
{
"address": "8035 Ryan Creek Road",
"city": "Squamish-Lillooet C",
"construction_year": 2008,
"estimate_list_price": 1666675,
"foundation_type": "Wood",
"property_id": "10057aa14f861d70",
"score_earthquake": 4,
"score_fire": 0,
"score_flood": 1
},
{
"address": "4127 Squilax-Anglemont Road",
"city": "Columbia-Shuswap F",
"construction_year": 2008,
"estimate_list_price": 610521,
"foundation_type": "Wood",
"property_id": "10062ebc7c4dc078",
"score_earthquake": 7,
"score_fire": 0,
"score_flood": 1
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 8798
},
"price_quote": false,
"result_total": 43986,
"time_ms": 61,
"ui_info": {
"country": "Canada",
"country_abbreviation": "CA",
"country_abbreviation_id": "9ace2b6431b7f1be",
"country_abbreviation_link": "ca",
"country_slug": "canada",
"province": "British Columbia",
"province_abbreviation": "BC",
"province_abbreviation_id": "84b27e64bc119a2",
"province_abbreviation_link": "ca/bc",
"province_slug": "british_columbia"
}
}