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&for_rent_eq=true&page=1&province_abbreviation=bc&results_per_page=3&select=address,estimate_rent_monthly,bedroom_total,bathroom_total,property_type,interior_sq_m,estimate_days_on_market_until_rented"
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('for_rent_eq', 'true');
url.searchParams.set('page', '1');
url.searchParams.set('province_abbreviation', 'bc');
url.searchParams.set('results_per_page', '3');
url.searchParams.set('select', 'address,estimate_rent_monthly,bedroom_total,bathroom_total,property_type,interior_sq_m,estimate_days_on_market_until_rented');
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": "1379 East 11 Avenue",
"bathroom_total": 1,
"bedroom_total": 3,
"estimate_days_on_market_until_rented": 26,
"estimate_rent_monthly": 3600,
"interior_sq_m": 144.55712890625,
"property_id": "163a11427524d3b6",
"property_type": "House"
},
{
"address": "1604 West 63 Avenue",
"bathroom_total": 2,
"bedroom_total": 1,
"estimate_days_on_market_until_rented": 10,
"estimate_rent_monthly": 4501,
"interior_sq_m": 86.95721435546875,
"property_id": "1775ab8d5ebf64c9",
"property_type": "House"
},
{
"address": "2468 Balaclava Street",
"bathroom_total": 2,
"bedroom_total": 3,
"estimate_days_on_market_until_rented": 18,
"estimate_rent_monthly": 4607,
"interior_sq_m": 80.77883911132812,
"property_id": "1800b9f2f1876795",
"property_type": "Apartment"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 38
},
"price_quote": false,
"result_total": 114,
"time_ms": 91,
"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"
}
}