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=toronto&country_abbreviation=ca&estimate_days_on_market_until_sale_gt=180&for_sale_eq=true&page=1&province_abbreviation=on&results_per_page=5&select=address,property_type,estimate_list_price,estimate_sale_price,estimate_days_on_market_until_sale,bedroom_total,bathroom_total,interior_sq_m,list_price_vs_estimate"
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', 'toronto');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('estimate_days_on_market_until_sale_gt', '180');
url.searchParams.set('for_sale_eq', 'true');
url.searchParams.set('page', '1');
url.searchParams.set('province_abbreviation', 'on');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('select', 'address,property_type,estimate_list_price,estimate_sale_price,estimate_days_on_market_until_sale,bedroom_total,bathroom_total,interior_sq_m,list_price_vs_estimate');
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": 3.650000095367432,
"data": [
{
"address": "205 5 Shady Golfway",
"bathroom_total": 1,
"bedroom_total": 3,
"estimate_days_on_market_until_sale": 231,
"estimate_list_price": 454587,
"estimate_sale_price": 468136,
"interior_sq_m": 83.51913452148438,
"list_price_vs_estimate": -45587,
"property_id": "10b0353c9645f57b",
"property_type": "Apartment"
},
{
"address": "1103 185 Alberta Avenue",
"bathroom_total": 2,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 339,
"estimate_list_price": 702550,
"estimate_sale_price": 737712,
"interior_sq_m": 74.22891235351562,
"list_price_vs_estimate": -92650,
"property_id": "10c48f261d95fe3b",
"property_type": "Apartment"
},
{
"address": "117 Clappison Boulevard",
"bathroom_total": 3,
"bedroom_total": 3,
"estimate_days_on_market_until_sale": 188,
"estimate_list_price": 1031609,
"estimate_sale_price": 1094785,
"interior_sq_m": 102.09959411621094,
"list_price_vs_estimate": -31809,
"property_id": "10ec7f7d40757b1e",
"property_type": "House"
},
{
"address": "526 250 Lawrence Avenue W",
"bathroom_total": 1,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 314,
"estimate_list_price": 515341,
"estimate_sale_price": 537277,
"interior_sq_m": 46.35823059082031,
"list_price_vs_estimate": 42659,
"property_id": "110ba09a3826774",
"property_type": "Apartment"
},
{
"address": "197 Yonge Street",
"bathroom_total": 0,
"bedroom_total": 1,
"estimate_days_on_market_until_sale": 693,
"estimate_list_price": 437245,
"estimate_sale_price": 389359,
"interior_sq_m": 55.64845657348633,
"list_price_vs_estimate": -382245,
"property_id": "11e1358d2becea47",
"property_type": "Apartment"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 102
},
"price_quote": false,
"result_total": 510,
"time_ms": 67,
"ui_info": {
"city": "Toronto",
"city_id": "6cdbdee2492718ed",
"city_link": "ca/on/toronto",
"city_slug": "toronto",
"country": "Canada",
"country_abbreviation": "CA",
"country_abbreviation_id": "9ace2b6431b7f1be",
"country_abbreviation_link": "ca",
"country_slug": "canada",
"province": "Ontario",
"province_abbreviation": "ON",
"province_abbreviation_id": "146699ee774499d3",
"province_abbreviation_link": "ca/on",
"province_slug": "ontario"
}
}