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=waterloo&country_abbreviation=ca&demographic_age_20_to_24_years_percent_gt=0.12&page=1&property_type_eq=Apartment&province_abbreviation=on&results_per_page=5&select=address,demographic_age_20_to_24_years_percent,demographic_age_25_to_29_years_percent,estimate_rent_monthly,bedroom_total,interior_sq_m,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', 'waterloo');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('demographic_age_20_to_24_years_percent_gt', '0.12');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_eq', 'Apartment');
url.searchParams.set('province_abbreviation', 'on');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('select', 'address,demographic_age_20_to_24_years_percent,demographic_age_25_to_29_years_percent,estimate_rent_monthly,bedroom_total,interior_sq_m,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": 3.0999999046325684,
"data": [
{
"address": "309 265 Westcourt Place",
"bedroom_total": 1,
"demographic_age_20_to_24_years_percent": 0.1599999964237213,
"demographic_age_25_to_29_years_percent": 0.15636363625526428,
"estimate_list_price": 327115,
"estimate_rent_monthly": 1598,
"interior_sq_m": 83.51913452148438,
"property_id": "100836a77874260b"
},
{
"address": "701 65 Westmount Road N",
"bedroom_total": 4,
"demographic_age_20_to_24_years_percent": 0.1599999964237213,
"demographic_age_25_to_29_years_percent": 0.15636363625526428,
"estimate_list_price": 374962,
"estimate_rent_monthly": 2121,
"interior_sq_m": 101.07766723632812,
"property_id": "100b6b1c78c67f99"
},
{
"address": "9 250 Keats Way",
"bedroom_total": 2,
"demographic_age_20_to_24_years_percent": 0.19540229439735413,
"demographic_age_25_to_29_years_percent": 0.1149425283074379,
"estimate_list_price": 405136,
"estimate_rent_monthly": 2123,
"interior_sq_m": 117.05734252929688,
"property_id": "10d41776afd6495d"
},
{
"address": "117 271 Westcourt Place",
"bedroom_total": 2,
"demographic_age_20_to_24_years_percent": 0.1599999964237213,
"demographic_age_25_to_29_years_percent": 0.15636363625526428,
"estimate_list_price": 528567,
"estimate_rent_monthly": 2361,
"interior_sq_m": 111.38981628417967,
"property_id": "10e518e4f001ddad"
},
{
"address": "G414 275 Larch Street",
"bedroom_total": 1,
"demographic_age_20_to_24_years_percent": 0.4669509530067444,
"demographic_age_25_to_29_years_percent": 0.23240938782691956,
"estimate_list_price": 306568,
"estimate_rent_monthly": 1669,
"interior_sq_m": 139.260498046875,
"property_id": "10f829b9e889a36c"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 444
},
"price_quote": false,
"result_total": 2219,
"time_ms": 44,
"ui_info": {
"city": "Waterloo",
"city_id": "7bed79bd139816fa",
"city_link": "ca/on/waterloo",
"city_slug": "waterloo",
"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"
}
}