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=vancouver&country_abbreviation=ca&page=1&property_type_in=House,Townhouse&province_abbreviation=bc&results_per_page=5&score_education_gte=8&select=address,score_education,score_family,score_safety,bedroom_total,estimate_list_price,demographic_household_type_family_with_children_percent"
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', 'vancouver');
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_education_gte', '8');
url.searchParams.set('select', 'address,score_education,score_family,score_safety,bedroom_total,estimate_list_price,demographic_household_type_family_with_children_percent');
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.0999999046325684,
"data": [
{
"address": "3147 14 Avenue E",
"bedroom_total": 5,
"demographic_household_type_family_with_children_percent": 0.3076923191547394,
"estimate_list_price": 3101109,
"property_id": "100106e9198638ae",
"score_education": 8,
"score_family": 3,
"score_safety": 7
},
{
"address": "3518 Moscrop Street",
"bedroom_total": 5,
"demographic_household_type_family_with_children_percent": 0.30000001192092896,
"estimate_list_price": 2137096,
"property_id": "10011312c41dd458",
"score_education": 8,
"score_family": 1,
"score_safety": 7
},
{
"address": "2 6849 Killarney Street",
"bedroom_total": 3,
"demographic_household_type_family_with_children_percent": 0.3513513505458832,
"estimate_list_price": 1361844,
"property_id": "10011c94fb20240b",
"score_education": 8,
"score_family": 6,
"score_safety": 7
},
{
"address": "3057 25 Avenue E",
"bedroom_total": 3,
"demographic_household_type_family_with_children_percent": 0.3684210479259491,
"estimate_list_price": 1659809,
"property_id": "100276cbd12807",
"score_education": 8,
"score_family": 7,
"score_safety": 7
},
{
"address": "4549 Joyce Street",
"bedroom_total": 2,
"demographic_household_type_family_with_children_percent": 0.42424243688583374,
"estimate_list_price": 1786573,
"property_id": "1002a651d04dc12b",
"score_education": 8,
"score_family": 7,
"score_safety": 7
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 24581
},
"price_quote": false,
"result_total": 122903,
"time_ms": 82,
"ui_info": {
"city": "Vancouver",
"city_id": "3d4b9ab2229768be",
"city_link": "ca/bc/vancouver",
"city_slug": "vancouver",
"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"
}
}