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=calgary&country_abbreviation=ca&page=1&property_type_eq=House&province_abbreviation=ab&results_per_page=5&roof_material_install_year_lt=2010&select=address,roof_material,roof_material_install_year,construction_year,interior_sq_m,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', 'calgary');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_eq', 'House');
url.searchParams.set('province_abbreviation', 'ab');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('roof_material_install_year_lt', '2010');
url.searchParams.set('select', 'address,roof_material,roof_material_install_year,construction_year,interior_sq_m,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": "11 Chaparral Valley Garden SE",
"construction_year": 2009,
"estimate_list_price": 518334,
"interior_sq_m": 177.44332885742188,
"property_id": "100a49f6a821f222",
"roof_material": "Asphalt",
"roof_material_install_year": 2009
},
{
"address": "422 Mount Sparrowhawk Place SE",
"construction_year": 1992,
"estimate_list_price": 1040195,
"interior_sq_m": 193.88702392578125,
"property_id": "100c0a0fa63769e1",
"roof_material": "Asphalt",
"roof_material_install_year": 2009
},
{
"address": "434 Cranston Drive SE",
"construction_year": 2009,
"estimate_list_price": 663202,
"interior_sq_m": 184.78414916992188,
"property_id": "1011bbe15bf9928f",
"roof_material": "Asphalt",
"roof_material_install_year": 2009
},
{
"address": "229 Evansdale Way NW",
"construction_year": 2009,
"estimate_list_price": 544412,
"interior_sq_m": 141.95584106445312,
"property_id": "1016419a8159eb02",
"roof_material": "Asphalt",
"roof_material_install_year": 2009
},
{
"address": "60 Citadel Pass Crescent NW",
"construction_year": 1992,
"estimate_list_price": 609442,
"interior_sq_m": 118.07878112792967,
"property_id": "1016981fe984612a",
"roof_material": "Asphalt",
"roof_material_install_year": 2009
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 3204
},
"price_quote": false,
"result_total": 16019,
"time_ms": 116,
"ui_info": {
"city": "Calgary",
"city_id": "6ec95b53075d062c",
"city_link": "ca/ab/calgary",
"city_slug": "calgary",
"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"
}
}