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&construction_year_lt=1920&country_abbreviation=ca&page=1&property_type_in=House,Townhouse&province_abbreviation=on&results_per_page=5&select=address,construction_year,interior_sq_m,land_area_sq_m,assessment_value,estimate_list_price"
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('construction_year_lt', '1920');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_in', 'House,Townhouse');
url.searchParams.set('province_abbreviation', 'on');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('select', 'address,construction_year,interior_sq_m,land_area_sq_m,assessment_value,estimate_list_price');
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": 2.5999999046325684,
"data": [
{
"address": "242 Lee Avenue",
"construction_year": 1913,
"estimate_list_price": 1198488,
"interior_sq_m": 104.3292465209961,
"land_area_sq_m": 367.8959045410156,
"property_id": "110bc204975a1679"
},
{
"address": "31 John Street",
"construction_year": 1895,
"estimate_list_price": 933073,
"interior_sq_m": 171.59048461914062,
"land_area_sq_m": 367.8959045410156,
"property_id": "14b2a0a9924b91e5"
},
{
"address": "A 173 Palmerston Avenue",
"construction_year": 1905,
"estimate_list_price": 1043841,
"interior_sq_m": 92.80936431884766,
"land_area_sq_m": 367.8959045410156,
"property_id": "18587e3c31994c3f"
},
{
"address": "144 Pearson Avenue",
"construction_year": 1890,
"estimate_list_price": 1310446,
"interior_sq_m": 185.7116241455078,
"land_area_sq_m": 367.8959045410156,
"property_id": "1cfcd5c2ddbf5079"
},
{
"address": "13 Rolyat Street",
"construction_year": 1890,
"estimate_list_price": 1340855,
"interior_sq_m": 108.6956558227539,
"land_area_sq_m": 367.8959045410156,
"property_id": "1f6ce616e9dee5fe"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 7
},
"price_quote": false,
"result_total": 34,
"time_ms": 88,
"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"
}
}