Practical examples for using the Houski API.
Select the programming language you want to display the code examples in.
curl -X GET "http://127.0.0.1:8080/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('http://127.0.0.1:8080/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": "9 Dunning Court",
"construction_year": 1990,
"demographic_income_median_pre_tax": 60694,
"estimate_list_price": 647889,
"heating_type_first": "Electric",
"interior_sq_m": 137.77406311035156,
"property_id": "11a0310329373785"
},
{
"address": "172 Grace Avenue",
"construction_year": 1990,
"demographic_income_median_pre_tax": 90921,
"estimate_list_price": 487317,
"heating_type_first": "Electric",
"interior_sq_m": 137.77406311035156,
"property_id": "11a051188d927c8d"
},
{
"address": "228 Province Street S",
"construction_year": 1935,
"demographic_income_median_pre_tax": 102361,
"estimate_list_price": 539951,
"heating_type_first": "Electric",
"interior_sq_m": 130.8992919921875,
"property_id": "122d06689e0b9245"
},
{
"address": "1509 Main Street E",
"construction_year": 1990,
"demographic_income_median_pre_tax": 78878,
"estimate_list_price": 625442,
"heating_type_first": "Electric",
"interior_sq_m": 102.09959411621094,
"property_id": "12d847c578293af2"
},
{
"address": "144 Jones Road",
"construction_year": 1990,
"demographic_income_median_pre_tax": 119221,
"estimate_list_price": 923844,
"heating_type_first": "Electric",
"interior_sq_m": 208.93719482421875,
"property_id": "13d548e00086e273"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 51
},
"price_quote": false,
"result_total": 253,
"time_ms": 121,
"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"
}
}