Requests you can copy and run. Each one returns live data from the 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=2&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', '2');
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": true,
"cost_cents": 3.15,
"data": [
{
"address": "6 9866 Pemberton Portage Road",
"city": "Nequatque 1",
"construction_year": 1994,
"estimate_list_price": 707290,
"foundation_type": "Poured concrete",
"property_id": "947ad76ea0ab789",
"score_earthquake": 5,
"score_fire": 2,
"score_flood": 1
},
{
"address": "10008 Koocha Road",
"city": "Nequatque 1",
"construction_year": 1994,
"estimate_list_price": 728993,
"foundation_type": "Poured concrete",
"property_id": "b1cca606335f5c0c",
"score_earthquake": 5,
"score_fire": 2,
"score_flood": 1
},
{
"address": "1333 1323 1329 Porcher Island",
"city": "North Coast C",
"construction_year": 1994,
"estimate_list_price": 695890,
"foundation_type": "Poured concrete",
"property_id": "e790067c9400cc14",
"score_earthquake": 7,
"score_fire": 2,
"score_flood": 1
},
{
"address": "4209 Yellowhead Highway",
"city": "Rayleigh",
"construction_year": 1974,
"estimate_list_price": 517102,
"foundation_type": "Poured concrete",
"property_id": "10d121afc6fc8631",
"score_earthquake": 8,
"score_fire": 2,
"score_flood": 1
},
{
"address": "4917 Cammeray Drive",
"city": "Rayleigh",
"construction_year": 1977,
"estimate_list_price": 670321,
"foundation_type": "Poured concrete",
"property_id": "118aac5bf04b90db",
"score_earthquake": 8,
"score_fire": 2,
"score_flood": 1
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 4161
},
"price_quote": false,
"result_total": 20802,
"time_ms": 36,
"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"
}
}