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&province_abbreviation=bc&results_per_page=3&score_walkability_gte=8&select=address,score_walkability,score_transit,score_bicycle,property_type,estimate_list_price,estimate_rent_monthly"
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('province_abbreviation', 'bc');
url.searchParams.set('results_per_page', '3');
url.searchParams.set('score_walkability_gte', '8');
url.searchParams.set('select', 'address,score_walkability,score_transit,score_bicycle,property_type,estimate_list_price,estimate_rent_monthly');
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": 1.5899999141693115,
"data": [
{
"address": "603 710 Chilco Street",
"estimate_list_price": 751268,
"estimate_rent_monthly": 2756,
"property_id": "10003aeb67ee2ece",
"property_type": "Apartment",
"score_bicycle": 10,
"score_transit": 9,
"score_walkability": 10
},
{
"address": "901 8488 Cornish Street",
"estimate_list_price": 1172975,
"estimate_rent_monthly": 3496,
"property_id": "100049855ddcf751",
"property_type": "Apartment",
"score_bicycle": 9,
"score_transit": 7,
"score_walkability": 9
},
{
"address": "3147 14 Avenue E",
"estimate_list_price": 3101109,
"estimate_rent_monthly": 4465,
"property_id": "100106e9198638ae",
"property_type": "House",
"score_bicycle": 8,
"score_transit": 8,
"score_walkability": 9
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 121426
},
"price_quote": false,
"result_total": 364276,
"time_ms": 86,
"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"
}
}