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&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('http://127.0.0.1:8080/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": "103 Harcourt Avenue",
"construction_year": 1915,
"estimate_list_price": 1676662,
"interior_sq_m": 173.72723388671875,
"land_area_sq_m": 267.28204345703125,
"property_id": "16c83b0474047c5b"
},
{
"address": "A 173 Palmerston Avenue",
"construction_year": 1905,
"estimate_list_price": 1107412,
"interior_sq_m": 92.80936431884766,
"land_area_sq_m": 7790198.0,
"property_id": "18587e3c31994c3f"
},
{
"address": "95 Eighth Street",
"construction_year": 1919,
"estimate_list_price": 1187364,
"interior_sq_m": 147.25009155273438,
"land_area_sq_m": 290.3219909667969,
"property_id": "19080f1d8d5719e0"
},
{
"address": "144 Pearson Avenue",
"construction_year": 1890,
"estimate_list_price": 1428820,
"interior_sq_m": 184.41253662109375,
"land_area_sq_m": 8279868.0,
"property_id": "1cfcd5c2ddbf5079"
},
{
"address": "13 Rolyat Street",
"construction_year": 1890,
"estimate_list_price": 1177307,
"interior_sq_m": 108.6956558227539,
"land_area_sq_m": 137.38687133789062,
"property_id": "1f6ce616e9dee5fe"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 7
},
"price_quote": false,
"result_total": 32,
"time_ms": 231,
"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"
}
}