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": 939174,
"estimate_sale_price": 895250,
"interior_sq_m": 139.260498046875,
"list_price_vs_estimate": 8826,
"property_id": "1590e7524a623160",
"property_type": "House"
},
{
"address": "1303 1486 Bathurst Street",
"bathroom_total": 2,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 665964,
"estimate_sale_price": 629859,
"interior_sq_m": 64.93868255615234,
"list_price_vs_estimate": -91964,
"property_id": "1636039c9f310118",
"property_type": "Apartment"
},
{
"address": "750 Vaughan Road",
"bathroom_total": 2,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 1182453,
"estimate_sale_price": 1293560,
"interior_sq_m": 278.706787109375,
"list_price_vs_estimate": 67547,
"property_id": "172f47131b5e5c38",
"property_type": "Multiplex"
},
{
"address": "303 1486 Bathurst Street",
"bathroom_total": 1,
"bedroom_total": 2,
"estimate_days_on_market_until_sale": 195,
"estimate_list_price": 539103,
"estimate_sale_price": 482682,
"interior_sq_m": 55.64845657348633,
"list_price_vs_estimate": -100103,
"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": 2629072,
"estimate_sale_price": 2572057,
"interior_sq_m": 232.1627655029297,
"list_price_vs_estimate": 320928,
"property_id": "18d4ea954f46038a",
"property_type": "House"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 12
},
"price_quote": false,
"result_total": 60,
"time_ms": 108,
"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"
}
}