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&city=hamilton&country_abbreviation=ca&heating_type_first_in=Electric,Electric furnace&page=1&property_type_eq=House&province_abbreviation=on&results_per_page=5&select=address,heating_type_first,construction_year,interior_sq_m,demographic_income_median_pre_tax,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('city', 'hamilton');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('heating_type_first_in', 'Electric,Electric furnace');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_eq', 'House');
url.searchParams.set('province_abbreviation', 'on');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('select', 'address,heating_type_first,construction_year,interior_sq_m,demographic_income_median_pre_tax,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": 2.5999999046325684,
"data": [
{
"address": "228 Province Street S",
"construction_year": 1990,
"demographic_income_median_pre_tax": 54272,
"estimate_list_price": 564653,
"heating_type_first": "Electric",
"interior_sq_m": 64.93868255615234,
"property_id": "122d06689e0b9245"
},
{
"address": "507 Hunter Road",
"construction_year": 1990,
"demographic_income_median_pre_tax": 61440,
"estimate_list_price": 707590,
"heating_type_first": "Electric",
"interior_sq_m": 64.93868255615234,
"property_id": "1755b0d2d70ef25e"
},
{
"address": "14 Walter Avenue S",
"construction_year": 1990,
"demographic_income_median_pre_tax": 48640,
"estimate_list_price": 453791,
"heating_type_first": "Electric",
"interior_sq_m": 64.93868255615234,
"property_id": "20a172bab9fae1d6"
},
{
"address": "30 Parkmanor Drive",
"construction_year": 1990,
"demographic_income_median_pre_tax": 55808,
"estimate_list_price": 1605350,
"heating_type_first": "Electric",
"interior_sq_m": 325.0650329589844,
"property_id": "308d2632ca3c86ea"
},
{
"address": "23 Sylvia Crescent",
"construction_year": 1990,
"demographic_income_median_pre_tax": 55296,
"estimate_list_price": 688329,
"heating_type_first": "Electric",
"interior_sq_m": 125.882568359375,
"property_id": "3976a565fda61d8a"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 8
},
"price_quote": false,
"result_total": 36,
"time_ms": 400,
"ui_info": {
"city": "Hamilton",
"city_id": "46981c1b562b4fdc",
"city_link": "ca/on/hamilton",
"city_slug": "hamilton",
"country": "Canada",
"country_abbreviation": "CA",
"country_abbreviation_id": "9ace2b6431b7f1be",
"country_abbreviation_link": "ca",
"country_slug": "canada",
"province": "Ontario",
"province_abbreviation": "ON",
"province_abbreviation_id": "146699ee774499d3",
"province_abbreviation_link": "ca/on",
"province_slug": "ontario"
}
}