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&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('http://127.0.0.1:8080/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": "724 Vaughan Road",
"bathroom_total": 2,
"bedroom_total": 3,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 905999,
"estimate_sale_price": 1063941,
"interior_sq_m": 139.260498046875,
"list_price_vs_estimate": 92001,
"property_id": "1590e7524a623160",
"property_type": "House"
},
{
"address": "750 Vaughan Road",
"bathroom_total": 2,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 1134852,
"estimate_sale_price": 984861,
"interior_sq_m": 278.706787109375,
"list_price_vs_estimate": 115148,
"property_id": "172f47131b5e5c38",
"property_type": "Duplex"
},
{
"address": "303 1486 Bathurst Street",
"bathroom_total": 1,
"bedroom_total": 3,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 542912,
"estimate_sale_price": 510981,
"interior_sq_m": 139.260498046875,
"list_price_vs_estimate": -103912,
"property_id": "1737ceb4bf07e44a",
"property_type": "Apartment"
},
{
"address": "163 Wychwood Avenue",
"bathroom_total": 5,
"bedroom_total": 6,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 2978061,
"estimate_sale_price": 2674799,
"interior_sq_m": 232.1627655029297,
"list_price_vs_estimate": -28061,
"property_id": "18d4ea954f46038a",
"property_type": "House"
},
{
"address": "7A 2010 Bathurst Street",
"bathroom_total": 3,
"bedroom_total": 3,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 2560181,
"estimate_sale_price": 2691095,
"interior_sq_m": 139.260498046875,
"list_price_vs_estimate": 1034819,
"property_id": "19234cf66e8b036",
"property_type": "Apartment"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 9
},
"price_quote": false,
"result_total": 41,
"time_ms": 126,
"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"
}
}