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&country_abbreviation=ca&page=1&property_type_in=House,Townhouse&province_abbreviation=bc&results_per_page=5&score_fire_lte=2&select=address,city,score_fire,construction_material,roof_material,construction_year,land_area_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('country_abbreviation', 'ca');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_in', 'House,Townhouse');
url.searchParams.set('province_abbreviation', 'bc');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('score_fire_lte', '2');
url.searchParams.set('select', 'address,city,score_fire,construction_material,roof_material,construction_year,land_area_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": true,
"cost_cents": 3.1500000953674316,
"data": [
{
"address": "7850 Nixon Road",
"city": "Chilliwack",
"construction_material": "Concrete",
"construction_year": 1994,
"estimate_list_price": 1441690,
"land_area_sq_m": 10100.9541015625,
"property_id": "100053f16c7b9136",
"roof_material": "Asphalt",
"score_fire": 2
},
{
"address": "71797 Meadow Road",
"city": "Fraser Valley B",
"construction_material": "Concrete",
"construction_year": 2008,
"estimate_list_price": 328720,
"land_area_sq_m": 3941.63818359375,
"property_id": "10005b197d2f0249",
"roof_material": "Asphalt",
"score_fire": 2
},
{
"address": "4748 Marine Drive",
"city": "West Vancouver",
"construction_material": "Concrete",
"construction_year": 1961,
"estimate_list_price": 3945060,
"land_area_sq_m": 1773.0545654296875,
"property_id": "1001111c55405104",
"roof_material": "Asphalt",
"score_fire": 2
},
{
"address": "2150 Nicklaus Drive",
"city": "Langford",
"construction_material": "Concrete",
"construction_year": 2005,
"estimate_list_price": 1637834,
"land_area_sq_m": 914.5895385742188,
"property_id": "10012bf37e31e159",
"roof_material": "Asphalt",
"score_fire": 2
},
{
"address": "315 Providence Avenue",
"city": "Kelowna",
"construction_material": "Wood",
"construction_year": 2006,
"estimate_list_price": 1228915,
"land_area_sq_m": 582.747314453125,
"property_id": "10017512e38545df",
"roof_material": "Asphalt",
"score_fire": 2
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 62556
},
"price_quote": false,
"result_total": 312780,
"time_ms": 323,
"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"
}
}